Prepare to run in kernel mode