<div class="gmail_quote">Hello , <br><br>I am currently a 4th year student ( B.Tech in CSE + MS ) in <a href="http://iiit.ac.in/" target="_blank">IIIT-H</a>
 and chosen field of study for MS is Virtualization. I have been using 
kvm , qemu and the libvirt library primarily to experiment with cloud 
frameworks and migration until now.<br><br>I was going through the <a href="http://coreboot.org" target="_blank">coreboot.org</a> and I am definitely interested in it. So wanted to ask couple of things. <br>I have not read the source code yet but tried it out in this way :<br>

1.Checked out latest version of coreboot on 32bit Fedora 15. make config with settings as : <br>MainBoard Vendor : Emulation , Model : Qemu , ROM Size : 256KB , Payload : SeaBIOS<br>make was successful . <br>Since my laptop is an old one and does not have hardware virtualization support , I use a lab pc ( 64 bit Fedora 15 ) for some of my experiments.<br>

scp coreboot.rom root@Lab: ; ssh root@Lab<br>2.qemu-img create disk.img 2500M<br>3.mkfs.ext2 disk.img<br>4.mkdir foo ; mv coreboot.rom foo/ ; cd foo ; ln -s coreboot.rom bios.bin <br>5.Copy some of the other bios files needed by Qemu ( otherwise , Qemu throws a file not found error and exits ): <br>

cp -r qemu_path/pc-bios/{keymaps,kvmapic.bin,pxe-e1000.rom,vgabios-cirrus.bin} /root/foo/<br>6.qemu-system-x86_64 -L foo/ -hda disk.img -vnc 0:0 -m 512 -serial stdio -cdrom ~/CentOS-5.5-i386-bin-DVD.iso <br><br>Installation of CentOS ( Minimum installation ) was successful and at the end , it asked me to reboot. When I clicked on reboot option , coreboot got stuck in an infinite loop and I was getting this (in a loop) on the stdio : <br>

<br>Changing serial settings was 0/0 now 3/0<br>In resume (status=0)<br>In 32bit resume<br>Attempting a hard reboot<br><br>I killed the process and started my vm again without the -cdrom option and it booted up fine. <br>

I am not sure if this is a bug or if I am doing something wrong. Can you shed light on it ? <br>I have pasted the serial output at the end of email. ( There are some other 'file not found' errors but qemu + coreboot worked fine without them ). <br>

<br>I am absolutely new to coreboot and used it for the first time today but I love and admire it's goal , to replace the proprietary BIOS. Always thought , where's the code of BIOS ? <br>Could you give me some pointers as to where to begin for GSoC or some little hacks that I should attempt out ? I am trying different payloads in the meantime. <br>

The initrd and vmlinuz of the CentOS I just installed have sizes of 3.2MB and 1.8MB respectively. If I want to use them ( a kernel payload ) , how should I ? I read about mkelfImage command and also tried it out but the resultant size of linux.elf is ~5MB which exceeds the size of ROM chip , declared in Qemu. Can I use a kernel payload ( any other OS ) without hacking Qemu ? ( I think not but want to know , if yes , how ) .<br>

<br>Thanks , <br>Jaspal<br><br>The complete serial log : <br><br>[root@divecloud2 jaspal]# qemu-system-x86_64 -L foo/ -hda disk.img -m 512 -serial stdio -vnc 0:0 -cdrom ~/CentOS-5.5-i386-bin-DVD.iso <br>Could not open option rom 'vapic.bin': No such file or directory<br>

qemu-system-x86_64: pci_add_option_rom: failed to find romfile "pxe-rtl8139.rom"<br><br><br>coreboot-4.0-2087-gc5fc7db Fri Mar  9 04:04:49 IST 2012 starting...<br>Loading image.<br>Searching for fallback/coreboot_ram<br>

Check cmos_layout.bin<br>Check fallback/romstage<br>Check fallback/coreboot_ram<br>Stage: loading fallback/coreboot_ram @ 0x100000 (147456 bytes), entry @ 0x100000<br>Stage: done loading.<br>Jumping to image.<br>coreboot-4.0-2087-gc5fc7db Fri Mar  9 04:04:49 IST 2012 booting...<br>

