diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/emulator/biosemu.c | 6 | ||||
-rw-r--r-- | src/devices/emulator/pcbios/pcibios.c | 4 | ||||
-rw-r--r-- | src/devices/emulator/pcbios/pcibios.h | 5 | ||||
-rw-r--r-- | src/devices/emulator/x86emu/decode.h | 1 | ||||
-rw-r--r-- | src/devices/pci_device.c | 7 | ||||
-rw-r--r-- | src/devices/pci_rom.c | 9 | ||||
-rw-r--r-- | src/devices/pciexp_device.c | 2 |
7 files changed, 23 insertions, 11 deletions
diff --git a/src/devices/emulator/biosemu.c b/src/devices/emulator/biosemu.c index e38541edd3..c0584354d2 100644 --- a/src/devices/emulator/biosemu.c +++ b/src/devices/emulator/biosemu.c @@ -7,6 +7,8 @@ #include <x86emu/x86emu.h> +#include "pcbios/pcibios.h" + #define MEM_WB(where, what) wrb(where, what) #define MEM_WW(where, what) wrw(where, what) #define MEM_WL(where, what) wrl(where, what) @@ -22,6 +24,10 @@ void x_outw(u16 port, u16 val); u32 x_inl(u16 port); void x_outl(u16 port, u32 val); + +// sys.c +void X86EMU_setMemBase(void *base, size_t size); + /* general software interrupt handler */ u32 getIntVect(int num) { diff --git a/src/devices/emulator/pcbios/pcibios.c b/src/devices/emulator/pcbios/pcibios.c index be5c91a0f1..3d645f7359 100644 --- a/src/devices/emulator/pcbios/pcibios.c +++ b/src/devices/emulator/pcbios/pcibios.c @@ -7,9 +7,9 @@ #include "pcibios.h" -int pcibios_handler() +int pcibios_handler(void) { - int i, ret = 0; + int ret = 0; struct device *dev = 0; switch (X86_AX) { diff --git a/src/devices/emulator/pcbios/pcibios.h b/src/devices/emulator/pcbios/pcibios.h index 75a1253d25..2ad9b83561 100644 --- a/src/devices/emulator/pcbios/pcibios.h +++ b/src/devices/emulator/pcbios/pcibios.h @@ -25,4 +25,7 @@ enum { SET_FAILED = 0x88, BUFFER_TOO_SMALL = 0x89 }; -#endif /* PCI_BIOS_H */
\ No newline at end of file + +int pcibios_handler(void); + +#endif /* PCI_BIOS_H */ diff --git a/src/devices/emulator/x86emu/decode.h b/src/devices/emulator/x86emu/decode.h index 321a345399..99ed7f6f35 100644 --- a/src/devices/emulator/x86emu/decode.h +++ b/src/devices/emulator/x86emu/decode.h @@ -79,6 +79,7 @@ u16* decode_rm_seg_register(int reg); unsigned decode_rm00_address(int rm); unsigned decode_rm01_address(int rm); unsigned decode_rm10_address(int rm); +unsigned decode_rmXX_address(int mod, int rm); #ifdef __cplusplus } /* End of "C" linkage for C++ */ diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c index f65849ef06..00910f2a8b 100644 --- a/src/devices/pci_device.c +++ b/src/devices/pci_device.c @@ -647,6 +647,7 @@ void pci_dev_set_subsystem(device_t dev, unsigned vendor, unsigned device) void pci_dev_init(struct device *dev) { #if CONFIG_PCI_ROM_RUN == 1 || CONFIG_VGA_ROM_RUN == 1 + void run_bios(struct device * dev, unsigned long addr); struct rom_header *rom, *ram; #if CONFIG_PCI_ROM_RUN != 1 @@ -666,7 +667,7 @@ void pci_dev_init(struct device *dev) if (ram == NULL) return; - run_bios(dev, ram); + run_bios(dev, (unsigned long)ram); #if CONFIG_CONSOLE_VGA == 1 /* vga_inited is a trigger of the VGA console code. */ @@ -1070,7 +1071,7 @@ unsigned int pci_scan_bus(struct bus *bus, } post_code(0x25); - /* Die if any leftover Static devices are are found. + /* Die if any left over static devices are are found. * There's probably a problem in the Config.lb. */ if(old_devices) { @@ -1078,7 +1079,7 @@ unsigned int pci_scan_bus(struct bus *bus, for(left = old_devices; left; left = left->sibling) { printk_err("%s\n", dev_path(left)); } - die("PCI: Left over static devices. Check your Config.lb\n"); + printk_warning("PCI: Left over static devices. Check your mainboard Config.lb\n"); } /* For all children that implement scan_bus (i.e. bridges) diff --git a/src/devices/pci_rom.c b/src/devices/pci_rom.c index d47a7e3f51..1b7e4bffa8 100644 --- a/src/devices/pci_rom.c +++ b/src/devices/pci_rom.c @@ -26,6 +26,7 @@ #include <device/pci.h> #include <device/pci_ids.h> #include <device/pci_ops.h> +#include <string.h> struct rom_header * pci_rom_probe(struct device *dev) { @@ -62,7 +63,7 @@ struct rom_header * pci_rom_probe(struct device *dev) return NULL; } - rom_data = (unsigned char *) rom_header + le32_to_cpu(rom_header->data); + rom_data = (struct pci_data *) ((void *)rom_header + le32_to_cpu(rom_header->data)); printk_spew("PCI ROM Image, Vendor %04x, Device %04x,\n", rom_data->vendor, rom_data->device); if (dev->vendor != rom_data->vendor || dev->device != rom_data->device) { @@ -95,8 +96,8 @@ struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_heade rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS); do { - rom_header = (unsigned char *) rom_header + image_size; // get next image - rom_data = (unsigned char *) rom_header + le32_to_cpu(rom_header->data); + rom_header = (struct rom_header *)((void *) rom_header + image_size); // get next image + rom_data = (struct pci_data *)((void *) rom_header + le32_to_cpu(rom_header->data)); image_size = le32_to_cpu(rom_data->ilen) * 512; } while ((rom_data->type!=0) && (rom_data->indicator!=0)); // make sure we got x86 version @@ -111,7 +112,7 @@ struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_heade #endif printk_debug("copying VGA ROM Image from 0x%x to 0x%x, 0x%x bytes\n", rom_header, PCI_VGA_RAM_IMAGE_START, rom_size); - memcpy(PCI_VGA_RAM_IMAGE_START, rom_header, rom_size); + memcpy((void *)PCI_VGA_RAM_IMAGE_START, rom_header, rom_size); return (struct rom_header *) (PCI_VGA_RAM_IMAGE_START); } else { printk_debug("copying non-VGA ROM Image from 0x%x to 0x%x, 0x%x bytes\n", diff --git a/src/devices/pciexp_device.c b/src/devices/pciexp_device.c index cf6104ed95..2bc7987b69 100644 --- a/src/devices/pciexp_device.c +++ b/src/devices/pciexp_device.c @@ -34,7 +34,7 @@ static void pciexp_tune_dev(device_t dev) /* error... */ return; } - printk_debug("PCIEXP: tunning %s\n", dev_path(dev)); + printk_debug("PCIe: tunning %s\n", dev_path(dev)); #warning "IMPLEMENT PCI EXPRESS TUNING" } |