[edk2-devel] [PATCH v2] OvmfPkg: Update I/O port related to ACPI devices for CloudHv

Boeuf, Sebastien sebastien.boeuf at intel.com
Tue Sep 6 16:06:49 UTC 2022


Sounds good, I'll have a look at these tomorrow and I'll try to come up with a proper patch :)

Thanks,
Sebastien
________________________________
From: Yao, Jiewen <jiewen.yao at intel.com>
Sent: Tuesday, September 6, 2022 5:57:16 PM
To: Boeuf, Sebastien <sebastien.boeuf at intel.com>
Cc: Justen, Jordan L <jordan.l.justen at intel.com>; kraxel at redhat.com <kraxel at redhat.com>; devel at edk2.groups.io <devel at edk2.groups.io>
Subject: RE: [PATCH v2] OvmfPkg: Update I/O port related to ACPI devices for CloudHv


One good example is in UefiPayloadPkg.



  1.  At entrypoint, the UefiPayload parses the ACPI table and build gUefiAcpiBoardInfoGuid. https://github.com/tianocore/edk2/blob/master/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c#L23



  1.  Later, AcpiTimer driver uses the ACPI data in gUefiAcpiBoardInfoGuid. https://github.com/tianocore/edk2/blob/master/UefiPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.c#L49



  1.  Other driver may also use the ACPI data, such as PciExpressAddress. (from MCFG). https://github.com/tianocore/edk2/blob/master/UefiPayloadPkg/Library/PciSegmentInfoLibAcpiBoardInfo/PciSegmentInfoLibAcpiBoardInfo.c#L55





Thank you

Yao Jiewen





From: Boeuf, Sebastien <sebastien.boeuf at intel.com>
Sent: Tuesday, September 6, 2022 11:41 PM
To: Yao, Jiewen <jiewen.yao at intel.com>
Cc: Justen, Jordan L <jordan.l.justen at intel.com>; kraxel at redhat.com; devel at edk2.groups.io
Subject: Re: [PATCH v2] OvmfPkg: Update I/O port related to ACPI devices for CloudHv



Hi Jiewen,



We patched Cloud Hypervisor to support both I/O ports for at least two versions. And of course at some point users will have to rely on latest CloudHv binary (which we always build).



One improvement could be to retrieve the I/O ports addresses from the FADT table. Do you know if there's some code already doing that in OVMF?



Thanks,

Sebastien

________________________________

From: Yao, Jiewen <jiewen.yao at intel.com<mailto:jiewen.yao at intel.com>>
Sent: Tuesday, September 6, 2022 4:27 PM
To: Boeuf, Sebastien <sebastien.boeuf at intel.com<mailto:sebastien.boeuf at intel.com>>
Cc: Justen, Jordan L <jordan.l.justen at intel.com<mailto:jordan.l.justen at intel.com>>; kraxel at redhat.com<mailto:kraxel at redhat.com> <kraxel at redhat.com<mailto:kraxel at redhat.com>>; devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>>
Subject: RE: [PATCH v2] OvmfPkg: Update I/O port related to ACPI devices for CloudHv



This seems a big incompatible change.



I feel this is weird to hardcode the configuration here.



How the OVMF binary knows it runs on a new CloudHv or old CloudHv?



Can we have a mechanism to detect the data at runtime? E.g. read some PCI register ?









From: Boeuf, Sebastien <sebastien.boeuf at intel.com<mailto:sebastien.boeuf at intel.com>>
Sent: Tuesday, September 6, 2022 10:08 PM
To: Yao, Jiewen <jiewen.yao at intel.com<mailto:jiewen.yao at intel.com>>
Cc: Justen, Jordan L <jordan.l.justen at intel.com<mailto:jordan.l.justen at intel.com>>; kraxel at redhat.com<mailto:kraxel at redhat.com>; devel at edk2.groups.io<mailto:devel at edk2.groups.io>
Subject: Re: [PATCH v2] OvmfPkg: Update I/O port related to ACPI devices for CloudHv



Hi Jiewen,



Do you think this could be merged?



Thanks,

Sebastien

________________________________

From: Boeuf, Sebastien <sebastien.boeuf at intel.com<mailto:sebastien.boeuf at intel.com>>
Sent: Friday, August 19, 2022 11:59 AM
To: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>>
Cc: Yao, Jiewen <jiewen.yao at intel.com<mailto:jiewen.yao at intel.com>>; Justen, Jordan L <jordan.l.justen at intel.com<mailto:jordan.l.justen at intel.com>>; kraxel at redhat.com<mailto:kraxel at redhat.com> <kraxel at redhat.com<mailto:kraxel at redhat.com>>; Boeuf, Sebastien <sebastien.boeuf at intel.com<mailto:sebastien.boeuf at intel.com>>
Subject: [PATCH v2] OvmfPkg: Update I/O port related to ACPI devices for CloudHv



From: Sebastien Boeuf <sebastien.boeuf at intel.com<mailto:sebastien.boeuf at intel.com>>

Both ACPI shutdown and ACPI PM timer devices has been moved to different
port addresses in the latest version of Cloud Hypervisor. These changes
need to be reflected on the OVMF firmware.

Acked-by: Gerd Hoffmann <kraxel at redhat.com<mailto:kraxel at redhat.com>>
Signed-off-by: Sebastien Boeuf <sebastien.boeuf at intel.com<mailto:sebastien.boeuf at intel.com>>
---
 OvmfPkg/Include/IndustryStandard/CloudHv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/OvmfPkg/Include/IndustryStandard/CloudHv.h b/OvmfPkg/Include/IndustryStandard/CloudHv.h
index d31ecc9eec..527c236f48 100644
--- a/OvmfPkg/Include/IndustryStandard/CloudHv.h
+++ b/OvmfPkg/Include/IndustryStandard/CloudHv.h
@@ -16,12 +16,12 @@
 //

 // ACPI timer address

 //

-#define CLOUDHV_ACPI_TIMER_IO_ADDRESS  0xb008

+#define CLOUDHV_ACPI_TIMER_IO_ADDRESS  0x0608



 //

 // ACPI shutdown device address

 //

-#define CLOUDHV_ACPI_SHUTDOWN_IO_ADDRESS  0x03c0

+#define CLOUDHV_ACPI_SHUTDOWN_IO_ADDRESS  0x0600



 //

 // 32-bit MMIO memory hole base address

--
2.34.1
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 5 208 026.16 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#93241): https://edk2.groups.io/g/devel/message/93241
Mute This Topic: https://groups.io/mt/93121228/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20220906/1c4c066f/attachment-0001.htm>


More information about the edk2-devel-archive mailing list