From 446979be46f2aadfe39247cbe899e7f0f8770a76 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Wed, 7 Mar 2007 00:53:40 +0000 Subject: [PATCH] This set of changes: - makes sprintf work, in a re-entrant way - gets rid of a lot of ugly debug stuff (thanks for the Kconfig log level stuff guys!) - boots like a bat out of hell on qemu :-) The changes are trivial, I am self-acking. To run this under qemu, I do this: cp LinuxBIOSv3/build/linuxbios.rom bios.bin ; qemu -nographic -L . -kernel linux-2.6.15-bochs/vmlinux -hdc hda -hda hda | tee out 2>&1 here is the output from a run. Note that cpu's still don't have a path of any kind, and that show_all_devs is not working right. But we're getting there. I think I'll next try to really boot a linux with a hard drive, and see how it goes. LinuxBIOS-3.0.0- Tue Mar 6 18:41:59 MST 2007 starting... Start search at 0xfffc0000, size 258048 filename is normal/initram start 0xfffc0000 len 0x3f000 fullname is normal/initram RAM init code started Nothing to do.Done ram init code filename is normal/stage2 start (qemu) 0xfffc0000 len 0x3f000 fullname is normal/initram fullname is normal/stage2 Phase 1: done show all devs.. cpus: Unknown device path type: 0 Phase 2: Early setup... Phase 2: Done. show all devs.. cpus: Unknown device path type: 0 Phase 3: Enumerating buses... qemu-x86 enable_dev done dev_phase3_scan: scanning root(Root Device) scan_static_bus for root(Root Device) cpus: Unknown device path type: 0 i440bxemulation_enable_dev: i440bxemulation_enable_dev: Done. dev_phase5: device0_0(PCI: 00:00.0) missing ops domain0(PCI_DOMAIN: 0000) scanning... dev_phase3_scan: scanning domain0(PCI_DOMAIN: 0000) set_pci_ops: dev 00007aa0(device0_0) set ops to 00007220 set_pci_ops: dev 00007d80(dynamic PCI: 00:01.0) set ops to 00007220 set_pci_ops: dev 00008040(dynamic PCI: 00:01.1) set ops to 00007220 set_pci_ops: dev 00008300(dynamic PCI: 00:01.3) set ops to 00007220 set_pci_ops: dev 000085c0(dynamic PCI: 00:02.0) set ops to 00007220 set_pci_ops: dev 00008880(dynamic PCI: 00:03.0) set ops to 00007220 dev_phase3_scan: device0_0: busdevice 00007aa0 enabled 1 ops 00007220 dev_phase3_scan: can not scan from here, returning 0 dev_phase3_scan: dynamic PCI: 00:01.0: busdevice 00007d80 enabled 1 ops 00007220 dev_phase3_scan: can not scan from here, returning 0 dev_phase3_scan: dynamic PCI: 00:01.1: busdevice 00008040 enabled 1 ops 00007220 dev_phase3_scan: can not scan from here, returning 0 dev_phase3_scan: dynamic PCI: 00:01.3: busdevice 00008300 enabled 1 ops 00007220 dev_phase3_scan: can not scan from here, returning 0 dev_phase3_scan: dynamic PCI: 00:02.0: busdevice 000085c0 enabled 1 ops 00007220 dev_phase3_scan: can not scan from here, returning 0 dev_phase3_scan: dynamic PCI: 00:03.0: busdevice 00008880 enabled 1 ops 00007220 dev_phase3_scan: can not scan from here, returning 0 dev_phase3_scan: returning 0 scan_static_bus for root(Root Device) done dev_phase3_scan: returning 0 Phase 3: Done. show all devs.. cpus: Unknown device path type: 0 Phase 4: Allocating resources... Phase 4: Reading resources... cpus: Unknown device path type: 0 read_resources: cpus() missing phase4_read_resources cpus: Unknown device path type: 0 read_resources: cpus() missing phase4_read_resources Phase 4: Done reading resources. Phase 4: Setting resources... cpus: Unknown device path type: 0 read_resources: cpus() missing phase4_read_resources cpus: Unknown device path type: 0 read_resources: cpus() missing phase4_read_resources ram_resource: add ram resoource 33554432 bytes Phase 4: Done setting resources. Phase 4: Done allocating resources. show all devs.. cpus: Unknown device path type: 0 Phase 5: Enabling resources... cpus: Unknown device path type: 0 dev_phase5: cpus() missing ops Phase 5: Done. show all devs.. cpus: Unknown device path type: 0 Phase 6: Initializing devices... Phase 6: Devices initialized. show all devs.. cpus: Unknown device path type: 0 lb_memory_range: start 0x0 size 0x2000000 lb_cleanup_memory_ranges: # entries 1 #0: base 0x0 size 0x2000000 lb_memory_range: start 0x0 size 0x500 lb_cleanup_memory_ranges: # entries 2 #0: base 0x500 size 0x1fffb00 #1: base 0x0 size 0x500 lb_memory_range: start 0xf0000 size 0x0 lb_cleanup_memory_ranges: # entries 4 #0: base 0x0 size 0x500 #1: base 0x500 size 0xefb00 #2: base 0xf0000 size 0x1f10000 #3: base 0xf0000 size 0x0 show all devs.. cpus: Unknown device path type: 0 Done stage2 code filename is normal/payload start 0xfffc0000 len 0x3f000 fullname is normal/initram fullname is normal/stage2 fullname is normal/payload Elfboot set 00100000 to 0 for 137936 bytes Copy to 00100000 from fffc6ef4 for 30472 bytes set 00121ae0 to 0 for 72 bytes Copy to 00121ae0 from fffce614 for 72 bytes FILO version 0.5 (rminnich@q.ccstar.lanl.gov) Tue Mar 6 18:41:56 MST 2007 collect_sys_info: boot eax = 0xfe collect_sys_info: boot ebx = 0xffffd444 collect_sys_info: boot arg = 0x1049c0 collect_sys_info: info->memrange 00000000 collect_linuxbios_info: Searching for LinuxBIOS tables... find_lb_table: Found candidate at: 00000500 find_lb_table: header checksum o.k. find_lb_table: table checksum o.k. find_lb_table: record count o.k. collect_linuxbios_info: collect_linuxbios_info: yes collect_linuxbios_info: Found LinuxBIOS table at: 00000500 read_lbtable: read_lbtable begin read_lbtable: lbrec tag 1 LB_TAG_MEMORY 1 convert_memmap: info->memrange 0x107740 convert_memmap: 0x00000000000000 0x000000000005a4 16 convert_memmap: 0x000000000005a4 0x000000000efa5c 1 convert_memmap: 0x000000000f0000 0x00000001f10000 1 convert_memmap: 0x000000000f0000 0x00000000000000 16 read_lbtable: lbrec tag 3 LB_TAG_MEMORY 1 read_lbtable: lbrec tag 4 LB_TAG_MEMORY 1 read_lbtable: read_lbtable end collect_linuxbios_info: collect_linuxbios_info: done collect_sys_info: after collect info->memrange 00107740 collect_sys_info: 00000000000005a4-00000000000f0000 collect_sys_info: 00000000000f0000-0000000002000000 collect_sys_info: RAM 32 MB relocate: virt_offset is 0 relocate: Current location: 0x100000-0x121b27 relocate: Relocating to 0x1fde4d0-0x1fffff7... ok setup_timers: CPU 599 MHz Press for default boot, or for boot prompt... 2 1 timed out boot: hda:/bzImage console=ttyS0,115200 malloc_diag: alloc: 0 bytes (0 blocks), free: 16376 bytes (1 blocks) malloc_diag: alloc: 48 bytes (1 blocks), free: 16328 bytes (1 blocks) malloc_diag: alloc: 64 bytes (2 blocks), free: 16312 bytes (1 blocks) file_open: dev=hda, path=/bzImage ide_software_reset: Waiting for ide0 to become ready for reset... ok init_drive: Testing for hda init_drive: Probing for hda init_drive: LBA mode, sectors=32768 init_drive: LBA48 mode, sectors=32768 init_drive: Init device params... ok hda: LBA48 16MB: QEMU HARDDISK Mounted ext2fs malloc_diag: alloc: 48 bytes (1 blocks), free: 16328 bytes (1 blocks) elf_load: Not a bootable ELF image malloc_diag: alloc: 64 bytes (2 blocks), free: 16312 bytes (1 blocks) file_open: dev=hda, path=/bzImage devopen: already open malloc_diag: alloc: 48 bytes (1 blocks), free: 16328 bytes (1 blocks) Found Linux version 2.6.15-geode (rminnich@q.ccstar.lanl.gov) #36 Sun Mar 4 22:20:47 MST 2007 (protocol 0x204) (loadflags 0x1) bzImage. init_linux_params: Setting up paramters at 0x90000 set_memory_size: 00000000000005a4 - 00000000000f0000 set_memory_size: 00000000000f0000 - 0000000002000000 set_memory_size: ramtop=0x2000000 set_memory_size: ext_mem_k=31744, alt_mem_k=31744 parse_command_line: original command line: "console=ttyS0,115200" parse_command_line: kernel command line at 0x91000 parse_command_line: kernel command line (20 bytes): "console=ttyS0,115200" load_linux_kernel: offset=0x1600 addr=0x100000 size=0x1175e1 Loading kernel... ok start_linux: eip=0x100000 Jumping to entry point... Linux version 2.6.15-geode (rminnich@q.ccstar.lanl.gov) (gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)) #36 Sun Mar 4 22:20:47 MST 2007 BIOS-provided physical RAM map: BIOS-e801: 0000000000000000 - 000000000009f000 (usable) BIOS-e801: 0000000000100000 - 0000000002000000 (usable) 32MB LOWMEM available. DMI not present. Allocating PCI resources starting at 10000000 (gap: 02000000:fe000000) Built 1 zonelists Kernel command line: console=ttyS0,115200 Initializing CPU#0 PID hash table entries: 256 (order: 8, 4096 bytes) Detected 1694.987 MHz processor. Using pit for high-res timesource Console: colour dummy device 80x25 Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 29752k/32768k available (1500k kernel code, 2628k reserved, 502k data, 144k init, 0k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok. Mount-cache hash table entries: 512 CPU: L1 I cache: 8K CPU: L2 cache: 128K mtrr: v2.0 (20020519) CPU: Intel Pentium II (Klamath) stepping 03 Enabling fast FPU save and restore... done. Enabling unmasked SIMD FPU exception support... done. Checking 'hlt' instruction... OK. Checking for popad bug... OK. NET: Registered protocol family 16 PCI: Using configuration type 1 PCI: Probing PCI hardware PCI quirk: region b100-b10f claimed by PIIX4 SMB PCI: Ignore bogus resource 6 [0:0] of 0000:00:02.0 Initializing Cryptographic API io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered PCI: PIIX3: Enabling Passive Release on 0000:00:01.0 Limiting direct PCI/PCI transfers. Activating ISA DMA hang workarounds. serio: i8042 AUX port at 0x60,0x64 irq 12 serio: i8042 KBD port at 0x60,0x64 irq 1 Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16450 RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize loop: loaded (max 8 devices) e100: Intel(R) PRO/100 Network Driver, 3.4.14-k4-NAPI e100: Copyright(c) 1999-2005 Intel Corporation tun: Universal TUN/TAP device driver, 1.6 tun: (C) 1999-2004 Max Krasnyansky Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx PIIX3: IDE controller at PCI slot 0000:00:01.1 PIIX3: chipset revision 0 PIIX3: not 100% native mode: will probe irqs later PIIX3: neither IDE port enabled (BIOS) hda: QEMU HARDDISK, ATA DISK drive hdc: QEMU HARDDISK, ATA DISK drive ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 ide1 at 0x170-0x177,0x376 on irq 15 hda: max request size: 1024KiB hda: 32768 sectors (16 MB) w/256KiB Cache, CHS=32/255/63 hda: set_multmode: status=0x41 { DriveReady Error } hda: set_multmode: error=0x04 { DriveStatusError } ide: failed opcode was: 0xef hda: cache flushes supported hda: hda1 hdc: max request size: 1024KiB hdc: 32768 sectors (16 MB) w/256KiB Cache, CHS=32/255/63 hdc: set_multmode: status=0x41 { DriveReady Error } hdc: set_multmode: error=0x04 { DriveStatusError } ide: failed opcode was: 0xef hdc: cache flushes supported hdc: hdc1 mice: PS/2 mouse device common for all mice NET: Registered protocol family 2 input: AT Raw Set 2 keyboard as /class/input/input0 input: ImExPS/2 Generic Explorer Mouse as /class/input/input1 IP route cache hash table entries: 512 (order: -1, 2048 bytes) TCP established hash table entries: 2048 (order: 1, 8192 bytes) TCP bind hash table entries: 2048 (order: 1, 8192 bytes) TCP: Hash tables configured (established 2048 bind 2048) TCP reno registered TCP bic registered NET: Registered protocol family 1 NET: Registered protocol family 17 Using IPI Shortcut mode VFS: Cannot open root device "" or unknown-block(3,2) Please append a correct "root=" boot option Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,2) Signed-off-by: Ronald G. Minnich Acked-by: Ronald G. Minnich git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@207 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- arch/x86/console.c | 6 +++--- console/vsprintf.c | 34 +++++++++++++++----------------- console/vtxprintf.c | 46 ++++++++++++++++++++++---------------------- device/device.c | 10 ---------- device/device_util.c | 2 +- device/pci_device.c | 30 ++++++++++++++--------------- 6 files changed, 58 insertions(+), 70 deletions(-) diff --git a/arch/x86/console.c b/arch/x86/console.c index 81c7710d3b..4654b1a10d 100644 --- a/arch/x86/console.c +++ b/arch/x86/console.c @@ -6,14 +6,14 @@ // FIXME: we need this for varargs #include -extern int vtxprintf(void (*)(unsigned char), const char *, va_list); +extern int vtxprintf(void (*)(unsigned char, void *arg), void *arg, const char *, va_list); int console_loglevel(void) { return CONFIG_DEFAULT_CONSOLE_LOGLEVEL; } -void console_tx_byte(unsigned char byte) +void console_tx_byte(unsigned char byte, void *ignored) { if (byte == '\n') uart8250_tx_byte(TTYSx_BASE, '\r'); @@ -30,7 +30,7 @@ int printk(int msg_level, const char *fmt, ...) } va_start(args, fmt); - i = vtxprintf(console_tx_byte, fmt, args); + i = vtxprintf(console_tx_byte, (void *)0, fmt, args); va_end(args); return i; diff --git a/console/vsprintf.c b/console/vsprintf.c index f0d3c8a23a..b87fdd8367 100644 --- a/console/vsprintf.c +++ b/console/vsprintf.c @@ -26,35 +26,33 @@ #include #include +#include -int vtxprintf(void (*tx_byte) (unsigned char byte), const char *fmt, +int vtxprintf(void (*tx_byte) (unsigned char byte, void *arg), void *arg, const char *fmt, va_list args); -/* FIXME this global makes vsprintf non-reentrant */ - -static char *str_buf; -static void str_tx_byte(unsigned char byte) +/* the arg is the char ** for the buffer */ +static void str_tx_byte(unsigned char byte, void *arg) { - *str_buf = byte; - str_buf++; -} - -int vsprintf(char *buf, const char *fmt, va_list args) -{ - int i; - str_buf = buf; - i = vtxprintf(str_tx_byte, fmt, args); - *str_buf = '\0'; - return i; + unsigned char *cp = *(unsigned char **) arg; + + *cp = byte; + cp++; + /* paranoia, make sure it will be null terminated. The cost for this is small, + * the benefit large. + */ + *cp = 0; + *(unsigned char **) arg = cp; } int sprintf(char *buf, const char *fmt, ...) { va_list args; int i; - + unsigned char *cp = (unsigned char *)buf; + unsigned char **cpp = &cp; va_start(args, fmt); - i = vsprintf(buf, fmt, args); + i = vtxprintf(str_tx_byte, cpp, fmt, args); va_end(args); return i; } diff --git a/console/vtxprintf.c b/console/vtxprintf.c index 3d31da507f..498db072a7 100644 --- a/console/vtxprintf.c +++ b/console/vtxprintf.c @@ -44,7 +44,7 @@ static int skip_atoi(const char **s) #define SPECIAL 32 /* 0x */ #define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ -static int number(void (*tx_byte)(unsigned char byte), +static int number(void (*tx_byte)(unsigned char byte, void *arg), void *arg, unsigned long long num, int base, int size, int precision, int type) { char c,sign,tmp[66]; @@ -89,31 +89,31 @@ static int number(void (*tx_byte)(unsigned char byte), size -= precision; if (!(type&(ZEROPAD+LEFT))) while(size-->0) - tx_byte(' '), count++; + tx_byte(' ', arg), count++; if (sign) - tx_byte(sign), count++; + tx_byte(sign, arg), count++; if (type & SPECIAL) { if (base==8) - tx_byte('0'), count++; + tx_byte('0', arg), count++; else if (base==16) { - tx_byte('0'), count++; - tx_byte(digits[33]), count++; + tx_byte('0', arg), count++; + tx_byte(digits[33], arg), count++; } } if (!(type & LEFT)) while (size-- > 0) - tx_byte(c), count++; + tx_byte(c, arg), count++; while (i < precision--) - tx_byte('0'), count++; + tx_byte('0', arg), count++; while (i-- > 0) - tx_byte(tmp[i]), count++; + tx_byte(tmp[i], arg), count++; while (size-- > 0) - tx_byte(' '), count++; + tx_byte(' ', arg), count++; return count; } -int vtxprintf(void (*tx_byte)(unsigned char byte), const char *fmt, va_list args) +int vtxprintf(void (*tx_byte)(unsigned char byte, void *arg), void *arg, const char *fmt, va_list args) { int len; unsigned long long num; @@ -131,7 +131,7 @@ int vtxprintf(void (*tx_byte)(unsigned char byte), const char *fmt, va_list args for (count=0; *fmt ; ++fmt) { if (*fmt != '%') { - tx_byte(*fmt), count++; + tx_byte(*fmt, arg), count++; continue; } @@ -194,10 +194,10 @@ int vtxprintf(void (*tx_byte)(unsigned char byte), const char *fmt, va_list args case 'c': if (!(flags & LEFT)) while (--field_width > 0) - tx_byte(' '), count++; - tx_byte((unsigned char) va_arg(args, int)), count++; + tx_byte(' ', arg), count++; + tx_byte((unsigned char) va_arg(args, int), arg), count++; while (--field_width > 0) - tx_byte(' '), count++; + tx_byte(' ', arg), count++; continue; case 's': @@ -209,11 +209,11 @@ int vtxprintf(void (*tx_byte)(unsigned char byte), const char *fmt, va_list args if (!(flags & LEFT)) while (len < field_width--) - tx_byte(' '), count++; + tx_byte(' ', arg), count++; for (i = 0; i < len; ++i) - tx_byte(*s++), count++; + tx_byte(*s++, arg), count++; while (len < field_width--) - tx_byte(' '), count++; + tx_byte(' ', arg), count++; continue; case 'p': @@ -221,7 +221,7 @@ int vtxprintf(void (*tx_byte)(unsigned char byte), const char *fmt, va_list args field_width = 2*sizeof(void *); flags |= ZEROPAD; } - count += number(tx_byte, + count += number(tx_byte, arg, (unsigned long) va_arg(args, void *), 16, field_width, precision, flags); continue; @@ -241,7 +241,7 @@ int vtxprintf(void (*tx_byte)(unsigned char byte), const char *fmt, va_list args continue; case '%': - tx_byte('%'), count++; + tx_byte('%', arg), count++; continue; /* integer number formats - set up the flags and "break" */ @@ -262,9 +262,9 @@ int vtxprintf(void (*tx_byte)(unsigned char byte), const char *fmt, va_list args break; default: - tx_byte('%'), count++; + tx_byte('%', arg), count++; if (*fmt) - tx_byte(*fmt), count++; + tx_byte(*fmt, arg), count++; else --fmt; continue; @@ -282,7 +282,7 @@ int vtxprintf(void (*tx_byte)(unsigned char byte), const char *fmt, va_list args } else { num = va_arg(args, unsigned int); } - count += number(tx_byte, num, base, field_width, precision, flags); + count += number(tx_byte, arg, num, base, field_width, precision, flags); } return count; } diff --git a/device/device.c b/device/device.c index 46fd965822..b0ebf35326 100644 --- a/device/device.c +++ b/device/device.c @@ -90,8 +90,6 @@ struct device * alloc_dev(struct bus *parent, struct device_path *path) { struct device * dev, *child; int link; - static char thissucks[64]; - static int fuck = 0; // spin_lock(&dev_lock); @@ -135,15 +133,7 @@ struct device * alloc_dev(struct bus *parent, struct device_path *path) if (dev->dtsname == 0) { die("DEV: out of memory.\n"); } - sprintf(thissucks, "dynamic %s", dev_path(dev)); - printk(BIOS_INFO, "thissucks is %s dev is %p dev->dtsname is %p\n", thissucks, dev, dev->dtsname); sprintf(dev->dtsname, "dynamic %s", dev_path(dev)); - printk(BIOS_INFO, "after sprintf dtsname is %s\n", dev->dtsname); - memcpy(dev->dtsname, thissucks, strlen(thissucks)); - printk(BIOS_INFO, "after strcpy dtsname is %s\n", dev->dtsname); - /* FUCK. sprintf doesn't work. */ - dev->dtsname[0] = '0' + fuck++; - dev->dtsname[1] = 0; // spin_unlock(&dev_lock); return dev; diff --git a/device/device_util.c b/device/device_util.c index 174cd9101f..6a625b72da 100644 --- a/device/device_util.c +++ b/device/device_util.c @@ -505,7 +505,7 @@ void search_global_resources( resource_search_t search, void *gp) { struct device *curdev; - printk(BIOS_SPEW-2, "%s: mask %x type %x \n", __func__, type_mask, type); + printk(BIOS_SPEW, "%s: mask %x type %x \n", __func__, type_mask, type); for(curdev = all_devices; curdev; curdev = curdev->next) { int i; printk(BIOS_SPEW, "%s: dev %s, have_resources %d #resources %d\n", __func__, curdev->dtsname, diff --git a/device/pci_device.c b/device/pci_device.c index 469009fa60..094db6343f 100644 --- a/device/pci_device.c +++ b/device/pci_device.c @@ -129,7 +129,7 @@ unsigned pci_find_next_capability(struct device * dev, unsigned cap, unsigned la int this_cap; pos &= ~3; this_cap = pci_read_config8(dev, pos + PCI_CAP_LIST_ID); - printk(BIOS_SPEW-2,"Capability: 0x%02x @ 0x%02x\n", cap, pos); + printk(BIOS_SPEW,"Capability: 0x%02x @ 0x%02x\n", cap, pos); if (this_cap == 0xff) { break; } @@ -797,7 +797,7 @@ static void set_pci_ops(struct device *dev) (driver->device == dev->device)) { dev->ops = driver->ops; - printk(BIOS_SPEW-2,"%s [%04x/%04x] %sops\n", + printk(BIOS_SPEW,"%s [%04x/%04x] %sops\n", dev_path(dev), driver->vendor, driver->device, (driver->ops->phase3_scan?"bus ":"")); @@ -855,15 +855,15 @@ static struct device *pci_scan_get_dev(struct device **list, unsigned int devfn) { struct device *dev; dev = 0; - printk(BIOS_INFO, "%s: list is %p, *list is %p\n", __func__, list, *list); + printk(BIOS_SPEW, "%s: list is %p, *list is %p\n", __func__, list, *list); for(; *list; list = &(*list)->sibling) { - printk(BIOS_INFO, "%s: check dev %s \n", __func__, (*list)->dtsname); + printk(BIOS_SPEW, "%s: check dev %s \n", __func__, (*list)->dtsname); if ((*list)->path.type != DEVICE_PATH_PCI) { printk(BIOS_ERR,"%s: child %s(%s) not a pci device: it's type %d\n", __FUNCTION__, (*list)->dtsname, dev_path(*list), (*list)->path.type); continue; } - printk(BIOS_INFO, "%s: check dev %s it has devfn 0x%x\n", __func__, (*list)->dtsname, (*list)->path.u.pci.devfn); + printk(BIOS_SPEW, "%s: check dev %s it has devfn 0x%x\n", __func__, (*list)->dtsname, (*list)->path.u.pci.devfn); if ((*list)->path.u.pci.devfn == devfn) { /* Unlink from the list */ dev = *list; @@ -923,7 +923,7 @@ struct device * pci_probe_dev(struct device * dev, struct bus *bus, unsigned dev if ( (id == 0xffffffff) || (id == 0x00000000) || (id == 0x0000ffff) || (id == 0xffff0000)) { - printk(BIOS_SPEW-2,"PCI: devfn 0x%x, bad id 0x%x\n", devfn, id); + printk(BIOS_SPEW,"PCI: devfn 0x%x, bad id 0x%x\n", devfn, id); return NULL; } dev = alloc_dev(bus, &dummy.path); @@ -1046,23 +1046,23 @@ unsigned int pci_scan_bus(struct bus *bus, bus->children = 0; post_code(0x24); - printk(BIOS_SPEW-2,"PCI: scan devfn 0x%x to 0x%x\n", min_devfn, max_devfn); + printk(BIOS_SPEW,"PCI: scan devfn 0x%x to 0x%x\n", min_devfn, max_devfn); /* probe all devices/functions on this bus with some optimization for * non-existence and single funcion devices */ for (devfn = min_devfn; devfn <= max_devfn; devfn++) { struct device * dev; - printk(BIOS_SPEW-2,"PCI: devfn 0x%x\n", devfn); + printk(BIOS_SPEW,"PCI: devfn 0x%x\n", devfn); /* First thing setup the device structure */ dev = pci_scan_get_dev(&old_devices, devfn); - printk(BIOS_SPEW-2,"PCI: pci_scan_bus pci_scan_get_dev returns dev %s\n", dev ? dev->dtsname :"None (no dev in tree yet)"); + printk(BIOS_SPEW,"PCI: pci_scan_bus pci_scan_get_dev returns dev %s\n", dev ? dev->dtsname :"None (no dev in tree yet)"); /* See if a device is present and setup the device * structure. */ dev = pci_probe_dev(dev, bus, devfn); - printk(BIOS_SPEW-2,"PCI: pci_scan_bus pci_probe_dev returns dev %p(%s)\n", dev, dev->dtsname); + printk(BIOS_SPEW,"PCI: pci_scan_bus pci_probe_dev returns dev %p(%s)\n", dev, dev->dtsname); /* if this is not a multi function device, * or the device is not present don't waste @@ -1075,7 +1075,7 @@ unsigned int pci_scan_bus(struct bus *bus, devfn += 0x07; } } - printk(BIOS_SPEW-2,"PCI: Done for loop\n"); + printk(BIOS_SPEW,"PCI: Done for loop\n"); post_code(0x25); /* Die if any leftover Static devices are are found. @@ -1130,7 +1130,7 @@ unsigned int do_pci_scan_bridge(struct device *dev, unsigned int max, u32 buses; u16 cr; - printk(BIOS_SPEW-2,"%s for %s\n", __func__, dev_path(dev)); + printk(BIOS_SPEW,"%s for %s\n", __func__, dev_path(dev)); bus = &dev->link[0]; bus->dev = dev; @@ -1179,7 +1179,7 @@ unsigned int do_pci_scan_bridge(struct device *dev, unsigned int max, pci_write_config16(dev, PCI_COMMAND, cr); printk(BIOS_DEBUG, "%s DONE\n", __func__); - printk(BIOS_SPEW-2,"%s returns max %d\n", __func__, max); + printk(BIOS_SPEW,"%s returns max %d\n", __func__, max); return max; } @@ -1209,10 +1209,10 @@ void pci_level_irq(unsigned char intNum) { unsigned short intBits = inb(0x4d0) | (((unsigned) inb(0x4d1)) << 8); - printk(BIOS_SPEW-2,"%s: current ints are 0x%x\n", __func__, intBits); + printk(BIOS_SPEW,"%s: current ints are 0x%x\n", __func__, intBits); intBits |= (1 << intNum); - printk(BIOS_SPEW-2,"%s: try to set ints 0x%x\n", __func__, intBits); + printk(BIOS_SPEW,"%s: try to set ints 0x%x\n", __func__, intBits); // Write new values outb((unsigned char) intBits, 0x4d0);