aboutsummaryrefslogtreecommitdiff
path: root/i686/gdt.h
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2022-11-02 23:09:18 +0200
committeraqua <aqua@iserlohn-fortress.net>2022-11-02 23:09:18 +0200
commit509bf85036b3c345f832558a299257effabba108 (patch)
tree0dda6c4fd5e072410d958b65af90755c5014b514 /i686/gdt.h
parentmakefile: make all target the default (diff)
downloadkernel-509bf85036b3c345f832558a299257effabba108.tar.xz
fix compiler warnings
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);