Skip to contentSkip to conversation

pci: Remove parameter 'class' of pci_rom_load()

PATCH New Bin Meng 2 participants 7 messages Apr 24, 2015 – Apr 25, 2015 1 message not in the archive PCI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Bin Meng

author
#1 lore raw

PATCH 2/3 pci: Remove parameter 'class' of pci_rom_load()

pci_rom_load() does not use its parameter 'class', so remove it.

---

 drivers/pci/pci_rom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/pci_rom.c +2 -2
index 49c118d..37450c8 100644
@@ -139,7 +139,7 @@ static int pci_rom_probe(pci_dev_t dev, uint class,
 	return 0;
 }
 
-int pci_rom_load(uint16_t class, struct pci_rom_header *rom_header,
+int pci_rom_load(struct pci_rom_header *rom_header,
 		 struct pci_rom_header **ram_headerp)
 {
 	struct pci_rom_data *rom_data;
@@ -253,7 +253,7 @@ int pci_run_vga_bios(pci_dev_t dev, int (*int15_handler)(void), int exec_method)
 	if (ret)
 		return ret;
 
-	ret = pci_rom_load(class, rom, &ram);
+	ret = pci_rom_load(rom, &ram);
 	if (ret)
 		return ret;
 
Signature · 1 line
1.8.2.1
#3 lore raw

PATCH 2/3 pci: Remove parameter 'class' of pci_rom_load()

Quoted 10 lines · Simon Glass
Quoted 7 lines · Bin Meng

pci_rom_load() does not use its parameter 'class', so remove it.

---

 drivers/pci/pci_rom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to u-boot-x86, thanks!

author
#4 lore raw

PATCH 3/3 biosemu: Do not free vga_info->BIOSImage when it is 0xc0000

In reply to a message not in the archive

For x86, vga_info->BIOSImage points to 0xc0000 which cannot be freed.

---

 drivers/bios_emulator/atibios.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/bios_emulator/atibios.c +2 -1
index 7ea5fa6..dec6230 100644
@@ -502,7 +502,8 @@ int biosemu_run(pci_dev_t pcidev, uchar *bios_rom, int bios_len,
 	*/
 	if (clean_up) {
 		BE_exit();
-		if (vga_info->BIOSImage)
+		if (vga_info->BIOSImage &&
+		    (u32)(vga_info->BIOSImage) != 0xc0000)
 			free(vga_info->BIOSImage);
 		free(vga_info);
 		vga_info = NULL;
Signature · 1 line
1.8.2.1
#7 lore raw

PATCH 3/3 biosemu: Do not free vga_info->BIOSImage when it is 0xc0000

Quoted 7 lines · Simon Glass
Quoted 6 lines · Simon Glass
Quoted 5 lines · Bin Meng

For x86, vga_info->BIOSImage points to 0xc0000 which cannot be freed.

---

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
 drivers/bios_emulator/atibios.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied to u-boot-x86, thanks!