svn | 14 Aug 02:02 2008

r758 - coreboot-v3/device

Author: rminnich
Date: 2008-08-14 02:02:27 +0200 (Thu, 14 Aug 2008)
New Revision: 758

Modified:
   coreboot-v3/device/Kconfig
   coreboot-v3/device/Makefile
   coreboot-v3/device/device_util.c
Log:

Emergency patch for an ancient bug in device_util.c, self-acked: 
Signed-off-by: Ronald G. Minnich <rminnich <at> gmail.com>
Acked-by: : Ronald G. Minnich <rminnich <at> gmail.com>
smbus_ops patched
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 <at> gmx.net>

Modified: coreboot-v3/device/Kconfig
===================================================================
--- coreboot-v3/device/Kconfig	2008-08-13 17:21:09 UTC (rev 757)
+++ coreboot-v3/device/Kconfig	2008-08-14 00:02:27 UTC (rev 758)
 <at>  <at>  -95,5 +95,19  <at>  <at> 
 	help
 	  Enable support for Suspend-to-RAM (S3) functionality.

+config PCI_64BIT_PREF_MEM
+	bool "64 bit prefetchable memory addresses"
+	help
+		Enable support for 64-bit prefetchable memory addresses in PCI. 
+
+config HW_MEM_HOLE_SIZEK
(Continue reading)

svn | 14 Aug 03:40 2008

r759 - coreboot-v3/device

Author: hailfinger
Date: 2008-08-14 03:40:31 +0200 (Thu, 14 Aug 2008)
New Revision: 759

Modified:
   coreboot-v3/device/hypertransport.c
   coreboot-v3/device/pci_device.c
Log:
The device code had several unclear messages, leading to
confusion when analyzing the logs. Improve readability.

This code may be obsolete, but that's not entriely sure yet.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 <at> gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 <at> gmx.net>

