From: "Corvin Köhne" <corvink@FreeBSD.org>
To: Rebecca Cran <rebecca@bsdio.com>, devel@edk2.groups.io
Cc: Michael D Kinney <michael.d.kinney@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Zhiguang Liu <zhiguang.liu@intel.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Jiewen Yao <jiewen.yao@intel.com>,
Jordan Justen <jordan.l.justen@intel.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Peter Grehan <grehan@freebsd.org>
Subject: Re: [PATCH 1/1] OvmfPkg/BhyveBhf: install bhyve's ACPI tables
Date: Wed, 03 May 2023 09:43:47 +0200 [thread overview]
Message-ID: <b590c142e1d3392ee440eac691e4b82fba4667d3.camel@FreeBSD.org> (raw)
In-Reply-To: <9674be05-5e62-607b-da80-50ce55b2e203@bsdio.com>
[-- Attachment #1: Type: text/plain, Size: 6688 bytes --]
On Tue, 2023-05-02 at 20:25 -0600, Rebecca Cran wrote:
> I applied the patch and tested it. The UEFI Shell command "acpiview"
> reports an error. I enabled the "acpiview" command with the patch:
>
>
> diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc
> index d0d2712c5662..0c04e4834cf7 100644
> --- a/OvmfPkg/Bhyve/BhyveX64.dsc
> +++ b/OvmfPkg/Bhyve/BhyveX64.dsc
> @@ -785,6 +785,7 @@ [Components]
> NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comma
> ndsLib.inf
> NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1C
> ommandsLib.inf
> NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1C
> ommandsLib.inf
> +
> NULL|ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCo
> mmandLib.inf
> !if $(NETWORK_IP6_ENABLE) == TRUE
> NULL|ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2C
> ommandsLib.inf
> !endif
>
>
> The bhyve command I used is:
>
> bhyve -AHP -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap1 -s
> 3:0,virtio-blk,./guest.img -s
> 4:0,ahci-cd,/home/bcran/FreeBSD-14.0-CURRENT-amd64-20230427-
> 60167184abd5-262599-disc1.iso
> -c 4 -m 1G -s 29,fbuf,tcp=0.0.0.0:5900,w=1280,h=1024,wait -s
> 30,xhci,tablet -l
> bootrom,/home/bcran/src/uefi/edk2/Build/BhyveX64/DEBUG_GCC5/FV/BHYVE_
> CODE.fd,/home/bcran/src/uefi/edk2/Build/BhyveX64/DEBUG_GCC5/FV/BHYVE_
> VARS.fd
> -l com1,stdio guest
>
>
> MADT :
> Signature : APIC
> Length : 114
> Revision : 1
> Checksum : 0x66
> Oem ID : BHYVE
> Oem Table ID : BVAPIC
> Oem Revision : 0x1
> Creator ID : BASL
> Creator Revision : 0x20220504
> Local Interrupt Controller Address : 0xFEE00000
> Flags : 0x1
> PROCESSOR LOCAL APIC :
> Type : 0x0
> Length : 8
> ACPI Processor UID : 0x0
> APIC ID : 0x0
> Flags : 0x1
> Enabled : 1
> Online Capable : 0
> Reserved : 0
>
> PROCESSOR LOCAL APIC :
> Type : 0x0
> Length : 8
> ACPI Processor UID : 0x1
> APIC ID : 0x1
> Flags : 0x1
> Enabled : 1
> Online Capable : 0
> Reserved : 0
>
> PROCESSOR LOCAL APIC :
> Type : 0x0
> Length : 8
> ACPI Processor UID : 0x2
> APIC ID : 0x2
> Flags : 0x1
> Enabled : 1
> Online Capable : 0
> Reserved : 0
>
> PROCESSOR LOCAL APIC :
> Type : 0x0
> Length : 8
> ACPI Processor UID : 0x3
> APIC ID : 0x3
> Flags : 0x1
> Enabled : 1
> Online Capable : 0
> Reserved : 0
>
> IO APIC :
> Type : 0x1
> Length : 12
> I/O APIC ID : 0x0
> Reserved : 0x0
> I/O APIC Address : 0xFEC00000
> Global System Interrupt Base : 0x0
> INTERRUPT SOURCE OVERRIDE :
> Type : 0x2
> Length : 10
> Bus : 0x0
> Source : 0x0
> Global System Interrupt : 0x2
> Flags : 0x5
> INTERRUPT SOURCE OVERRIDE :
> Type : 0x2
> Length : 10
> Bus : 0x0
> Source : 0x9
> Global System Interrupt : 0x9
> Flags : 0xF
> ERROR: Unknown Interrupt Controller Structure, Type = 4, Length = 6
>
>
Hi Rebecca,
thanks for checking. Type 4 is the local ACPI NMI entry. See
https://github.com/freebsd/freebsd-src/blob/1d7355248b5cf3b0d09247c6c7c4ff2d40c39945/usr.sbin/bhyve/acpi.c#L627-L636
It's described in ACPI spec 6.5 chapter 5.2.12.7.
--
Kind regards,
Corvin
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-05-03 7:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230417114601.398383-1-corvink@FreeBSD.org>
2023-04-17 11:53 ` [PATCH 1/1] OvmfPkg/BhyveBhf: install bhyve's ACPI tables Rebecca Cran
2023-05-03 2:25 ` Rebecca Cran
2023-05-03 7:43 ` Corvin Köhne [this message]
2023-05-03 14:50 ` Rebecca Cran
2023-04-17 12:14 ` Gerd Hoffmann
2023-04-17 12:45 ` Corvin Köhne
2023-04-17 15:15 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b590c142e1d3392ee440eac691e4b82fba4667d3.camel@FreeBSD.org \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox