]> Joshua Wise's Git repositories - netwatch.git/blobdiff - aseg-paging/traps.c
Force IDT packing with __attribute__((packed)).
[netwatch.git] / aseg-paging / traps.c
index 8184bdb74dcfd39520c825dcb950508a88139cbf..1fc0977bde26cfdb18992485107a190a52b294a2 100644 (file)
@@ -86,13 +86,13 @@ struct pseudo_descriptor {
         short pad;
         unsigned short limit;
         unsigned long linear_base;
         short pad;
         unsigned short limit;
         unsigned long linear_base;
-};
+} __attribute__((packed));
 
 void traps_install(void) {
 
         struct pseudo_descriptor pdesc;
        pdesc.limit = sizeof(idt) - 1;
 
 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);
 
        WRAPPER_INSTALL(idt, TRAP, fault_divide, T_DIVIDE_ERROR);
        WRAPPER_INSTALL(idt, TRAP, fault_gp, T_GENERAL_PROTECTION);
This page took 0.026228 seconds and 4 git commands to generate.