kernel: adding padding for multi boot information to match size on all archs.
authorReto Achermann <reto.achermann@inf.ethz.ch>
Thu, 25 Jun 2015 20:03:43 +0000 (22:03 +0200)
committerReto Achermann <reto.achermann@inf.ethz.ch>
Thu, 25 Jun 2015 20:03:43 +0000 (22:03 +0200)
Signed-off-by: Reto Achermann <reto.achermann@inf.ethz.ch>

kernel/include/multiboot.h
tools/weever/loader.c

index d6b2580..6546f46 100644 (file)
@@ -102,6 +102,8 @@ struct multiboot_info {
 
 #ifdef __k1om__
     uint8_t     xeon_phi_id;
+#else
+    uint8_t     padding;
 #endif
 };
 
index 8d932c3..7fdbf1a 100644 (file)
@@ -248,7 +248,7 @@ loader(uint64_t magic,
         eabort('E', '4');
     }
 
-    multiboot_info->xeon_phi_id = (uint8_t)bp->xeon_phi_id;
+    multiboot_info->xeon_phi_id = (uint8_t)(bp->xeon_phi_id & 0xff);
 
 
     print_status('S', '3');