X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/ed22a6995cddb7b61503fdca859267ef85b3bdd3..2d34b5d2cb94b7976fa40e954bcf060bdb5856c2:/aseg-paging/traps.c?ds=inline diff --git a/aseg-paging/traps.c b/aseg-paging/traps.c index 8184bdb..1fc0977 100644 --- a/aseg-paging/traps.c +++ b/aseg-paging/traps.c @@ -86,13 +86,13 @@ struct pseudo_descriptor { short pad; unsigned short limit; unsigned long linear_base; -}; +} __attribute__((packed)); void traps_install(void) { struct pseudo_descriptor pdesc; pdesc.limit = sizeof(idt) - 1; - pdesc.linear_base = memory_v2p(&idt); + pdesc.linear_base = v2p(&idt); WRAPPER_INSTALL(idt, TRAP, fault_divide, T_DIVIDE_ERROR); WRAPPER_INSTALL(idt, TRAP, fault_gp, T_GENERAL_PROTECTION);