:: commit 859a10b14219657d25d73b3db9449f5c7a3d456a

mintsuki <mintsuki@protonmail.com> — 2020-09-11 14:35

parents: 2e537412d3

Update stivale specifications

diff --git a/STIVALE.md b/STIVALE.md
index adfa8ff9..661501aa 100644
--- a/STIVALE.md
+++ b/STIVALE.md
@@ -36,12 +36,15 @@ The kernel MUST NOT request to load itself at an address lower than `0x100000`
 field in the stivale header is set to a non-0 value, in which case, it is set to
 the value of `entry_point`.
 
-At entry, the bootloader will have setup paging such that there is a 4GiB identity
-mapped block of memory at `0x0000000000000000`, a 2GiB mapped area of memory
-that maps from `0x0000000000000000` physical to `0x0000000080000000` physical
-to `0xffffffff80000000` virtual. This area is for the higher half kernels.
-Further more, a 4GiB area of memory from `0x0000000000000000` physical to
-`0x0000000100000000` physical to `0xffff800000000000` virtual is mapped.
+At entry, the bootloader will have setup paging mappings as such:
+
+```
+ Base Physical Address -                      Size                      ->  Virtual address
+  0x0000000000000000   -   4 GiB plus any additional memory map entry   ->  0x0000000000000000
+  0x0000000000000000   -   4 GiB plus any additional memory map entry   ->  0xffff800000000000 (4-level paging only)
+  0x0000000000000000   -   4 GiB plus any additional memory map entry   ->  0xff00000000000000 (5-level paging only)
+  0x0000000000000000   -                   0x80000000                   ->  0xffffffff80000000
+```
 
 If the kernel is dynamic and not statically linked, the bootloader will relocate it.
 Furthermore if bit 2 of the flags field in the stivale header is set, the bootloader
diff --git a/STIVALE2.md b/STIVALE2.md
index 4e2ed061..719257e4 100644
--- a/STIVALE2.md
+++ b/STIVALE2.md
@@ -39,10 +39,11 @@ the value of `entry_point`.
 At entry, the bootloader will have setup paging mappings as such:
 
 ```
- Base Physical Address -  Top Physical Address  ->  Virtual address
-  0x0000000000000000   -   0x0000000100000000   ->  0x0000000000000000
-  0x0000000000000000   -   0x0000000100000000   ->  0xffff800000000000
-  0x0000000000000000   -   0x0000000080000000   ->  0xffffffff80000000
+ Base Physical Address -                      Size                      ->  Virtual address
+  0x0000000000000000   -   4 GiB plus any additional memory map entry   ->  0x0000000000000000
+  0x0000000000000000   -   4 GiB plus any additional memory map entry   ->  0xffff800000000000 (4-level paging only)
+  0x0000000000000000   -   4 GiB plus any additional memory map entry   ->  0xff00000000000000 (5-level paging only)
+  0x0000000000000000   -                   0x80000000                   ->  0xffffffff80000000
 ```
 
 If the kernel is dynamic and not statically linked, the bootloader will relocate it.
tab: 248 wrap: offon