If God is all-knowing and all-powerful, doesn't this imply that nothing is beyond His grasp? So by definition, He can give us free will and also know what we will do with our free will. By definition.
To God, the past, present and future are linear and finite. To mortal man, only the past...