Modified: coreboot-v3/device/hypertransport.c
===================================================================
--- coreboot-v3/device/hypertransport.c	2008-08-14 00:02:27 UTC (rev 758)
+++ coreboot-v3/device/hypertransport.c	2008-08-14 01:40:31 UTC (rev 759)
 <at>  <at>  -580,10 +580,11  <at>  <at> 
 	 */
 	if (old_devices) {
 		struct device *left;
+		printk(BIOS_INFO, "HT: Left over static devices:\n");
 		for (left = old_devices; left; left = left->sibling) {
-			printk(BIOS_DEBUG, "%s\n", dev_path(left));
+			printk(BIOS_INFO, "%s\n", dev_path(left));
 		}
-		printk(BIOS_ERR, "HT: Left over static devices.\n");
(Continue reading)

Carl-Daniel Hailfinger | 14 Aug 04:10 2008
Picon
Picon

[PATCH] v3: improve PCI device doxygen comments and printks

Improve/fix PCI device doxygen comments and printks. As a bonus, the
boot messages are more understandable now.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 <at> gmx.net>

Index: corebootv3-pci_device_better_prints_comments/device/pci_device.c
===================================================================
--- corebootv3-pci_device_better_prints_comments/device/pci_device.c	(Revision 759)
+++ corebootv3-pci_device_better_prints_comments/device/pci_device.c	(Arbeitskopie)
 <at>  <at>  -929,12 +929,15  <at>  <at> 
 /** 
  * Scan a PCI bus.
  *
- * Determine the existence of a given PCI device.
+ * Determine the existence of a given PCI device. Allocate a new struct device
+ * if dev==NULL was passed in and the device exists.
  *
+ *  <at> param dev Pointer to the device structure if it already exists or NULL
  *  <at> param bus Pointer to the bus structure.
  *  <at> param devfn A device/function number.
  *  <at> return The device structure for the device (if found)
- *         or the NULL if no device is found.
+ *         or NULL if no device is found and dev==NULL was passed in
+ *         or the device structure with enabled=0 if no device is found.
  */
 struct device *pci_probe_dev(struct device *dev, struct bus *bus,
 			     unsigned int devfn)
 <at>  <at>  -990,8 +993,8  <at>  <at> 
 		if ((id == 0xffffffff) || (id == 0x00000000) ||
 		    (id == 0x0000ffff) || (id == 0xffff0000)) {
(Continue reading)

Carl-Daniel Hailfinger | 14 Aug 04:19 2008
Picon
Picon

[PATCH] v3: factor out PCI subsystem ID setting

Factor out PCI subsystem ID setting. This cleans up the code as well,
arguably fixes some strange behaviour and prepares the code for
per-device subsystem ID setting.
It's the first step to achieve the per-device subsystem goal.

Boot tested on qemu.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 <at> gmx.net>

Index: corebootv3-pci_device_subsystem_id/device/pci_device.c
===================================================================
--- corebootv3-pci_device_subsystem_id/device/pci_device.c	(Revision 759)
+++ corebootv3-pci_device_subsystem_id/device/pci_device.c	(Arbeitskopie)
 <at>  <at>  -620,26 +620,47  <at>  <at> 
 	printk(BIOS_SPEW, "Adding RAM resource (%lld bytes)\n", res->size);
 }

-void pci_dev_enable_resources(struct device *dev)
+void pci_dev_set_subsystem_wrapper(struct device *dev)
 {
 	const struct pci_operations *ops;
-	u16 command;
+	u16 vendor = 0;
+	u16 device = 0;

+#warning Per-device subsystem ID has to be set here, but for that we have to extend the dts.
+
+#ifdef HAVE_MAINBOARD_PCI_SUBSYSTEM_ID
+	/* If there's no explicit subsystem ID for this device and the device
+	 * is onboard, use the board defaults. */
(Continue reading)

Carl-Daniel Hailfinger | 14 Aug 04:25 2008
Picon
Picon

Re: [PATCH] v3: move mcp55 subsystem ID setting to v3 model

Use the correct MCP55 PCI subsystem ID setting function.

This fixes a genuine bug in the MCP55 code.

Moving this away from PCI ops is the next goal.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 <at> gmx.net>

Index: corebootv3-mcp55_subsystem/southbridge/nvidia/mcp55/mcp55.h
===================================================================
--- corebootv3-mcp55_subsystem/southbridge/nvidia/mcp55/mcp55.h	(Revision 759)
+++ corebootv3-mcp55_subsystem/southbridge/nvidia/mcp55/mcp55.h	(Arbeitskopie)
 <at>  <at>  -22,6 +22,10  <at>  <at> 
 #ifndef MCP55_H
 #define MCP55_H

+#define PCI_MCP55_SUBSYSTEM_VENDOR_ID 0x40

+void mcp55_pci_dev_set_subsystem(struct device *dev, unsigned int vendor,
+			   unsigned int device);
+struct pci_operations mcp55_pci_dev_ops_pci;

 #endif /* MCP55_H */
Index: corebootv3-mcp55_subsystem/southbridge/nvidia/mcp55/ide.c
===================================================================
--- corebootv3-mcp55_subsystem/southbridge/nvidia/mcp55/ide.c	(Revision 759)
+++ corebootv3-mcp55_subsystem/southbridge/nvidia/mcp55/ide.c	(Arbeitskopie)
 <at>  <at>  -68,12 +68,6  <at>  <at> 
 #ifdef CONFIG_PCI_ROM_RUN
 	pci_dev_init(dev);
(Continue reading)

Carl-Daniel Hailfinger | 14 Aug 04:33 2008
Picon
Picon

Re: [PATCH] v3: introduce generic global variable storage

Ping?

Getting this in is both bugfix and preparation for more goodness.

Regards,
Carl-Daniel

On 10.08.2008 18:00, Carl-Daniel Hailfinger wrote:
> On 10.08.2008 14:03, Carl-Daniel Hailfinger wrote:
>   
>> On 10.08.2008 03:49, ron minnich wrote:
>>   
>>     
>>> On Sat, Aug 9, 2008 at 5:45 PM, Carl-Daniel Hailfinger wrote:
>>>   
>>>     
>>>       
>>>> +struct global_vars {
>>>> +#ifdef CONFIG_CONSOLE_BUFFER
>>>> +       struct printk_buffer *printk_buffer;
>>>> +#endif
>>>> +};
>>>>     
>>>>       
>>>>         
>>> I think you should always leave the struct the same size and let it
>>> have struct members that are in some cases unused.
>>>   
>>>     
>>>       
(Continue reading)

Carl-Daniel Hailfinger | 14 Aug 04:43 2008
Picon
Picon

v3: ROMCC artifact TODO

Hi,

attached is a list of occurences where we use the plain "unsigned" type
which was once the preferred type for ROMCC compiled code. For v3, an
adjustment to the real desired sizes of these types would be beneficial.
Be warned that this can't be automated.

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/

./southbridge/nvidia/mcp55/smbus.c:	unsigned device;
./southbridge/nvidia/mcp55/smbus.c:	unsigned device;
./southbridge/nvidia/mcp55/smbus.c:	unsigned device;
./southbridge/nvidia/mcp55/smbus.c:	unsigned device;
./southbridge/nvidia/mcp55/smbus.c:unsigned pm_base;
./southbridge/nvidia/mcp55/lpc.c:	unsigned link;
./southbridge/nvidia/mcp55/lpc.c:static void lpci_set_subsystem(struct device *dev, unsigned
vendor, unsigned device)
./southbridge/nvidia/mcp55/stage1_usbdebug.c:static void set_debug_port(unsigned port)
./southbridge/nvidia/mcp55/stage1_usbdebug.c:static void
mcp55_enable_usbdebug_direct(unsigned port)
./southbridge/nvidia/mcp55/usb2.c:	unsigned base;
./southbridge/nvidia/mcp55/usb2.c:	unsigned old_debug;
./southbridge/nvidia/mcp55/mcp55.c:static struct device *find_lpc_dev( struct device *dev, 
unsigned devfn)
(Continue reading)

ron minnich | 14 Aug 05:44 2008
Picon

Re: v3: ROMCC artifact TODO

Noted at http://www.coreboot.org/Notes_for_v3_ports

ron

--
coreboot mailing list
coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

ron minnich | 14 Aug 05:45 2008
Picon

Re: [PATCH] v3: introduce generic global variable storage

Plug it in and let's try it out.

Acked-by: Ronald G. Minnich <rminnich <at> gmail.com>

--
coreboot mailing list
coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

ron minnich | 14 Aug 05:46 2008
Picon

Re: [PATCH] v3: move mcp55 subsystem ID setting to v3 model

Acked-by: Ronald G. Minnich <rminnich <at> gmail.com>

Somebody please test.

ron

--
coreboot mailing list
coreboot <at> coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot


Gmane