[coreboot] r3441 - in trunk/coreboot-v2/src/devices: . emulator emulator/pcbios emulator/x86emu

svn at coreboot.org svn at coreboot.org
Fri Aug 1 13:25:42 CEST 2008


Author: stepan
Date: 2008-08-01 13:25:41 +0200 (Fri, 01 Aug 2008)
New Revision: 3441

Modified:
   trunk/coreboot-v2/src/devices/emulator/biosemu.c
   trunk/coreboot-v2/src/devices/emulator/pcbios/pcibios.c
   trunk/coreboot-v2/src/devices/emulator/pcbios/pcibios.h
   trunk/coreboot-v2/src/devices/emulator/x86emu/decode.h
   trunk/coreboot-v2/src/devices/pci_device.c
   trunk/coreboot-v2/src/devices/pci_rom.c
   trunk/coreboot-v2/src/devices/pciexp_device.c
Log:
fix typos and warnings in the device tree code (trivial)

Signed-off-by: Stefan Reinauer <stepan at coresystems.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>



Modified: trunk/coreboot-v2/src/devices/emulator/biosemu.c
===================================================================
--- trunk/coreboot-v2/src/devices/emulator/biosemu.c	2008-08-01 11:21:47 UTC (rev 3440)
+++ trunk/coreboot-v2/src/devices/emulator/biosemu.c	2008-08-01 11:25:41 UTC (rev 3441)
@@ -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 @@
 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)
 {

Modified: trunk/coreboot-v2/src/devices/emulator/pcbios/pcibios.c
===================================================================
--- trunk/coreboot-v2/src/devices/emulator/pcbios/pcibios.c	2008-08-01 11:21:47 UTC (rev 3440)
+++ trunk/coreboot-v2/src/devices/emulator/pcbios/pcibios.c	2008-08-01 11:25:41 UTC (rev 3441)
@@ -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) {

Modified: trunk/coreboot-v2/src/devices/emulator/pcbios/pcibios.h
===================================================================
--- trunk/coreboot-v2/src/devices/emulator/pcbios/pcibios.h	2008-08-01 11:21:47 UTC (rev 3440)
+++ trunk/coreboot-v2/src/devices/emulator/pcbios/pcibios.h	2008-08-01 11:25:41 UTC (rev 3441)
@@ -25,4 +25,7 @@
 	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 */

Modified: trunk/coreboot-v2/src/devices/emulator/x86emu/decode.h
===================================================================
--- trunk/coreboot-v2/src/devices/emulator/x86emu/decode.h	2008-08-01 11:21:47 UTC (rev 3440)
+++ trunk/coreboot-v2/src/devices/emulator/x86emu/decode.h	2008-08-01 11:25:41 UTC (rev 3441)
@@ -79,6 +79,7 @@
 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++   	*/

Modified: trunk/coreboot-v2/src/devices/pci_device.c
===================================================================
--- trunk/coreboot-v2/src/devices/pci_device.c	2008-08-01 11:21:47 UTC (rev 3440)
+++ trunk/coreboot-v2/src/devices/pci_device.c	2008-08-01 11:25:41 UTC (rev 3441)
@@ -647,6 +647,7 @@
 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 @@
 	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 @@
 	}
 	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 @@
 		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)

Modified: trunk/coreboot-v2/src/devices/pci_rom.c
===================================================================
--- trunk/coreboot-v2/src/devices/pci_rom.c	2008-08-01 11:21:47 UTC (rev 3440)
+++ trunk/coreboot-v2/src/devices/pci_rom.c	2008-08-01 11:25:41 UTC (rev 3441)
@@ -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 @@
 		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 @@
 	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 @@
 #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",

Modified: trunk/coreboot-v2/src/devices/pciexp_device.c
===================================================================
--- trunk/coreboot-v2/src/devices/pciexp_device.c	2008-08-01 11:21:47 UTC (rev 3440)
+++ trunk/coreboot-v2/src/devices/pciexp_device.c	2008-08-01 11:25:41 UTC (rev 3441)
@@ -34,7 +34,7 @@
 		/* 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"
 }
 





More information about the coreboot mailing list