Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 02_Architecture/04_GDT.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ Most of this descriptor is unchanged, except for the type field. Bit 4 is cleare

```c
uint64_t user_code = kernel_code | (3 << 13);
gdt_entries[3] = user_code;
gdt_entries[3] = user_code << 32;

uint64_t user_data = kernel_data | (3 << 13);
gdt_entries[4] = user_data;
gdt_entries[4] = user_data << 32;
```

A more complex example of a GDT is the one used by the stivale2 boot protocol:
Expand Down