From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=cLlHwU+/; spf=pass (domain: linaro.org, ip: 209.85.166.195, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-it1-f195.google.com (mail-it1-f195.google.com [209.85.166.195]) by groups.io with SMTP; Tue, 16 Apr 2019 09:21:05 -0700 Received: by mail-it1-f195.google.com with SMTP id f22so33514579ita.3 for ; Tue, 16 Apr 2019 09:21:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=64G4k5vaTex48pI7v1XaztLVRkMKKFmc9Um/li8UBIw=; b=cLlHwU+/EXBISmaZEjuerQ882bAMNkvOafy12pjfxB9GthoPM2sDHvMAlm+ymaILfe QviXpvBR+fNlhTMi9e8WAn4R9tVdNR8zWT9h0BMjKNys/3JtV+fGFJVKwnTOx3NC4b0W xyrVEyvrKrr5lhCFSQaejbFcuzsIRa3xjl6WWY3IyidFM+DRn8CPAtD1mDmnLJDyoi/y ytmoNLQV7YSsw9g4VsVTnv2ZVzIZMrlbiywl01Nnr5sY86tcRnNx4Z727UF9/Nk7vDuC xym7x+vFTIzanwu8hP3osr23w3LrsPEJPlMBsJgdyrSlm6uGk47Qu/tfCAw4f4P1yHhF W4sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=64G4k5vaTex48pI7v1XaztLVRkMKKFmc9Um/li8UBIw=; b=sGGFv0SMmZozQ3xjINBj1oRvm9v2yspG2cUoWR9JaVXyui/BQnM4gxx45FnrdMhyFf CM+IQH/WXiVj5h/NaN7B8eeaYh3fXkEyfMElENQgezbxthNiKC6jBEm/DWog51Sct+sf hMittbA40MA3Cb1Hj7JFIjIJObA6IUuoJEYMAbfHyK1vS4DTGqmZ9z4sSDeE/LW8SzhI udjSRIxUrhhiNUclmzI6Qgd5S/Rx1Wzm1Zw8dFQlErhgpqPzuktXAATAIwAZaJWASYAc FgfB4mErn8wVt8BRvVBA46oC1zOyv0XJgtWwgRq+d1f/B2/vCID5DFUWsFHi37KUgS5C +6lw== X-Gm-Message-State: APjAAAU9YGA/315b95rghE+Kp74jBSjcpttM7+NNDBoVk8OC4DSlSA/M quZLttpal27TBatX5AKfb3UsKq3FPB5lLwKv/P0i7Q== X-Google-Smtp-Source: APXvYqxiPCErj1BoZ4mP3zliOUDjGc9v5LBhwECKH3sRnLK1w9Hwycu+ZhrywU0dj46CT76OpmXORH9lSjDUnPe2xMs= X-Received: by 2002:a24:41cd:: with SMTP id b74mr17415120itd.100.1555431664402; Tue, 16 Apr 2019 09:21:04 -0700 (PDT) MIME-Version: 1.0 References: <20190414195233.30045-1-ard.biesheuvel@linaro.org> <20190414195233.30045-4-ard.biesheuvel@linaro.org> <20190416060224.GH21677@GaryWorkstation> In-Reply-To: <20190416060224.GH21677@GaryWorkstation> From: "Ard Biesheuvel" Date: Tue, 16 Apr 2019 09:20:53 -0700 Message-ID: Subject: Re: [edk2-devel] [PATCH v6 3/7] MdeModulePkg/PciBusDxe: dispatch option ROMs for foreign architectures To: Gary Lin Cc: edk2-devel-groups-io , Michael D Kinney , Andrew Fish , Leif Lindholm , Star Zeng , Eric Dong , Ruiyu Ni , Liming Gao , Jaben Carsey , Steven Shi , Jian J Wang , Hao Wu Content-Type: text/plain; charset="UTF-8" On Mon, 15 Apr 2019 at 23:02, Gary Lin wrote: > > On Sun, Apr 14, 2019 at 12:52:29PM -0700, Ard Biesheuvel wrote: > > Delete the explicit machine type check for option ROM images, and instead, > > rely on the LoadImage() boot service to decide whether an option ROM can > > be dispatched or not. This permits platforms to ship with emulators to > > execute option ROMs that are not native to the processor architecture. > > > After applying this patch, my OVMF VM failed to boot if e1000 or iPXE > were enabled. It failed with the following message: > > Loading driver at 0x0007E537000 EntryPoint=0x0007E53C06D 8086100e.efi > InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7F003B98 > ProtectUefiImageCommon - 0x7F002BC0 > - 0x000000007E537000 - 0x000000000009F900 > Image type IA32 can't be started on X64 UEFI system. > ASSERT MdeModulePkg/Core/Dxe/Mem/Pool.c(698): Head->Signature == ((('p') | ('h' << 8)) | ((('d') | ('0' << 8)) << 16)) || Head->Signature == ((('p') | ('h' << 8)) | ((('d') | ('1' << 8)) << 16)) > > It seems OVMF was trying to load the IA32 driver and failed. > Thanks Gary, I am looking into this. It should fail gracefully after failing to start the image, but perhaps we should not attempt to start cross-type images in the first place (which is closer to the previous situation) -- Ard.