Scott Duplichan wrote:
<..snip..>
]I have no experience with making SeaBIOS boot an embedded floppy ]image. I may be able to give this a try, but I would have to first overcome ]Windows build problems that have crept into both SeaBIOS and coreboot.
I tested the SeaBIOS virtual floppy boot with EDK2 Duet and it worked for me. I tested with the ASRock e350M1 project. Here is the cbfstool output:
scott@p67-2600k /D/coreboot/win-build-env-011/coreboot/build $ cbfstool.exe coreboot.rom print coreboot.rom: zd kB, bootblocksize 4096, romsize 1008, offset 0x400000 alignment: 0 bytes
Name Offset Type Size cmos_layout.bin 0x0 cmos_layout 1776 pci1002,9802.rom 0x740 optionrom 57856 fallback/romstage 0xe980 stage 345432 fallback/coreboot_ram 0x62f40 stage 203312 fallback/payload 0x949c0 payload 53738 config 0xa1c00 raw 3831 (empty) 0xa2b40 null 3526744
scott@p67-2600k /D/coreboot/win-build-env-011/coreboot/build $ cbfstool.exe coreboot.rom add -f /d/duetfloppy.img -n floppyimg/duetfloppy.img -t raw
scott@p67-2600k /D/coreboot/win-build-env-011/coreboot/build $ cbfstool.exe coreboot.rom print coreboot.rom: zd kB, bootblocksize 4096, romsize 1008, offset 0x400000 alignment: 0 bytes
Name Offset Type Size cmos_layout.bin 0x0 cmos_layout 1776 pci1002,9802.rom 0x740 optionrom 57856 fallback/romstage 0xe980 stage 345432 fallback/coreboot_ram 0x62f40 stage 203312 fallback/payload 0x949c0 payload 53738 config 0xa1c00 raw 3831 floppyimg/duetfloppy.img 0xa2b40 raw 1474560 (empty) 0x20ab80 null 2052120
The serial port output is attached. Here is the part where the floppy image is found:
Mapping CBFS floppy floppyimg/duetfloppy.img to addr 0xc7e53000 Searching bootorder for: /rom@floppyimg/duetfloppy.img
The floppy image name passed to cbfstool must begin with floppyimg/ because SeaBIOS is expecting that prefix. The floppy image I tested with is here: http://notabs.org/edk2-duet/coreboot/e350/
Thanks, Scott
On Wed, Oct 23, 2013 at 1:00 AM, Scott Duplichan spambucket@notabs.org wrote: Neo wrote:
]Hello ] ] There has been no response to my thread [Help required to initialize ]coreboot as Seabios (floppy mechanism for DUET) payload] since a long ]time.I have eagerly waited but no solutions have turned up. ] If Im mistaken in any way or the other please let know. ] ]Regards.... ] ]Neo. Hello,
If this is really something you want I may be able to help. Be aware that Duet is not an active EDK2 project. Duet has many problems that you must solve before it is usable. The Duet concept is sound, and is a good match for coreboot. But it is not in general a usable project as it exists in the public EDK2 archive.
Building Duet should be easy, relative to other EDK2 projects. Can you successfully build other EDK2 projects? From EFI's beginning in 1999 to recently, the only supported build toolset was Microsoft. Recently gnu build tool support was added. But because Duet is not an active project, it may not build easily with gnu tools. In addition, EDK2 does not properly support any Windows port of the gnu tools. So try building with Microsoft tools for a reference point. But be aware that EDK2 actually uses a hard-coded absolute path to the Microsoft tools. So unless your Microsoft build tools are installed in the same location as theirs, you will have to modify Basetools\Conf\ tools_def.template.
Once Duet builds, there are some basic bugs to fix. There is a memory overlap problem for example. Duet cannot work with more than 4GB of RAM if I remember correctly. These are all easy to fix. Another problem is a limitation on the DXE image size. This limitation is due to the DOS 640 KB memory limit. The DOS 640 KB limit is relevant because the image is read from disk in 16-bit mode and low memory is the most convenient place to put it. This limitation must be removed before a full featured DXE can be used.
Once all the problems are fixed, the reliance on legacy BIOS INT 13h can be removed. The image can be kept in flash and then copied to DRAM instead of reading it from a file.
One of the bigger problems is that UEFI needs a large amount of NVRAM. The size is too big to fit into CMOS. That means you need to add code to write this data to flash memory. Normally a 64-KB block of the BIOS flash chip is set aside for this use.
There are several more problems in addition to these. They can all be overcome, but it takes some time. The good thing about Duet is that it uses only the generic portion of UEFI, so it is easy to run on an emulator such as simnow or qemu for development and debug.
Duet requires that DRAM init and any other chipset initialization be complete. Duet finds DRAM by calling E820, though passing the info directly is possible. Duet does not supply ACPI tables. It finds existing ACPI tables and uses those. Same for SMBIOS.
Thanks, Scott