Re: [PATCH] i386: For debugging, make the initial page table setup less forgiving.

H. Peter Anvin
2007-04-13T22:26:31Z

Zachary Amsden wrote:
> H. Peter Anvin wrote:
>> + /*
>> + * End condition: we must map up to and including
>> + * INIT_MAP_BEYOND_END bytes beyond the end of our
>> + * own page tables; 0x1000 is the size of the page
>> + * table were about to write, and +0x007 is the
>> + * attribute bits.
>> + */
>> + leal (INIT_MAP_BEYOND_END+0x1000+0x007)(%edi),%ebp
>>
>
> hrmm? Shouldn't that still be INIT_MAP_BEYOND_END+0x0007? Seems you
> are mapping 4M more than you need.
>

4K, not 4M. This is an actual address, not an indirection.

However, the expression is correct, because it needs to refer to the
termination address *after* the current page table is written -- you can
think of it as having already allocated 4K for a page table that it is
about to be generated.

-hpa