- mov $0x1000, %ax
- mov %ax, %es
- subl %eax, %eax
- subl %edi, %edi
- movl $0x400, %ecx
- rep stosl
-
-# Set PDEs for 0 and LOADER_PHYS_BASE to point to the page table.
-
- movl $0x11000 | PG_U | PG_W | PG_P, %eax
- movl %eax, %es:0
- movl %eax, %es:LOADER_PHYS_BASE >> 20
-
-# Initialize page table.
-
- movl $PG_U | PG_W | PG_P, %eax
- movl $0x400, %ecx
-1: stosl
- addl $0x1000, %eax
+# Set up one-to-map linear to physical map for the first 64 MB of RAM.
+# See [IA32-v3] section 3.7.6 for a description of the bits in eax.
+
+ mov ax, 0x1100
+ mov es, ax
+ mov eax, 0x7
+ mov ecx, 0x4000
+ sub edi, edi
+1: mov es:[di], eax
+ add di, 4
+ add eax, 0x1000