/* * relocate_kernel.S - put the kernel image in place to boot * Copyright (C) 2002-2004 Eric Biederman <ebiederm@xmission.com> * *This source code is licensed under the GNU General Public License, * Version 2. See the file COPYING for more details. */
/* To be certain of avoiding problems with self-modifying code * I need to execute a serializing instruction here. * So I flush the TLB, it's handy, andnot processor dependent.//再次清空 TLB */ xorl %eax, %eax movl %eax, %cr3
/* set all of the registers to known values */ /*leave %esp alone *///将除了栈指针寄存器 esp(因为它指向容纳新内核起始地址的栈)以外的所有寄存器重设为 0。