blob: 2947b42cc411130712f84d98b33cdaa6be3bab42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include "gdt.h"
#include <assert.h>
#include <stdlib.h>
int
main()
{
assert(*(uint8_t *)&null_access == 0x00);
assert(*(uint8_t *)&ktext_access == 0x9a);
assert(*(uint8_t *)&kdata_access == 0x92);
struct SegmentDescriptor_t d;
SegmentDescriptor(&d, 0, 0, 0);
assert(*(uint64_t *)&d == 0);
assert(ktextDescriptor == 0x10);
assert(kdataDescriptor == 0x18);
return EXIT_SUCCESS;
}
|