summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2023-03-19 15:43:22 -0400
committerTest_User <hax@andrewyu.org>2023-03-19 15:43:22 -0400
commit155b6ce38153910808bf2f6a82b775af6b09d0f9 (patch)
tree5ea2a0f820db2e47ee5265583eb691d385c6134f
parentba4ef2bfd07be3ec9a0ff0f167755d0f239b9d5c (diff)
downloadspecification-155b6ce38153910808bf2f6a82b775af6b09d0f9.tar.gz
specification-155b6ce38153910808bf2f6a82b775af6b09d0f9.zip
Add less-braindead paging idea as an optional feature (incomplete)
-rw-r--r--cpu/features/all.txt1
-rw-r--r--cpu/features/optional.txt1
-rw-r--r--cpu/features/optional/segmented_paging/structures.txt25
3 files changed, 27 insertions, 0 deletions
diff --git a/cpu/features/all.txt b/cpu/features/all.txt
index e69de29..222e764 100644
--- a/cpu/features/all.txt
+++ b/cpu/features/all.txt
@@ -0,0 +1 @@
+segmented paging
diff --git a/cpu/features/optional.txt b/cpu/features/optional.txt
new file mode 100644
index 0000000..222e764
--- /dev/null
+++ b/cpu/features/optional.txt
@@ -0,0 +1 @@
+segmented paging
diff --git a/cpu/features/optional/segmented_paging/structures.txt b/cpu/features/optional/segmented_paging/structures.txt
new file mode 100644
index 0000000..d7de77b
--- /dev/null
+++ b/cpu/features/optional/segmented_paging/structures.txt
@@ -0,0 +1,25 @@
+TODO: Assign bit in FR
+
+Offset: 9 + (n/16)
+
+Replaces the offset field in the gdt with the following:
+ Width: half the number of bits for the current mode
+ Value: pointer to array of chunks, physical address
+
+Array of chunks:
+ Width: half the number of bits for the current mode
+
+ Value:
+ Upper (n - offset) bits:
+ Pointer to physical address >> offset
+ Lowest bit:
+ Present
+ Remaining bits:
+ Unused by this system
+
+
+ Each value in the array represents 1 << offset bytes of memory.
+ Physical address is calculated from a reference such that:
+ Physical address = (gdt[segment].chunks[addr>>offset].address << offset) | (lowest offset bits of addr)
+
+ Triggers a page fault if the present bit is not set