aboutsummaryrefslogtreecommitdiff
path: root/notes.txt
diff options
context:
space:
mode:
Diffstat (limited to 'notes.txt')
-rw-r--r--notes.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/notes.txt b/notes.txt
new file mode 100644
index 0000000..9016799
--- /dev/null
+++ b/notes.txt
@@ -0,0 +1,23 @@
+ /* Defenitions:
+ * Segment:
+ * A logically contiguous chunk of memory with consistent properties from the cpus perspective
+ * - Just a bunch of memory dedicated for a specific purpose
+ * Segment Register:
+ * A register of the CPU that refers to a segment for a particular purpose (CS, DS, SS, ES)
+ * or for general use. (FS, GS)
+ * - Code segment, Data segment, ...
+ * Segment Selector:
+ * A reference to a descriptor, which you can load into a segment register; the selector is an offset
+ * into a descriptor table pointing to one of its entries.
+ * These entries are typically 8 bytes long, therefore
+ * bits 3 and up only declare the descriptor table entry offset
+ * bit 2 specifies GDT or LDT
+ * bits 0-1 declare ring level that needs to correspond to the descriptor table entry's DPL field.
+ * GENERAL PROTECTION FAULT if it doesn't
+ * If it does correspond then the CPL level of the selector used is changed accordingly
+ * - A pointer to an entry in the DT
+ * Segment Descriptor:
+ * An entry in a descriptor table.
+ * These are a binary data structure that tells the CPU the attributes of a given segment
+ * - A binary number that describes a segment
+ */