Bug in etherboot 5.1.2rc7

hcyun at etri.re.kr hcyun at etri.re.kr
Wed Oct 30 02:42:01 CET 2002

I recently check out etherboot from the cvs to do boot from ide. 
At the first try, It could't found ide controller with saying "No adaptor
After tracking down the codes I found the reason in scan_bus() function in

The problem was that it skips to probe my ide controller. 
My board is organized as follows. 
00:02.3 <-- UBS controller
00:02.4 <-- empty
00:02.5 <-- IDE controller

When scan_bus probes all devfn, after reading PCI_VENDOR_ID from empty
00:02.4 it set hdr_type=0. therefore it skip to probe rest of functions
including 00:02.5. 

To avoid this situation I modified the code as follows to prevent to set
hdr_type = 0. 
I'm not sure why original code set hdr_type = 0 when the slot return null
But anyway I can boot from the disk by just removing this line. 

static void scan_bus(int type, struct pci_device *dev)
	for (bus = first_bus; bus < buses; ++bus) {
		for (devfn = first_devfn; devfn < 0xff; ++devfn) {
		        if (PCI_FUNC (devfn) == 0)
				pcibios_read_config_byte(bus, devfn,
PCI_HEADER_TYPE, &hdr_type);
			else if (!(hdr_type & 0x80))	/* not a multi-
function device */

			pcibios_read_config_dword(bus, devfn,
			/* some broken boards return 0 if a slot is empty:
			if (l == 0xffffffff || l == 0x00000000) {
				// hdr_type = 0; // <- I removed this line.

Now I can boot from IDE. but I have a question. 
It seems that current etherboot ide support doesn't support partition or
So now I just installed kernel image without creating any partition 
(dd kernel.elf of=/dev/hda), but it is too wasteful. Is there any way to
place both kernel 
and root filesystem on the same ide disk? 

HeeChul Yun,          
Embedded S/W Team at ETRI
e-mail: hcyun at etri.re.kr
phone: +82-42-860-1673

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20021030/81164eb2/attachment.html>

More information about the coreboot mailing list