+ mov ax, 0x1000
+ mov es, ax
+ sub eax, eax
+ sub edi, edi
+ mov ecx, 0x400
+ rep stosd
+
+# Add PDEs to point to PTEs for the first 64 MB of RAM.
+# Also add identical PDEs starting at LOADER_PHYS_BASE.
+# See [IA32-v3] section 3.7.6 for a description of the bits in eax.
+
+# A bug in some versions of GAS prevents us from using the straightforward
+# mov es:[di + LOADER_PHYS_BASE / 1024 / 1024], eax
+# so we calculate the displacement in bx instead.
+
+ mov eax, 0x11007
+ mov ecx, 0x11
+ sub di, di
+ mov ebx, LOADER_PHYS_BASE
+ shr ebx, 20
+1: mov es:[di], eax
+ mov es:[bx + di], eax
+ add di, 4
+ add eax, 0x1000
+ loop 1b