make GDT printing work on all platforms
This commit is contained in:
parent
529c1e2a80
commit
bb9ffb43ef
|
|
@ -1,5 +1,7 @@
|
||||||
#include <print/print.h>
|
#include <print/print.h>
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#include "gdt.h"
|
#include "gdt.h"
|
||||||
|
|
||||||
void print_gdt_ent(uint64_t* ent) {
|
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);
|
int bits = (flags&0x2) ? 64 : ((flags&0x4) ? 32 : 16);
|
||||||
|
|
||||||
uint64_t length = limit * ((flags & 0x8) ? 4096 : 1);
|
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) {
|
if(e == 0) {
|
||||||
puts("NULL");
|
puts("NULL");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue