On 04/25/16 13:21, Laszlo Ersek wrote:
> On 04/23/16 08:39, [email protected] wrote:
>> Hi everyone,
>>     I build the Csm16.bin from source code of seabios-1.9.2.tar.gz . And 
>> copy the Csm16.bin to OvmfPkg/Csm/Csm16/Csm16.bin , Build the OVMF_CODE.fd 
>> and OVMF_VARS.fd with command build -D CSM_ENABLE.
>>    Unfortunately, I test the OVMF_CODE.fd and OVMF_VARS.fd in qemu. It 
>> failed!
>> The log is:
>>         ASSERT_EFI_ERROR (Status = Not Found)
>>         ASSERT 
>> /root/tianocore-edk2/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c(982):
>>  !EFI_ERROR (Status)
>> Any information you can provide me would be greatly appreciated.
> 
> Sorry, no idea. The assert is about a memory allocation failure (you can
> check the source code at the location captured in the assert):
> 
>   Status = AllocateLegacyMemory (
>              AllocateAddress,
>              CONVENTIONAL_MEMORY_TOP - MemorySize,
>              EFI_SIZE_TO_PAGES (MemorySize),
>              &MemoryAddress
>              );
>   ASSERT_EFI_ERROR (Status);
> 
> I don't know why it fails.
> 
> Perhaps you can experiment with older SeaBIOS releases and narrow it
> down a little. (You could also experiment with OVMF builds at different
> git commits, but I don't readily recall anything that could cause this.)
> 
> I'm adding David, Kevin and Gerd to the CC list.

I tried this. I didn't hit this specific assert, but I hit another one:

ASSERT IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c(311):
Private->BiosStart > Private->OptionRom

The problem was that SeaBIOS had grown to 256KB in size:

https://code.coreboot.org/p/seabios/source/commit/85f8fac875263

which was too big for LegacyBiosDxe.

Manually lowering CONFIG_ROM_SIZE to 128 broke the SeaBIOS CSM build for
me. However, setting the same to 192 resulted in a succesful SeaBIOS CSM
build, and a working OVMF startup as well. (I didn't try to boot an OS,
just the UEFI shell.)

The SeaBIOS commit I built at is: c8e105a4d5e52e8e7539ab1f2cd07ebe0ae9033a.

Commands:

cat >.config <<-EOT
        CONFIG_CSM=y
        CONFIG_QEMU_HARDWARE=y
        CONFIG_PERMIT_UNALIGNED_PCIROM=y
        CONFIG_DEBUG_LEVEL=20
        CONFIG_ROM_SIZE=192
EOT
yes "" | make oldconfig
make -j2 out/bios.bin


Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to