Changeset 58803 in vbox for trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg
- Timestamp:
- Nov 20, 2015 5:21:41 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 104257
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/ResetVector/Ia32/PageTables64.asm
r58464 r58803 45 45 46 46 ; 47 %ifdef VBOX 48 ; For OVMF, build some initial page tables at 0x2000000-0x2006000. 49 ; Required because we had to relocate MEMFD where the page table resides 50 ; from 0x800000 to not interfere with certain OS X bootloaders. 51 %else 47 52 ; For OVMF, build some initial page tables at 0x800000-0x806000. 53 %endif 48 54 ; 49 55 ; This range should match with PcdOvmfSecPageTablesBase and … … 57 63 xor eax, eax 58 64 clearPageTablesMemoryLoop: 65 %ifdef VBOX 66 mov dword[ecx * 4 + 0x2000000 - 4], eax 67 %else 59 68 mov dword[ecx * 4 + 0x800000 - 4], eax 69 %endif 60 70 loop clearPageTablesMemoryLoop 61 71 … … 63 73 ; Top level Page Directory Pointers (1 * 512GB entry) 64 74 ; 75 %ifdef VBOX 76 mov dword[0x2000000], 0x2001000 + PAGE_PDP_ATTR 77 %else 65 78 mov dword[0x800000], 0x801000 + PAGE_PDP_ATTR 79 %endif 66 80 67 81 ; 68 82 ; Next level Page Directory Pointers (4 * 1GB entries => 4GB) 69 83 ; 84 %ifdef VBOX 85 mov dword[0x2001000], 0x2002000 + PAGE_PDP_ATTR 86 mov dword[0x2001008], 0x2003000 + PAGE_PDP_ATTR 87 mov dword[0x2001010], 0x2004000 + PAGE_PDP_ATTR 88 mov dword[0x2001018], 0x2005000 + PAGE_PDP_ATTR 89 %else 70 90 mov dword[0x801000], 0x802000 + PAGE_PDP_ATTR 71 91 mov dword[0x801008], 0x803000 + PAGE_PDP_ATTR 72 92 mov dword[0x801010], 0x804000 + PAGE_PDP_ATTR 73 93 mov dword[0x801018], 0x805000 + PAGE_PDP_ATTR 94 %endif 74 95 75 96 ; … … 82 103 shl eax, 21 83 104 add eax, PAGE_2M_PDE_ATTR 105 %ifdef VBOX 106 mov [ecx * 8 + 0x2002000 - 8], eax 107 %else 84 108 mov [ecx * 8 + 0x802000 - 8], eax 109 %endif 85 110 loop pageTableEntriesLoop 86 111 … … 88 113 ; Set CR3 now that the paging structures are available 89 114 ; 115 %ifdef VBOX 116 mov eax, 0x2000000 117 %else 90 118 mov eax, 0x800000 119 %endif 91 120 mov cr3, eax 92 121
Note:
See TracChangeset
for help on using the changeset viewer.