Enumerating buses...<br>Show all devs...Before device enumeration.<br>Root Device: enabled 1<br>PCI_DOMAIN: 0000: enabled 1<br>PCI: 00:00.0: enabled 1<br>PCI: 00:01.0: enabled 1<br>PCI: 00:01.1: enabled 1<br>Compare with tree...<br>

Root Device: enabled 1<br> PCI_DOMAIN: 0000: enabled 1<br>  PCI: 00:00.0: enabled 1<br>  PCI: 00:01.0: enabled 1<br>  PCI: 00:01.1: enabled 1<br>scan_static_bus for Root Device<br>Finding PCI configuration type.<br>PCI: Using configuration type 1<br>

PCI_DOMAIN: 0000 enabled<br>PCI_DOMAIN: 0000 scanning...<br>PCI: pci_scan_bus for bus 00<br>PCI: 00:00.0 [8086/1237] ops<br>PCI: 00:00.0 [8086/1237] enabled<br>PCI: 00:01.0 [8086/7000] bus ops<br>PCI: 00:01.0 [8086/7000] enabled<br>

PCI: 00:01.1 [8086/7010] ops<br>PCI: 00:01.1 [8086/7010] enabled<br>PCI: 00:01.3 [8086/7113] bus ops<br>pwrmgt_enable: gpo default missing in devicetree.cb!<br>PCI: 00:01.3 [8086/7113] enabled<br>PCI: 00:02.0 [1013/00b8] ops<br>

PCI: 00:02.0 [1013/00b8] enabled<br>PCI: 00:03.0 [10ec/8139] enabled<br>scan_static_bus for PCI: 00:01.0<br>scan_static_bus for PCI: 00:01.0 done<br>scan_static_bus for PCI: 00:01.3<br>scan_static_bus for PCI: 00:01.3 done<br>

PCI: pci_scan_bus returning with max=000<br>scan_static_bus for Root Device done<br>done<br>Setting up VGA for PCI: 00:02.0<br>Setting PCI_BRIDGE_CTL_VGA for bridge PCI_DOMAIN: 0000<br>Setting PCI_BRIDGE_CTL_VGA for bridge Root Device<br>

Allocating resources...<br>Reading resources...<br>Root Device read_resources bus 0 link: 0<br>PCI_DOMAIN: 0000 read_resources bus 0 link: 0<br>PCI_DOMAIN: 0000 read_resources bus 0 link: 0 done<br>Root Device read_resources bus 0 link: 0 done<br>

Done reading resources.<br>Show resources in subtree (Root Device)...After reading.<br> Root Device child on link 0 PCI_DOMAIN: 0000<br>  PCI_DOMAIN: 0000 child on link 0 PCI: 00:00.0<br>  PCI_DOMAIN: 0000 resource base 0 size 0 align 0 gran 0 limit ffff flags 40040100 index 10000000<br>

  PCI_DOMAIN: 0000 resource base 0 size 0 align 0 gran 0 limit ffffffff flags 40040200 index 10000100<br>  PCI_DOMAIN: 0000 resource base fec00000 size 100000 align 0 gran 0 limit ffffffff flags e0000200 index 2<br>  PCI_DOMAIN: 0000 resource base fee00000 size 10000 align 0 gran 0 limit ffffffff flags e0000200 index 3<br>

   PCI: 00:00.0<br>   PCI: 00:01.0<br>   PCI: 00:01.0 resource base 0 size 1000 align 0 gran 0 limit ffff flags c0000100 index 1<br>   PCI: 00:01.0 resource base ff800000 size 800000 align 0 gran 0 limit 0 flags d0000200 index 2<br>

   PCI: 00:01.1<br>   PCI: 00:01.1 resource base 0 size 10 align 4 gran 4 limit ffff flags 100 index 20<br>   PCI: 00:01.3<br>   PCI: 00:01.3 resource base e400 size 40 align 0 gran 0 limit ffff flags d0000100 index 1<br>

   PCI: 00:01.3 resource base f00 size 10 align 0 gran 0 limit ffff flags d0000100 index 2<br>   PCI: 00:02.0<br>   PCI: 00:02.0 resource base 0 size 2000000 align 25 gran 25 limit ffffffff flags 1200 index 10<br>   PCI: 00:02.0 resource base 0 size 1000 align 12 gran 12 limit ffffffff flags 200 index 14<br>

   PCI: 00:02.0 resource base 0 size 10000 align 16 gran 16 limit ffffffff flags 2200 index 30<br>   PCI: 00:03.0<br>   PCI: 00:03.0 resource base 0 size 100 align 8 gran 8 limit ffff flags 100 index 10<br>   PCI: 00:03.0 resource base 0 size 100 align 8 gran 8 limit ffffffff flags 200 index 14<br>

PCI_DOMAIN: 0000 compute_resources_io: base: 0 size: 0 align: 0 gran: 0 limit: ffff<br>PCI: 00:03.0 10 *  [0x0 - 0xff] io<br>PCI: 00:01.1 20 *  [0x400 - 0x40f] io<br>PCI_DOMAIN: 0000 compute_resources_io: base: 410 size: 410 align: 8 gran: 0 limit: ffff done<br>

PCI_DOMAIN: 0000 compute_resources_mem: base: 0 size: 0 align: 0 gran: 0 limit: ffffffff<br>PCI: 00:02.0 10 *  [0x0 - 0x1ffffff] prefmem<br>PCI: 00:02.0 30 *  [0x2000000 - 0x200ffff] mem<br>PCI: 00:02.0 14 *  [0x2010000 - 0x2010fff] mem<br>

PCI: 00:03.0 14 *  [0x2011000 - 0x20110ff] mem<br>PCI_DOMAIN: 0000 compute_resources_mem: base: 2011100 size: 2011100 align: 25 gran: 0 limit: ffffffff done<br>avoid_fixed_resources: PCI_DOMAIN: 0000<br>avoid_fixed_resources:@PCI_DOMAIN: 0000 10000000 limit 0000ffff<br>

avoid_fixed_resources:@PCI_DOMAIN: 0000 10000100 limit ffffffff<br>constrain_resources: PCI_DOMAIN: 0000<br>constrain_resources: PCI: 00:00.0<br>constrain_resources: PCI: 00:01.0<br>constrain_resources: PCI: 00:01.1<br>constrain_resources: PCI: 00:01.3<br>

constrain_resources: PCI: 00:02.0<br>constrain_resources: PCI: 00:03.0<br>avoid_fixed_resources2: PCI_DOMAIN: 0000@10000000 limit 0000ffff<br>    lim->base 00001000 lim->limit 0000e3ff<br>avoid_fixed_resources2: PCI_DOMAIN: 0000@10000100 limit ffffffff<br>

    lim->base 00000000 lim->limit febfffff<br>Setting resources...<br>PCI_DOMAIN: 0000 allocate_resources_io: base:1000 size:410 align:8 gran:0 limit:e3ff<br>Assigned: PCI: 00:03.0 10 *  [0x1000 - 0x10ff] io<br>Assigned: PCI: 00:01.1 20 *  [0x1400 - 0x140f] io<br>

PCI_DOMAIN: 0000 allocate_resources_io: next_base: 1410 size: 410 align: 8 gran: 0 done<br>PCI_DOMAIN: 0000 allocate_resources_mem: base:fc000000 size:2011100 align:25 gran:0 limit:febfffff<br>Assigned: PCI: 00:02.0 10 *  [0xfc000000 - 0xfdffffff] prefmem<br>

Assigned: PCI: 00:02.0 30 *  [0xfe000000 - 0xfe00ffff] mem<br>Assigned: PCI: 00:02.0 14 *  [0xfe010000 - 0xfe010fff] mem<br>Assigned: PCI: 00:03.0 14 *  [0xfe011000 - 0xfe0110ff] mem<br>PCI_DOMAIN: 0000 allocate_resources_mem: next_base: fe011100 size: 2011100 align: 25 gran: 0 done<br>

Root Device assign_resources, bus 0 link: 0<br>Detected 524288 Kbytes (512 MiB) RAM.<br>PCI_DOMAIN: 0000 assign_resources, bus 0 link: 0<br>PCI: 00:01.1 20 <- [0x0000001400 - 0x000000140f] size 0x00000010 gran 0x04 io<br>

PCI: 00:02.0 10 <- [0x00fc000000 - 0x00fdffffff] size 0x02000000 gran 0x19 prefmem<br>PCI: 00:02.0 14 <- [0x00fe010000 - 0x00fe010fff] size 0x00001000 gran 0x0c mem<br>PCI: 00:02.0 30 <- [0x00fe000000 - 0x00fe00ffff] size 0x00010000 gran 0x10 romem<br>

PCI: 00:03.0 10 <- [0x0000001000 - 0x00000010ff] size 0x00000100 gran 0x08 io<br>PCI: 00:03.0 14 <- [0x00fe011000 - 0x00fe0110ff] size 0x00000100 gran 0x08 mem<br>PCI_DOMAIN: 0000 assign_resources, bus 0 link: 0<br>

Root Device assign_resources, bus 0 link: 0<br>Done setting resources.<br>Show resources in subtree (Root Device)...After assigning values.<br> Root Device child on link 0 PCI_DOMAIN: 0000<br>  PCI_DOMAIN: 0000 child on link 0 PCI: 00:00.0<br>

  PCI_DOMAIN: 0000 resource base 1000 size 410 align 8 gran 0 limit e3ff flags 40040100 index 10000000<br>  PCI_DOMAIN: 0000 resource base fc000000 size 2011100 align 25 gran 0 limit febfffff flags 40040200 index 10000100<br>

  PCI_DOMAIN: 0000 resource base fec00000 size 100000 align 0 gran 0 limit ffffffff flags e0000200 index 2<br>  PCI_DOMAIN: 0000 resource base fee00000 size 10000 align 0 gran 0 limit ffffffff flags e0000200 index 3<br>  PCI_DOMAIN: 0000 resource base 0 size a0000 align 0 gran 0 limit 0 flags e0004200 index a<br>

  PCI_DOMAIN: 0000 resource base c0000 size 1ff40000 align 0 gran 0 limit 0 flags e0004200 index b<br>   PCI: 00:00.0<br>   PCI: 00:01.0<br>   PCI: 00:01.0 resource base 0 size 1000 align 0 gran 0 limit ffff flags c0000100 index 1<br>

   PCI: 00:01.0 resource base ff800000 size 800000 align 0 gran 0 limit 0 flags d0000200 index 2<br>   PCI: 00:01.1<br>   PCI: 00:01.1 resource base 1400 size 10 align 4 gran 4 limit e3ff flags 60000100 index 20<br>   PCI: 00:01.3<br>

   PCI: 00:01.3 resource base e400 size 40 align 0 gran 0 limit ffff flags d0000100 index 1<br>   PCI: 00:01.3 resource base f00 size 10 align 0 gran 0 limit ffff flags d0000100 index 2<br>   PCI: 00:02.0<br>   PCI: 00:02.0 resource base fc000000 size 2000000 align 25 gran 25 limit febfffff flags 60001200 index 10<br>

   PCI: 00:02.0 resource base fe010000 size 1000 align 12 gran 12 limit febfffff flags 60000200 index 14<br>   PCI: 00:02.0 resource base fe000000 size 10000 align 16 gran 16 limit febfffff flags 60002200 index 30<br>   PCI: 00:03.0<br>

   PCI: 00:03.0 resource base 1000 size 100 align 8 gran 8 limit e3ff flags 60000100 index 10<br>   PCI: 00:03.0 resource base fe011000 size 100 align 8 gran 8 limit febfffff flags 60000200 index 14<br>Done allocating resources.<br>

Enabling resources...<br>PCI: 00:00.0 cmd <- 00<br>PCI: 00:01.0 cmd <- 00<br>PCI: 00:01.1 cmd <- 01<br>PCI: 00:01.3 cmd <- 00<br>PCI: 00:02.0 cmd <- 03<br>PCI: 00:03.0 cmd <- 03<br>done.<br>Initializing devices...<br>

Root Device init<br>PCI: 00:00.0 init<br>Keyboard init...<br>setting ethernet<br>Assigning IRQ 11 to 0:3.0<br>i8259_configure_irq_trigger: current interrupts are 0x0<br>i8259_configure_irq_trigger: try to set interrupts 0x800<br>

PCI: 00:01.0 init<br>RTC Init<br>PCI: 00:01.1 init<br>IDE: Primary IDE interface: on<br>IDE: Secondary IDE interface: on<br>IDE: Access to legacy IDE ports: off<br>PCI: 00:02.0 init<br>Searching for pci1013,00b8.rom<br>Check cmos_layout.bin<br>

Check fallback/romstage<br>Check fallback/coreboot_ram<br>Check fallback/payload<br>Check config<br>Check <br>Could not find file 'pci1013,00b8.rom'.<br>On card, ROM address for PCI: 00:02.0 = fe000000<br>PCI expansion ROM, signature 0xaa55, INIT size 0x8c00, data ptr 0x0038<br>

PCI ROM image, vendor ID 1013, device ID 00b8,<br>PCI ROM image, Class Code 030000, Code Type 00<br>Copying VGA ROM Image from fe000000 to 0xc0000, 0x8c00 bytes<br>Real mode stub @00000600: 862 bytes<br>Calling Option ROM...<br>

... Option ROM returned.<br>PCI: 00:03.0 init<br>Searching for pci10ec,8139.rom<br>Check cmos_layout.bin<br>Check fallback/romstage<br>Check fallback/coreboot_ram<br>Check fallback/payload<br>Check config<br>Check <br>Could not find file 'pci10ec,8139.rom'.<br>

Devices initialized<br>Show all devs...After init.<br>Root Device: enabled 1<br>PCI_DOMAIN: 0000: enabled 1<br>PCI: 00:00.0: enabled 1<br>PCI: 00:01.0: enabled 1<br>PCI: 00:01.1: enabled 1<br>PCI: 00:01.3: enabled 1<br>PCI: 00:02.0: enabled 1<br>

PCI: 00:03.0: enabled 1<br>Initializing CBMEM area to 0x1fff0000 (65536 bytes)<br>Adding CBMEM entry as no. 1<br>Moving GDT to 1fff0200...ok<br>High Tables Base is 1fff0000.<br>Copying Interrupt Routing Table to 0x000f0000... done.<br>

Adding CBMEM entry as no. 2<br>Copying Interrupt Routing Table to 0x1fff0400... done.<br>PIRQ table: 128 bytes.<br>Adding CBMEM entry as no. 3<br>smbios_write_tables: 1fff1400<br>Root Device (QEMU Mainboard)<br>PCI_DOMAIN: 0000 (QEMU Northbridge)<br>

PCI: 00:00.0 (QEMU Northbridge)<br>PCI: 00:01.0 (Intel 82371FB/SB/MX/AB/EB/MB Southbridge)<br>PCI: 00:01.1 (Intel 82371FB/SB/MX/AB/EB/MB Southbridge)<br>PCI: 00:01.3 ()<br>PCI: 00:02.0 ()<br>PCI: 00:03.0 ()<br>SMBIOS tables: 357 bytes.<br>

Adding CBMEM entry as no. 4<br>Writing high table forward entry at 0x00000500<br>Wrote coreboot table at: 00000500 - 00000518  checksum c3df<br>New low_table_end: 0x00000518<br>Now going to write high coreboot table at 0x1fff1c00<br>

rom_table_end = 0x1fff1c00<br>Adjust low_table_end from 0x00000518 to 0x00001000 <br>Adjust rom_table_end from 0x1fff1c00 to 0x20000000 <br>Adding high table area<br>coreboot memory table:<br> 0. 0000000000000000-0000000000000fff: CONFIGURATION TABLES<br>

 1. 0000000000001000-000000000009ffff: RAM<br> 2. 00000000000c0000-000000001ffeffff: RAM<br> 3. 000000001fff0000-000000001fffffff: CONFIGURATION TABLES<br> 4. 00000000ff800000-00000000ffffffff: RESERVED<br>Wrote coreboot table at: 1fff1c00 - 1fff1dd0  checksum fe3d<br>

