fix typos and warnings in the device tree code (trivial)
authorStefan Reinauer <stepan@coresystems.de>
Fri, 1 Aug 2008 11:25:41 +0000 (11:25 +0000)
committerStefan Reinauer <stepan@openbios.org>
Fri, 1 Aug 2008 11:25:41 +0000 (11:25 +0000)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3441 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/devices/emulator/biosemu.c
src/devices/emulator/pcbios/pcibios.c
src/devices/emulator/pcbios/pcibios.h
src/devices/emulator/x86emu/decode.h
src/devices/pci_device.c
src/devices/pci_rom.c
src/devices/pciexp_device.c

index e38541edd36b593fd59adc6554dd333d676b2a1b..c0584354d2eb7874c12544ab722a88431956cab8 100644 (file)
@@ -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)
 {
index be5c91a0f1f2d3347a91efbbabf701fd0952e65e..3d645f7359d295293ddb2968983fae4f7bb6950b 100644 (file)
@@ -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) {
index 75a1253d25cfc5572d709b6712d1f99fc0a1f31e..2ad9b83561cc05da6bf6bc9c351cb8e3cbd0385a 100644 (file)
@@ -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 */
index 321a345399fe4228327a2a7105c0a7a3bf9cf877..99ed7f6f35a8a4afdbc3d8083451f8170f2d8933 100644 (file)
@@ -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++           */
index f65849ef06556dd98fde54494915f74cba3042b6..00910f2a8b5cade9c5c646ad9004ea32c5fd3280 100644 (file)
@@ -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)
index d47a7e3f5136228e7b1857e793c23e0a522ffab2..1b7e4bffa8b854b9444c383ebb1d9387673b9b17 100644 (file)
@@ -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",
index cf6104ed95ff3d20c4a1eeff1f308c0b9c1c540b..2bc7987b696b6ebdc201c43dd0348a0ccbca130e 100644 (file)
@@ -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"
 }