How to map to 0xffffffff80000000 - -> 0xffffffffffffffff
How to map to 0xffffffff80000000 - -> 0xffffffffffffffff
According this this tutorial (http://wiki.osdev.org/Creating_a_64-bit ... ual_Memory) the linux kernel maps physical memory starting from 0x0 to the region 0xffffffff80000000 - -> 0xffffffffffffffff which is -2gb. I have setup up the PML4, PDPT, PD and PT tables but these only maps to positive virtual memory addresses. How do you map to negative virtual addresses? Do I have to flip like a sign bit some where?
Re: How to map to 0xffffffff80000000 - -> 0xffffffffffffffff
There is no such thing as a negative (virtual or not) address. That address range is expressed as hexadecimal unsigned numbers.
Re: How to map to 0xffffffff80000000 - -> 0xffffffffffffffff
Hi,kzinti wrote:There is no such thing as a negative (virtual or not) address. That address range is expressed as hexadecimal unsigned numbers.
I can see that it's address expressed as hexadecimal unsigned number, but even with PML4 I can only map 256 TB and not enough to reach 0xffffffff80000000. If I want to map to 0xffffffff80000000 which entrie(s) should I fill in the PML4 table?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: How to map to 0xffffffff80000000 - -> 0xffffffffffffffff
The second half of PML4 maps the last TBs of virtual memory. You actually can't map the middle addresses, but 0xffffffffffffffff is perfectly fine.markq wrote:not enough to reach 0xffffffff80000000.
Re: How to map to 0xffffffff80000000 - -> 0xffffffffffffffff
btw:
this is explained in the Intel 1:3.3.7
Its not often I refer to volume 1, but it doesn't seem to be mentioned in 3... though it is shown in the figures accompanying 3A:3.10.1 & 3.10.2 (and referred to without explanation in 3A:5.15.13 -- the chapter 5 section describing #GP)
this is explained in the Intel 1:3.3.7
Its not often I refer to volume 1, but it doesn't seem to be mentioned in 3... though it is shown in the figures accompanying 3A:3.10.1 & 3.10.2 (and referred to without explanation in 3A:5.15.13 -- the chapter 5 section describing #GP)