Date: Fri, 20 Jul 2001 21:54:32 -0600 From: "Weiguang SHI" <weiguang_shi@hotmail.com> To: freebsd-hackers@freebsd.org Subject: jmp after setting PE? Message-ID: <F25C2DWpmy20h08xWI00000162e@hotmail.com>
next in thread | raw e-mail | index | archive | help
Hi, Please forgive me if this seems too easy. "http://people.freebsd.org/~jhb/386htm/s10_03.htm" says: Immediately after setting the PE flag, the initialization code must flush the processor's instruction prefetch queue by executing a JMP instruction. The 80386 fetches and decodes instructions and addresses before they are used; however, after a change into protected mode, the prefetched instruction information (which pertains to real-address mode) is no longer valid. A JMP forces the processor to discard the invalid information. "/home/src/sys/i386/i386" says: 329 /* Now enable paging */ 330 movl R(_IdlePTD), %eax 331 movl %eax,%cr3 /* load ptd addr into mm 332 movl %cr0,%eax /* get control word */ 333 orl $CR0_PE|CR0_PG,%eax /* enable paging */ 334 movl %eax,%cr0 /* and let's page NOW! * 335 336 #ifdef BDE_DEBUGGER 337 /* 338 * Complete the adjustments for paging so that we can keep tracing throu 339 * initi386() after the low (physical) addresses for the gdt and idt bec 340 * invalid. 341 */ 342 call bdb_commit_paging 343 #endif 344 345 pushl $begin /* jump to high virtuali 346 ret My question is "where is the "jmp" instruction which is supposed to immediately follow the instruction setting PE? Or do I miss anything? Thanks Weiguang PS. I am looking at 4.3 stable. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F25C2DWpmy20h08xWI00000162e>