[LinuxBIOS] Some success with Geode GX1 and Linuxbios V2

Hamish Guthrie hamish at prodigi.ch
Tue Apr 19 17:27:21 CEST 2005


Ron,

I thought I would just let you and the list know that I have managed to make
some good progress with porting the Geode GX1/cs5530 code to V2.

At this point I have only tested up to getting a kernel booting - it is not
yet mounting a root filesystem, but that will come soon.

One of the first things I did was to go through the RAM detection code in V1
with a fine toothcomb, and managed to find a number of bugs in that code, so
that now detects every single type of DIMM and SODIMM I have here to test
with correctly, so that can be contributed back to the V1 tree. I then
re-wrote that code in C and managed to get that running under V2 correctly.
The Geode does not have an SMBUS so getting the memory size reported by
LinuxBIOS has required a nasty hack. I have put a hook into the northbridge
code where it probes the pci bus for mc_dev and slotted in some code return
the correct values from the MC_BANK_CFG register of the Geode. This RAM
reporting will also apply to devices like the STPC as well, so there should
probably be a clean way put together to cater for devices without an SMBUS -
I think reporting with a fake smbus routine may be a bit of overkill,
because once memory sizing on the STPC is done correctly, it can be reported
from a single register as well.

I then created an irq_tables.c file from Linux running from the standard
BIOS.

Next step was to get Etherboot running and the elfboot code works like a
charm in V2 - I still cannot figure out what I am doing wrong in the V1
code, but that probably does not matter much any more!

I then set up my DHCP server and a TFTP server and first time round managed
to get the result shown by the serial console output below - I was expecting
the kernel to die because there is in fact no hard drive at /dev/hda3 at the
moment, and for this project I do not need any hard disk, as the filesystems
will all be embedded into on-board NAND flash.

LinuxBIOS-1.1.8.0Normal Tue Apr 19 12:17:40 CEST 2005 starting...
Setting up default parameters for memory
Sizing memory
Probing for DIMM0
    Found DIMM0
    Page Size:       00001000
    Component Banks: 2
    Module Banks:    2
    DIMM size:       02000000
Probing for DIMM1
    Found DIMM1
    Page Size:       00001000
    Component Banks: 4
    Module Banks:    1
    DIMM size:       04000000
MC_BANK_CFG = 14204320
Copying LinuxBIOS to ram.
Jumping to LinuxBIOS.
LinuxBIOS-1.1.8.0Normal Tue Apr 19 12:17:40 CEST 2005 booting...
Enumerating buses...
Finding PCI configuration type.
PCI: Using configuration type 1
PCI_DOMAIN: 0000 enabled
PCI: pci_scan_bus for bus 0
PCI: 00:00.0 [1078/0001] ops
PCI: 00:00.0 [1078/0001] enabled
PCI: 00:0e.0 [1317/0985] enabled
PCI: 00:12.0 [1078/0100] enabled
PCI: 00:12.1 [1078/0101] enabled
PCI: 00:12.2 [1078/0102] enabled
PCI: 00:12.3 [1078/0103] enabled
PCI: 00:12.4 [1078/0104] enabled
PCI: 00:13.0 [0e11/a0f8] enabled
PCI: pci_scan_bus returning with max=00
done
Allocating resources...
Reading resources...
Done reading resources.
Setting resources...
I would set ram size to 0x18000 Kbytes
PCI: 00:0e.0 10 <- [0x0000001000 - 0x00000010ff] io
PCI: 00:0e.0 14 <- [0x00febe2000 - 0x00febe23ff] mem
PCI: 00:0e.0 30 <- [0x00febc0000 - 0x00febdffff] rom
PCI: 00:12.1 10 <- [0x00febe3000 - 0x00febe30ff] mem
PCI: 00:12.2 20 <- [0x0000001400 - 0x000000147f] io
PCI: 00:12.3 10 <- [0x00febe4000 - 0x00febe407f] mem
PCI: 00:12.4 10 <- [0x00febe0000 - 0x00febe0fff] mem
PCI: 00:13.0 10 <- [0x00febe1000 - 0x00febe1fff] mem
Done setting resources.
Done allocating resources.
Enabling resourcess...
PCI: 00:00.0 cmd <- 147
PCI: 00:0e.0 cmd <- 143
PCI: 00:12.0 cmd <- 14f
PCI: 00:12.1 cmd <- 142
PCI: 00:12.2 cmd <- 141
PCI: 00:12.3 cmd <- 142
PCI: 00:12.4 cmd <- 142
PCI: 00:13.0 cmd <- 142
done.
Initializing devices...
Root Device init
PCI: 00:00.0 init
Devices initialized
Copying IRQ routing tables to 0xf0000...done.
Verifing copy of IRQ routing tables at 0xf0000...failed
Wrote linuxbios table at: 00000500 - 00000690  checksum f8b7

