From f1dee4bc58e4bfb97a1b41831c5d4fc327882991 Mon Sep 17 00:00:00 2001 From: Nic Gaffney Date: Mon, 5 Feb 2024 22:28:34 -0600 Subject: random shit --- notes.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 notes.txt (limited to 'notes.txt') 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 + */ -- cgit v1.2.3