aboutsummaryrefslogtreecommitdiff
path: root/i686/gdt.h
diff options
context:
space:
mode:
Diffstat (limited to 'i686/gdt.h')
-rw-r--r--i686/gdt.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/i686/gdt.h b/i686/gdt.h
index 9148c3d..f00ff7f 100644
--- a/i686/gdt.h
+++ b/i686/gdt.h
@@ -14,9 +14,9 @@ struct __attribute__((packed)) Access {
enum Ring privilege : 2; // descriptor privilege level
bool present : 1; // true for every active segment
};
-_Static_assert(sizeof(struct Access) == 1);
+_Static_assert(sizeof(struct Access) == 1, "access byte size");
-static const struct Access null_access = {};
+static const struct Access null_access = {false, false, false, false, false, false, false};
static const struct Access ktext_access = {.readwrite = true, .executable = true, .segment = true, .present = true};
static const struct Access kdata_access = {.readwrite = true, .segment = true, .present = true};
@@ -43,7 +43,7 @@ struct __attribute__((packed)) SegmentDescriptor_t {
bool granularity : 1; // limit scaled by 4k when set
uint8_t base_31_24; // high bits of segment address
};
-_Static_assert(sizeof(struct SegmentDescriptor_t) == 8);
+_Static_assert(sizeof(struct SegmentDescriptor_t) == 8, "segment descriptor size");
void SegmentDescriptor(struct SegmentDescriptor_t *self, unsigned base, unsigned limit, uint8_t access);