On 3/12/07, ccases@navista.fr ccases@navista.fr wrote:
rm -f linuxbios.a ar cr linuxbios.a malloc.o lapic_cpu_init.o pci_ops.o lapic.o smbus_ops.o memset.o pci_ops_auto.o superio.o linuxbios_table.o fallback_boot.o pciexp_device.o tables.o keyboard.o pnp_device.o printk.o irq_tables.o pcix_device.o decode.o pci_device.o console.o delay_tsc.o elfboot.o hardwaremain.o boot.o i8259.o delay.o version.o pci_ops_mmconf.o memcmp.o exception.o secondary.o isa-dma.o pcibios.o hypertransport.o vtxprintf.o ops.o prim_ops.o root_device.o cardbus_device.o uart8250.o sys.o device_util.o ./option_table.o compute_ip_checksum.o device.o onboard.o northbridge.o memcpy.o agp_device.o clog2.o pirq_routing.o memmove.o pci_rom.o pci_ops_conf2.o pci_ops_conf1.o mc146818rtc.o cache.o fpu.o rom_stream.o debug.o c_start.o ops2.o biosemu.o vsprintf.o cpu.o static.o gcc -m32 -nostdlib -r -o linuxbios_ram.o c_start.o uart8250_console.o model_gx1_init.o mainboard.o cs5530.o vga_console.o cs5530_ide.o linuxbios.a /usr/lib/gcc-lib/i486-linux/3.3.5/libgcc.a gcc -m32 -nostdlib -nostartfiles -static -o linuxbios_ram -T /home/ccases/LinuxBIOSv2/src/config/linuxbios_ram.ld linuxbios_ram.o linuxbios_ram.o(.text+0x4b6b): In function `write_tables': : undefined reference to `write_pirq_routing_table' collect2: ld returned 1 exit status
yes, you need a write_pirq_routing_table function in mainboard.c, as that function is usually mainboard-dependent. You can grab one from, e.g., the msm80sev mainboard.c; it will most likely work.
thanks
ron
Hi,
In the file LinuxBIOSv2/src/mainboard/digitallogic/msm800sev/mainboard.c I don't see the fonction do you speak. And if I use this file like this :
#include <console/console.h> #include <device/device.h> #include <device/pci.h> #include <device/pci_ids.h> #include <device/pci_ops.h> #include <arch/io.h> #include <cpu/x86/msr.h> #include <cpu/amd/lxdef.h> #include "chip.h"
#define DIVIL_LBAR_GPIO 0x5140000c static void init_gpio() { msr_t msr; printk_debug("Initializing GPIO module...\n"); // initialize the GPIO LBAR msr.lo = GPIO_BASE; msr.hi = 0x0000f001; wrmsr(DIVIL_LBAR_GPIO, msr); msr = rdmsr(DIVIL_LBAR_GPIO); printk_debug("DIVIL_LBAR_GPIO set to 0x%08x 0x%08x\n", msr.hi, msr.lo); }
tatic void init(struct device *dev) { unsigned bus = 0; unsigned devNic = PCI_DEVFN(0xd, 0); unsigned devUsb = PCI_DEVFN(0xf, 4); device_t usb = NULL, nic = NULL; unsigned char irqUsb = 0xa, irqNic = 0xb; printk_debug("ADVANTECH PCM5823 ENTER %s\n", __FUNCTION__);
#if 0 // FIXME: do we need to initialize USB OHCI this way? printk_debug("%s (%x,%x) set USB PCI interrupt line to %d\n", __FUNCTION__, bus, devUsb, irqUsb);
// initialize the USB controller usb = dev_find_slot(bus, devUsb); if (!usb) printk_err("Could not find USB\n"); else pci_write_config8(usb, PCI_INTERRUPT_LINE, irqUsb); printk_debug("%s (%x,%x) set NIC PCI interrupt line to %d\n", __FUNCTION__, bus, devNic, irqNic);
// initialize theEEPRO 100 nic = dev_find_slot(bus, devNic); if (!nic) printk_err("Could not find USB\n"); else pci_write_config8(nic, PCI_INTERRUPT_LINE, irqNic); #endif init_gpio(); printk_debug("ADVANTECH PCM5823 EXIT %s\n", __FUNCTION__); }
static void enable_dev(struct device *dev) { dev->ops->init = init; }
struct chip_operations mainboard_advantech_pcm5823_ops = { CHIP_NAME("ADVANTECH PCM-5823 Mainboard") .enable_dev = enable_dev, };
I have an error :
[...] SE_FAILOVER_IMAGE='0' -Os -nostdinc -nostdlib -fno-builtin -Wall -o mainboard.o /home/ccases/LinuxBIOSv2/src/mainboard/advantech/pcm-5823/mainboard.c /home/ccases/LinuxBIOSv2/src/mainboard/advantech/pcm-5823/mainboard.c:24: error: syntax error before "void" /home/ccases/LinuxBIOSv2/src/mainboard/advantech/pcm-5823/mainboard.c: In function `init': /home/ccases/LinuxBIOSv2/src/mainboard/advantech/pcm-5823/mainboard.c:26: warning: unused variable `bus' /home/ccases/LinuxBIOSv2/src/mainboard/advantech/pcm-5823/mainboard.c:27: warning: unused variable `devNic' /home/ccases/LinuxBIOSv2/src/mainboard/advantech/pcm-5823/mainboard.c:28: warning: unused variable `devUsb' /home/ccases/LinuxBIOSv2/src/mainboard/advantech/pcm-5823/mainboard.c:29: warning: unused variable `usb' /home/ccases/LinuxBIOSv2/src/mainboard/advantech/pcm-5823/mainboard.c:29: warning: unused variable `nic' /home/ccases/LinuxBIOSv2/src/mainboard/advantech/pcm-5823/mainboard.c:30: warning: unused variable `irqUsb' /home/ccases/LinuxBIOSv2/src/mainboard/advantech/pcm-5823/mainboard.c:30: warning: unused variable `irqNic' make[1]: *** [mainboard.o] Error 1 make[1]: Leaving directory `/home/ccases/LinuxBIOSv2/targets/advantech/pcm-5823/pcm-5823/fallback' make: *** [fallback/linuxbios.rom] Error 1
Thank's By advance for your help.
Regards
CCases