Separate cdemu disk accesses from regular disk accesses.
[seabios.git] / src / pnpbios.c
index 6daa02541e85accfee19e5e8e4f6658824f8fe35..7d9ece509bb261c4e9c1d505802e33aacc89bffb 100644 (file)
@@ -25,10 +25,10 @@ struct pnpheader {
 } PACKED;
 
 extern struct pnpheader PNPHEADER;
-extern const char pnp_string[];
+extern char pnp_string[];
 
 #if CONFIG_PNPBIOS
-struct pnpheader PNPHEADER __aligned(16) VAR16_32 = {
+struct pnpheader PNPHEADER __aligned(16) VAR16EXPORT = {
     .signature = PNP_SIGNATURE,
     .version = 0x10,
     .length = sizeof(PNPHEADER),
@@ -41,7 +41,7 @@ struct pnpheader PNPHEADER __aligned(16) VAR16_32 = {
 // We need a copy of this string in the 0xf000 segment, but we are not
 // actually a PnP BIOS, so make sure it is *not* aligned, so OSes will
 // not see it if they scan.
-const char pnp_string[] __aligned(2) VAR16_32 = " $PnP";
+char pnp_string[] __aligned(2) VAR16_32 = " $PnP";
 #endif
 
 #define FUNCTION_NOT_SUPPORTED 0x82
@@ -99,5 +99,5 @@ pnp_setup()
 
     PNPHEADER.real_ip = (u32)entry_pnp_real - BUILD_BIOS_ADDR;
     PNPHEADER.prot_ip = (u32)entry_pnp_prot - BUILD_BIOS_ADDR;
-    PNPHEADER.checksum = -checksum((u8*)&PNPHEADER, sizeof(PNPHEADER));
+    PNPHEADER.checksum -= checksum(&PNPHEADER, sizeof(PNPHEADER));
 }