diff options
-rw-r--r-- | src/biosvar.h | 6 | ||||
-rw-r--r-- | src/boot.c | 4 | ||||
-rw-r--r-- | src/coreboot.c | 3 | ||||
-rw-r--r-- | src/optionroms.c | 2 | ||||
-rw-r--r-- | src/pcibios.c | 2 | ||||
-rw-r--r-- | src/pirtable.c | 2 |
6 files changed, 10 insertions, 9 deletions
diff --git a/src/biosvar.h b/src/biosvar.h index 6dfcbc71..4571d5d2 100644 --- a/src/biosvar.h +++ b/src/biosvar.h @@ -218,7 +218,7 @@ struct ipl_entry_s { u16 type; u16 flags; u32 vector; - u32 description; + char *description; }; struct ipl_s { @@ -254,6 +254,8 @@ struct fdpt_s { u8 checksum; } PACKED; +struct pir_header; + struct extended_bios_data_area_s { u8 size; u8 reserved1[0x21]; @@ -275,7 +277,7 @@ struct extended_bios_data_area_s { // Physical memory available. u32 ram_size; // Amount of continuous ram under 4Gig u64 ram_size_over4G; // Amount of continuous ram >4Gig - u32 pir_loc; + struct pir_header *pir_loc; // ATA Driver data struct ata_s ata; @@ -34,11 +34,11 @@ printf_bootdev(u16 bootdev) printf("%s", drivetypes[type]); /* print product string if BEV */ - void *far_description = (void*)GET_EBDA(ipl.table[bootdev].description); + char *far_description = GET_EBDA(ipl.table[bootdev].description); if (type == 4 && far_description != 0) { char description[33]; /* first 32 bytes are significant */ - memcpy_far(MAKE_FARPTR(GET_SEG(SS), &description), far_description, 32); + memcpy_far(MAKE_FARPTR(GET_SEG(SS), description), far_description, 32); /* terminate string */ description[32] = 0; printf(" [%.s]", description); diff --git a/src/coreboot.c b/src/coreboot.c index d92a67fc..0079811e 100644 --- a/src/coreboot.c +++ b/src/coreboot.c @@ -34,7 +34,7 @@ copy_pir(void *pos) } dprintf(1, "Copying PIR from %p to %x\n", pos, bios_table_cur_addr); memcpy((void*)bios_table_cur_addr, pos, p->size); - SET_EBDA(pir_loc, bios_table_cur_addr); + SET_EBDA(pir_loc, (void*)bios_table_cur_addr); bios_table_cur_addr += p->size; } @@ -56,7 +56,6 @@ copy_mptable(void *pos) } dprintf(1, "Copying MPTABLE from %p to %x\n", pos, bios_table_cur_addr); memcpy((void*)bios_table_cur_addr, pos, length); - SET_EBDA(pir_loc, bios_table_cur_addr); bios_table_cur_addr += length; } diff --git a/src/optionroms.c b/src/optionroms.c index 45d348f8..2d8fe11c 100644 --- a/src/optionroms.c +++ b/src/optionroms.c @@ -130,7 +130,7 @@ rom_scan(u32 start, u32 end) u16 desc = pnp->productname; if (desc) - ip->description = (u32)MAKE_FARPTR(FARPTR_TO_SEG(rom), desc); + ip->description = MAKE_FARPTR(FARPTR_TO_SEG(rom), desc); ebda->ipl.count++; } diff --git a/src/pcibios.c b/src/pcibios.c index b189f0bf..c8281cba 100644 --- a/src/pcibios.c +++ b/src/pcibios.c @@ -111,7 +111,7 @@ handle_1ab10d(struct bregs *regs) static void handle_1ab10e(struct bregs *regs) { - struct pir_header *pirtable_far = (struct pir_header*)GET_EBDA(pir_loc); + struct pir_header *pirtable_far = GET_EBDA(pir_loc); if (! pirtable_far) { set_code_fail(regs, RET_FUNC_NOT_SUPPORTED); return; diff --git a/src/pirtable.c b/src/pirtable.c index c016d6d8..705cc503 100644 --- a/src/pirtable.c +++ b/src/pirtable.c @@ -96,5 +96,5 @@ create_pirtable() PIR_TABLE.pir.signature = PIR_SIGNATURE; PIR_TABLE.pir.checksum = -checksum((u8*)&PIR_TABLE, sizeof(PIR_TABLE)); - SET_EBDA(pir_loc, (u32)&PIR_TABLE); + SET_EBDA(pir_loc, &PIR_TABLE.pir); } |