flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > paging and addreses > 6b |
Author |
|
chaoscode 17 Mar 2010, 21:22
well,.....
at the moment there is just am implementation of 48 bit virtual address space mapped to 52 bit physical addresses from AMD. and Intel has also a maximum of 48 bit virtual adress space. (and i think also a maximum of 52 bit pysical ram.) the address has to be in canonical adress form. that means, that bit Nr 48 is the sign extended bit. (bits 49 to 64 hast to be the same like bit 48.) but in the machine spefific registers you can read how many bits are usable in virtual and physical memory. |
|||
17 Mar 2010, 21:22 |
|
Feryno 18 Mar 2010, 08:36
52 bits of physical memory is architectural limit of AMD64/Intel IA32e, if you try to determine the phys mem limit at current CPUs using the CPUID instruction, you will get much less value (36 bits in worst case - my CPU, 40 bits if you have a luck)
virtual memory is in canonical form when bit 47. is the same as all bits 63-48 so canonical virt. mem is in range: 0000000000000000 - 00007FFFFFFFFFFF FFFF800000000000 - FFFFFFFFFFFFFFFF the lowest bit counts from 0 so the 48th bit is bit 47. - that caused some problems to microsoft kernel developper(s), I posted it here: http://board.flatassembler.net/topic.php?t=11319 the correct formula to validate canonical virt. mem is: Code: ; rax = virt. mem sar rax,47 inc rax cmp rax,1 jbe canonical |
|||
18 Mar 2010, 08:36 |
|
a115433 18 Mar 2010, 13:12
so virtual memory is always 48 bit, higher wouldnt work under pml4
and physical is 52? |
|||
18 Mar 2010, 13:12 |
|
baldr 18 Mar 2010, 15:18
a115433,
You don't have to guess or assume, there is cpuid (with eax==0x80000008, since P4HT). PML4 part of linear/virtual address can be extended from 9 bits in IA-32e to 25 bits easily (I doubt it, though). |
|||
18 Mar 2010, 15:18 |
|
Alphonso 18 Mar 2010, 15:34
I thought that the physical address limit of 32-bit PAE was the same as 64-bit and the 64GiB limit came from the older 32-bit processors that had 36 address lines. Disregarding the practicality of it, let me know if I've got it wrong.
|
|||
18 Mar 2010, 15:34 |
|
baldr 18 Mar 2010, 16:49
Alphonso,
Good old IA-32 processors had 14+32=46 bit logical address space, yet unused since flat model prevails. It's up to a programmer. |
|||
18 Mar 2010, 16:49 |
|
a115433 18 Mar 2010, 17:45
how you address 46 bit?
unreal mode with base > 0? i think it wont work, because cpu will check access no matter what mode ur in ;/ |
|||
18 Mar 2010, 17:45 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.