From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <13426df10708221842v42de932dnd94b70868dcbf470@mail.gmail.com> Date: Wed, 22 Aug 2007 21:42:21 -0400 From: "ron minnich" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] double-mapping KZERO in l.s In-Reply-To: <39d464d9182fb939d449ead3c9f6fd90@quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <13426df10708221602l51238c48x2e4d6999891fc158@mail.gmail.com> <39d464d9182fb939d449ead3c9f6fd90@quanstro.net> Topicbox-Message-UUID: b0251706-ead2-11e9-9d60-3106f5b1d025 On 8/22/07, erik quanstrom wrote: > where is that time? what i see in l.s > > MOVL $_startpg(SB), AX /* this is a virtual address */ > MOVL DX, CR0 /* turn on paging */ > JMP* AX /* jump to the virtual nirvana */ > > perhaps i am missing it, but i don't see any point in the code > where there's a problem. the two instructions that do the switch > access only registers. But the EIP has to access the instructions. After the mov, you're still at low memory. Paging is turned on at this time. The JMP is running at 0x10000something. So you turn paging on and do a jump, but paging is on when you do the jmp and fetch from low memory. To make the ifetch work you have to have the low map on. I'll look at that code tonight again to make sure I'm not imaging things, but I think this is right. ron