coreboot table: 464 bytes.<br>Multiboot Information structure has been written.<br> 0. FREE SPACE 1fff3c00 0000c400<br> 1. GDT        1fff0200 00000200<br> 2. IRQ TABLE  1fff0400 00001000<br> 3. SMBIOS     1fff1400 00000800<br>

 4. COREBOOT   1fff1c00 00002000<br>Searching for fallback/payload<br>Check cmos_layout.bin<br>Check fallback/romstage<br>Check fallback/coreboot_ram<br>Check fallback/payload<br>Got a payload<br>Loading segment from rom address 0xfffc99b8<br>

  code (compression=1)<br>  New segment dstaddr 0xe7e04 memsize 0x181fc srcaddr 0xfffc99f0 filesize 0xc21c<br>  (cleaned up) New segment addr 0xe7e04 size 0x181fc offset 0xfffc99f0 filesize 0xc21c<br>Loading segment from rom address 0xfffc99d4<br>

  Entry Point 0x00000000<br>Loading Segment: addr: 0x00000000000e7e04 memsz: 0x00000000000181fc filesz: 0x000000000000c21c<br>lb: [0x0000000000100000, 0x0000000000124000)<br>Post relocation: addr: 0x00000000000e7e04 memsz: 0x00000000000181fc filesz: 0x000000000000c21c<br>

using LZMA<br>[ 0x000e7e04, 00100000, 0x00100000) <- fffc99f0<br>dest 000e7e04, end 00100000, bouncebuffer 1ffa8000<br>Loaded segments<br>Jumping to boot code at fc8b9<br>entry    = 0x000fc8b9<br>lb_start = 0x00100000<br>

lb_size  = 0x00024000<br>adjust   = 0x1fecc000<br>buffer   = 0x1ffa8000<br>     elf_boot_notes = 0x00110538<br>adjusted_boot_notes = 0x1ffdc538<br>Start bios (version 1.6.3-20120309_040510-redevil)<br>Found mainboard Emulation QEMU x86<br>

Found CBFS header at 0xfffffc90<br>Ram Size=0x1fff0000 (0x0000000000000000 high)<br>Relocating init from 0x000e8450 to 0x1ffd57a0 (size 42812)<br>CPU Mhz=2936<br>Found 6 PCI devices (max PCI bus is 00)<br>Found 1 cpu(s) max supported 1 cpu(s)<br>

Copying PIR from 0x1fff0400 to 0x000fdb70<br>Copying SMBIOS entry point from 0x1fff1400 to 0x000fdb50<br>Scan for VGA option rom<br>Running option rom at c000:0003<br>Turning on vga text mode console<br>SeaBIOS (version 1.6.3-20120309_040510-redevil)<br>

<br>Found 1 lpt ports<br>Found 1 serial ports<br>ATA controller 1 at 1f0/3f4/0 (irq 14 dev 9)<br>ATA controller 2 at 170/374/0 (irq 15 dev 9)<br>ata0-0: QEMU HARDDISK ATA-7 Hard-Disk (2500 MiBytes)<br>Searching bootorder for: /pci@i0cf8/*@1,1/drive@0/disk@0<br>

DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]<br>Searching bootorder for: /pci@i0cf8/*@1,1/drive@1/disk@0<br>PS2 keyboard initialized<br>All threads complete.<br>Scan for option roms<br>Press F12 for boot menu.<br><br>drive 0x000fdb00: PCHS=5079/16/63 translation=large LCHS=634/128/63 s=5120000<br>

ebda moved from 9fc00 to 9f400<br>Returned 65536 bytes of ZoneHigh<br>e820 map has 6 items:<br>  0: 0000000000000000 - 000000000009f400 = 1 RAM<br>  1: 000000000009f400 - 00000000000a0000 = 2 RESERVED<br>  2: 00000000000f0000 - 0000000000100000 = 2 RESERVED<br>

  3: 0000000000100000 - 000000001fff0000 = 1 RAM<br>  4: 000000001fff0000 - 0000000020000000 = 2 RESERVED<br>  5: 00000000ff800000 - 0000000100000000 = 2 RESERVED<br>enter handle_19:<br>  NULL<br>Booting from DVD/CD...<br>

3991MB medium detected<br>Booting from 0000:7c00<br>Changing serial settings was 0/0 now 3/0<br>In resume (status=0)<br>In 32bit resume<br>Attempting a hard reboot<br>Changing serial settings was 0/0 now 3/0<br>In resume (status=0)<br>

In 32bit resume<br>Attempting a hard reboot<br>Changing serial settings was 0/0 now 3/0<br>In resume (status=0)<br>In 32bit resume<br>Attempting a hard reboot<br>Changing serial settings was 0/0 now 3/0<br>In resume (status=0)<br>

In 32bit resume<br>Attempting a hard reboot<br><br><br><br>
</div><br>