aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2025-03-18 10:48:24 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2025-03-18 10:48:24 +0000
commitfd557fb19c4ad25fbcb1368a73fddd91921496fd (patch)
tree0b1350083eefcae329250a75245a6aefdbb67a44 /arch/x86_64/include
parent3c01f820a064f3120a46aa3afdd9f88ce9e00db3 (diff)
downloadteachos-fd557fb19c4ad25fbcb1368a73fddd91921496fd.tar.xz
teachos-fd557fb19c4ad25fbcb1368a73fddd91921496fd.zip
Fix invalid bit values in access byte and typo in create_segment_descriptor method
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/arch/context_switching/descriptor_table/access_byte.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86_64/include/arch/context_switching/descriptor_table/access_byte.hpp b/arch/x86_64/include/arch/context_switching/descriptor_table/access_byte.hpp
index bafce8d..646c2ca 100644
--- a/arch/x86_64/include/arch/context_switching/descriptor_table/access_byte.hpp
+++ b/arch/x86_64/include/arch/context_switching/descriptor_table/access_byte.hpp
@@ -44,15 +44,15 @@ namespace teachos::arch::context_switching::descriptor_table
TRAP_GATE = 15, ///< The actual type of sytem segment is a trap gate.
CODE_OR_DATA_SEGMENT = 1U << 4U, ///< Defines a system segment (if 0) or a code/data segment (if 1).
ACCESS_LEVEL_KERNEL =
- 0U << 4U, ///< Highest privileged level used by the kernel to allow for full access of resources.
+ 0U << 5U, ///< Highest privileged level used by the kernel to allow for full access of resources.
ACCESS_LEVEL_ADMIN =
- 2U << 4U, ///< Restricts access to own application and thoose of lower privilege. Should only be used if more
+ 1U << 5U, ///< Restricts access to own application and thoose of lower privilege. Should only be used if more
///< than two privilege levels are required, otherwise using Level 3 and Level 0 is recommended.
ACCESS_LEVEL_PRIVILEGED_USER =
- 4U << 4U, ///< Restricts access to own application and thoose of lower privilege. Should only be used if more
+ 2U << 5U, ///< Restricts access to own application and thoose of lower privilege. Should only be used if more
///< than two privilege levels are required, otherwise using Level 3 and Level 0 is recommended.
- ACCESS_LEVEL_USER = 6U << 4U, ///< Restricts access to only application and their specific memory.
- PRESENT = 1U << 3U << 4U, ///< Present bit; Allows an entry to refer to a valid segment.
+ ACCESS_LEVEL_USER = 3U << 5U, ///< Restricts access to only application and their specific memory.
+ PRESENT = 1U << 7U, ///< Present bit; Allows an entry to refer to a valid segment.
///< Must be set (1) for any valid segment.
};