Welcome to elfboot, the open sourced starter.
January 2002, Eric Biederman.
Version 1.3

    23:stream_init() - rom_stream: 0xfffc0000 - 0xfffcffff
Found ELF candiate at offset 0
Loading Etherboot version: 5.2.6
Dropping non PT_LOAD segment
New segment addr 0x20000 size 0x12740 offset 0xb0 filesize 0x89fc
(cleaned up) New segment addr 0x20000 size 0x12740 offset 0xb0 filesize
0x89fc
Loading Segment: addr: 0x0000000000020000 memsz: 0x0000000000012740 filesz:
0x00000000000089fc
Clearing Segment: addr: 0x00000000000289fc memsz: 0x0000000000009d44
Jumping to boot code at 0x20000
ROM segment 0x0000 length 0x0000 reloc 0x00020000
CPU 238 Mhz
Etherboot 5.2.6 (GPL) http://etherboot.org Tagged ELF for [Tulip]
Relocating _text from: [00020000,00033750) to [05eec8b0,05f00000)
Boot from (N)etwork or (Q)uit?
Probing pci nic...
[centaur-p]
centaur-p: [chip: ADMtek Comet] rev 17 at 1000
centaur-p: Vendor=1317  Device=0985
centaur-p: 00:0C:41:EB:02:45 at ioaddr 1000
Searching for server (DHCP)...
..Me: 192.168.1.153, Server: 192.168.1.201, Gateway 192.168.1.1
Loading 192.168.1.201:vmlinuz.elf ...(ELF)...
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
............................................................................
done
Firmware type: LinuxBIOS
Linux version 2.6.11 (root at monster1) (gcc version 3.3.4 (pre 3.3.5
20040809)) #1 Tue Apr 19 16:09:06 CEST 2005
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 0000000000000700 (reserved)
 BIOS-e820: 0000000000000700 - 00000000000a0000 (usable)
 BIOS-e820: 00000000000f0000 - 00000000000f0400 (reserved)
 BIOS-e820: 0000000000100000 - 0000000006000000 (usable)
96MB LOWMEM available.
DMI not present.
ACPI: Unable to locate RSDP
Allocating PCI resources starting at 06000000 (gap: 06000000:fa000000)
Built 1 zonelists
Kernel command line: console=ttyS0,38400 root=/dev/hda3
Initializing CPU#0
PID hash table entries: 512 (order: 9, 8192 bytes)
Detected 233.869 MHz processor.
Using tsc for high-res timesource
Console: colour dummy device 80x25
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 94720k/98304k available (1436k kernel code, 3160k reserved, 468k
data, 132k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Working around Cyrix MediaGX virtual DMA bugs.
CPU: Cyrix MediaGXtm MMXtm Enhanced stepping 02
Checking 'hlt' instruction... OK.
NET: Registered protocol family 16
PCI: Using configuration type 1
ACPI: Subsystem revision 20050211
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
SCSI subsystem initialized
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
audit: initializing netlink socket (disabled)
audit(3445976884.071:0): initialized
Total HugeTLB memory allocated, 0
Initializing Cryptographic API
PCI: Fixup for MediaGX/Geode Slave Disconnect Boundary (0x41=0x9c)
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Real Time Clock Driver v1.12
i8042: ACPI detection disabled
i8042.c: Can't read CTR while initializing i8042.
Serial: 8250/16550 driver $Revision: 1.90 $ 48 ports, IRQ sharing enabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 64000K size 1024 blocksize
loop: loaded (max 8 devices)
mice: PS/2 mouse device common for all mice
input: PC Speaker
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
NET: Registered protocol family 1
VFS: Cannot open root device "hda3" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(0,0)

I notice the kernel is not doing a PCI probe - I wonder why?

I obviously have a fair amount more cleanup to do, and to make sure I can
mount filesystems and that the Interrupts do indeed work. There is another
area I may have a look at and that is to attempt to plug in support for the
notorious Geode VSA stuff, which at last AMD have released proper specs for.

Hamish
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.17 - Release Date: 19.04.2005





More information about the coreboot mailing list