make GDT printing work on all platforms

This commit is contained in:
Quinten Kock 2020-12-09 14:30:34 +01:00
parent 529c1e2a80
commit bb9ffb43ef
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
#include <print/print.h>
#include <stddef.h>
#include "gdt.h"
void print_gdt_ent(uint64_t* ent) {
@ -14,7 +16,7 @@ void print_gdt_ent(uint64_t* ent) {
int bits = (flags&0x2) ? 64 : ((flags&0x4) ? 32 : 16);
uint64_t length = limit * ((flags & 0x8) ? 4096 : 1);
printf("%X (%h): \t", base, length);
printf("%X (%h): \t", (size_t)base, (size_t)length);
if(e == 0) {
puts("NULL");
return;