[SeaBIOS] A20: ahci_process_op is called with A20 off

Kevin O'Connor kevin at koconnor.net
Wed May 10 21:21:08 CEST 2017


On Tue, May 09, 2017 at 08:39:07PM +0000, Xu, Anthony wrote:
> Hi All,
> 
> I recently met an issue, I can't boot my centos guest in below scenarios.
> 
> I disabled kvmvapic by
> 
> diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
> index c3829e3..52be2b0 100644
> --- a/hw/intc/apic_common.c
> +++ b/hw/intc/apic_common.c
> @@ -440,7 +440,7 @@ static const VMStateDescription vmstate_apic_common = {
>  static Property apic_properties_common[] = {
>      DEFINE_PROP_UINT8("version", APICCommonState, version, 0x14),
>      DEFINE_PROP_BIT("vapic", APICCommonState, vapic_control, VAPIC_ENABLE_BIT,
> -                    true),
> +                    false),
>      DEFINE_PROP_BOOL("legacy-instance-id", APICCommonState, legacy_instance_id,
>                       false),
>      DEFINE_PROP_END_OF_LIST(),
> 
> 
> I run Qemu in TCG mode
> 
> ./x86_64-softmmu/qemu-system-x86_64 -bios /home/root/git/seabios/out/bios.bin -machine q35 
>  -m 1G -drive format=raw,file=/home/root/images/centos7.2.img,if=ide,index=0 -nographic
>  -nodefaults  -serial stdio -monitor pty
> 
> It can't boot with below message,
> "
> Booting from Hard Disk...
> WARNING - Timeout at ahci_command:154!
> Boot failed: could not read the boot disk
> 
> enter handle_18:
>   NULL
> Booting from Floppy...
> Boot failed: could not read the boot disk
> "
> 
> Once I add kvmvapic , it can boot.
> 
> I dig into seebios code, and found ahci_process_op is called with A20 off,
> 
> The call trace is,
> process_op_16->process_op_both->call32->call32_smm->process_op_32->ahci_process_op
> 
> call32_smm calls call32_prep, but because the method is C16_SMM, A20 is not enabled in call32_prep.
> ahci_process_op is called with A20 off.

As I understand it, entering System Managament Mode (SMM) should
automatically enable A20, so it should not be necessary for call32_smm
to enable it.  Are you sure the issue is related to A20 instead of
some other issue with SMM?

-Kevin



More information about the SeaBIOS mailing list