* [edk2-devel] [PATCH v2 0/1] Add support for XDSDT table
@ 2023-11-17 11:35 Dhaval Sharma
2023-11-17 11:35 ` [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Fix issue with ACPI table creation Dhaval Sharma
0 siblings, 1 reply; 5+ messages in thread
From: Dhaval Sharma @ 2023-11-17 11:35 UTC (permalink / raw)
To: devel
Enable detection of XDSDT table from ACPI HOB and use it
if it is available: https://github.com/tianocore/edk2/pull/5051
Dhaval (1):
MdeModulePkg: Fix issue with ACPI table creation
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
--
2.39.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111394): https://edk2.groups.io/g/devel/message/111394
Mute This Topic: https://groups.io/mt/102645487/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 5+ messages in thread
* [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Fix issue with ACPI table creation
2023-11-17 11:35 [edk2-devel] [PATCH v2 0/1] Add support for XDSDT table Dhaval Sharma
@ 2023-11-17 11:35 ` Dhaval Sharma
2023-11-17 17:50 ` Chiu, Chasel
0 siblings, 1 reply; 5+ messages in thread
From: Dhaval Sharma @ 2023-11-17 11:35 UTC (permalink / raw)
To: devel; +Cc: Liming Gao, Zhiguang Liu, Dandan Bi
As per spec if xDSDT is avaialble, it should be used first.
Handle required flow when xDSDT is abscent or present.
Test: Tested on RISCV64 Qemu platform with xDSDT and booted to
linux kernel.
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
---
Notes:
v2:
- Added proper indentation for else if
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
index e09bc9b704f5..11097ed4c3be 100644
--- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
+++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
@@ -1892,7 +1892,18 @@ InstallAcpiTableFromHob (
}
}
- if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->Dsdt != 0) {
+ //
+ // First check if xDSDT is available that is preferred
+ //
+ if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->XDsdt != 0) {
+ TableToInstall = (VOID *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->XDsdt;
+ Status = AddTableToList (AcpiTableInstance, TableToInstall, TRUE, Version, TRUE, &TableKey);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACPI table xDSDT\n"));
+ ASSERT_EFI_ERROR (Status);
+ break;
+ }
+ } else if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->Dsdt != 0) {
TableToInstall = (VOID *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->Dsdt;
Status = AddTableToList (AcpiTableInstance, TableToInstall, TRUE, Version, TRUE, &TableKey);
if (EFI_ERROR (Status)) {
--
2.39.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111395): https://edk2.groups.io/g/devel/message/111395
Mute This Topic: https://groups.io/mt/102645488/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Fix issue with ACPI table creation
2023-11-17 11:35 ` [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Fix issue with ACPI table creation Dhaval Sharma
@ 2023-11-17 17:50 ` Chiu, Chasel
2023-11-17 21:57 ` Laszlo Ersek
0 siblings, 1 reply; 5+ messages in thread
From: Chiu, Chasel @ 2023-11-17 17:50 UTC (permalink / raw)
To: devel@edk2.groups.io, dhaval@rivosinc.com
Cc: Gao, Liming, Liu, Zhiguang, Bi, Dandan, Chiu, Chasel
Hi Dhaval,
Just a small feedback,
the only difference will be TableToInstall between XDsdt and Dsdt, could we optimize the code flow to reduce duplicate lines?
Thanks,
Chasel
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Dhaval
> Sharma
> Sent: Friday, November 17, 2023 3:35 AM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> <zhiguang.liu@intel.com>; Bi, Dandan <dandan.bi@intel.com>
> Subject: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Fix issue with ACPI table
> creation
>
> As per spec if xDSDT is avaialble, it should be used first.
> Handle required flow when xDSDT is abscent or present.
>
> Test: Tested on RISCV64 Qemu platform with xDSDT and booted to linux kernel.
>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
> ---
>
> Notes:
> v2:
> - Added proper indentation for else if
>
> MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 13
> ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> index e09bc9b704f5..11097ed4c3be 100644
> --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> @@ -1892,7 +1892,18 @@ InstallAcpiTableFromHob (
> } } - if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
> *)ChildTable)->Dsdt != 0) {+ //+ // First check if xDSDT is available that is
> preferred+ //+ if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
> *)ChildTable)->XDsdt != 0) {+ TableToInstall = (VOID
> *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)-
> >XDsdt;+ Status = AddTableToList (AcpiTableInstance, TableToInstall,
> TRUE, Version, TRUE, &TableKey);+ if (EFI_ERROR (Status)) {+ DEBUG
> ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACPI table xDSDT\n"));+
> ASSERT_EFI_ERROR (Status);+ break;+ }+ } else if
> (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->Dsdt != 0)
> { TableToInstall = (VOID
> *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)-
> >Dsdt; Status = AddTableToList (AcpiTableInstance, TableToInstall,
> TRUE, Version, TRUE, &TableKey); if (EFI_ERROR (Status)) {--
> 2.39.2
>
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#111395): https://edk2.groups.io/g/devel/message/111395
> Mute This Topic: https://groups.io/mt/102645488/1777047
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [chasel.chiu@intel.com] -=-
> =-=-=-=-=
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111405): https://edk2.groups.io/g/devel/message/111405
Mute This Topic: https://groups.io/mt/102645488/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Fix issue with ACPI table creation
2023-11-17 17:50 ` Chiu, Chasel
@ 2023-11-17 21:57 ` Laszlo Ersek
2023-11-28 12:09 ` Dhaval Sharma
0 siblings, 1 reply; 5+ messages in thread
From: Laszlo Ersek @ 2023-11-17 21:57 UTC (permalink / raw)
To: devel, chasel.chiu, dhaval@rivosinc.com
Cc: Gao, Liming, Liu, Zhiguang, Bi, Dandan
On 11/17/23 18:50, Chiu, Chasel wrote:
>
> Hi Dhaval,
>
> Just a small feedback,
> the only difference will be TableToInstall between XDsdt and Dsdt, could we optimize the code flow to reduce duplicate lines?
since a v3 is being requested, let me ask for even more:
- can we specify the precise ACPI spec location in the commit message?
- s/abscent/absent/
thanks!
Laszlo
>
> Thanks,
> Chasel
>
>
>> -----Original Message-----
>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Dhaval
>> Sharma
>> Sent: Friday, November 17, 2023 3:35 AM
>> To: devel@edk2.groups.io
>> Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
>> <zhiguang.liu@intel.com>; Bi, Dandan <dandan.bi@intel.com>
>> Subject: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Fix issue with ACPI table
>> creation
>>
>> As per spec if xDSDT is avaialble, it should be used first.
>> Handle required flow when xDSDT is abscent or present.
>>
>> Test: Tested on RISCV64 Qemu platform with xDSDT and booted to linux kernel.
>>
>> Cc: Liming Gao <gaoliming@byosoft.com.cn>
>> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
>> Cc: Dandan Bi <dandan.bi@intel.com>
>> Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
>> ---
>>
>> Notes:
>> v2:
>> - Added proper indentation for else if
>>
>> MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 13
>> ++++++++++++-
>> 1 file changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
>> b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
>> index e09bc9b704f5..11097ed4c3be 100644
>> --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
>> +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
>> @@ -1892,7 +1892,18 @@ InstallAcpiTableFromHob (
>> } } - if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
>> *)ChildTable)->Dsdt != 0) {+ //+ // First check if xDSDT is available that is
>> preferred+ //+ if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
>> *)ChildTable)->XDsdt != 0) {+ TableToInstall = (VOID
>> *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)-
>>> XDsdt;+ Status = AddTableToList (AcpiTableInstance, TableToInstall,
>> TRUE, Version, TRUE, &TableKey);+ if (EFI_ERROR (Status)) {+ DEBUG
>> ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACPI table xDSDT\n"));+
>> ASSERT_EFI_ERROR (Status);+ break;+ }+ } else if
>> (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->Dsdt != 0)
>> { TableToInstall = (VOID
>> *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)-
>>> Dsdt; Status = AddTableToList (AcpiTableInstance, TableToInstall,
>> TRUE, Version, TRUE, &TableKey); if (EFI_ERROR (Status)) {--
>> 2.39.2
>>
>>
>>
>> -=-=-=-=-=-=
>> Groups.io Links: You receive all messages sent to this group.
>> View/Reply Online (#111395): https://edk2.groups.io/g/devel/message/111395
>> Mute This Topic: https://groups.io/mt/102645488/1777047
>> Group Owner: devel+owner@edk2.groups.io
>> Unsubscribe: https://edk2.groups.io/g/devel/unsub [chasel.chiu@intel.com] -=-
>> =-=-=-=-=
>>
>
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111418): https://edk2.groups.io/g/devel/message/111418
Mute This Topic: https://groups.io/mt/102645488/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Fix issue with ACPI table creation
2023-11-17 21:57 ` Laszlo Ersek
@ 2023-11-28 12:09 ` Dhaval Sharma
0 siblings, 0 replies; 5+ messages in thread
From: Dhaval Sharma @ 2023-11-28 12:09 UTC (permalink / raw)
To: Laszlo Ersek; +Cc: devel, chasel.chiu, Gao, Liming, Liu, Zhiguang, Bi, Dandan
[-- Attachment #1: Type: text/plain, Size: 4065 bytes --]
Sent an updated patch already.
On Sat, Nov 18, 2023 at 3:27 AM Laszlo Ersek <lersek@redhat.com> wrote:
> On 11/17/23 18:50, Chiu, Chasel wrote:
> >
> > Hi Dhaval,
> >
> > Just a small feedback,
> > the only difference will be TableToInstall between XDsdt and Dsdt, could
> we optimize the code flow to reduce duplicate lines?
>
> since a v3 is being requested, let me ask for even more:
>
> - can we specify the precise ACPI spec location in the commit message?
>
> - s/abscent/absent/
>
> thanks!
> Laszlo
>
> >
> > Thanks,
> > Chasel
> >
> >
> >> -----Original Message-----
> >> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Dhaval
> >> Sharma
> >> Sent: Friday, November 17, 2023 3:35 AM
> >> To: devel@edk2.groups.io
> >> Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> >> <zhiguang.liu@intel.com>; Bi, Dandan <dandan.bi@intel.com>
> >> Subject: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Fix issue with ACPI
> table
> >> creation
> >>
> >> As per spec if xDSDT is avaialble, it should be used first.
> >> Handle required flow when xDSDT is abscent or present.
> >>
> >> Test: Tested on RISCV64 Qemu platform with xDSDT and booted to linux
> kernel.
> >>
> >> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> >> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> >> Cc: Dandan Bi <dandan.bi@intel.com>
> >> Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
> >> ---
> >>
> >> Notes:
> >> v2:
> >> - Added proper indentation for else if
> >>
> >> MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 13
> >> ++++++++++++-
> >> 1 file changed, 12 insertions(+), 1 deletion(-)
> >>
> >> diff --git
> a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> >> b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> >> index e09bc9b704f5..11097ed4c3be 100644
> >> --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> >> +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> >> @@ -1892,7 +1892,18 @@ InstallAcpiTableFromHob (
> >> } } - if
> (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
> >> *)ChildTable)->Dsdt != 0) {+ //+ // First check if xDSDT
> is available that is
> >> preferred+ //+ if
> (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE
> >> *)ChildTable)->XDsdt != 0) {+ TableToInstall = (VOID
> >> *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)-
> >>> XDsdt;+ Status = AddTableToList (AcpiTableInstance,
> TableToInstall,
> >> TRUE, Version, TRUE, &TableKey);+ if (EFI_ERROR (Status)) {+
> DEBUG
> >> ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACPI table
> xDSDT\n"));+
> >> ASSERT_EFI_ERROR (Status);+ break;+ }+ }
> else if
> >> (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->Dsdt != 0)
> >> { TableToInstall = (VOID
> >> *)(UINTN)((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)-
> >>> Dsdt; Status = AddTableToList (AcpiTableInstance,
> TableToInstall,
> >> TRUE, Version, TRUE, &TableKey); if (EFI_ERROR (Status)) {--
> >> 2.39.2
> >>
> >>
> >>
> >> -=-=-=-=-=-=
> >> Groups.io Links: You receive all messages sent to this group.
> >> View/Reply Online (#111395):
> https://edk2.groups.io/g/devel/message/111395
> >> Mute This Topic: https://groups.io/mt/102645488/1777047
> >> Group Owner: devel+owner@edk2.groups.io
> >> Unsubscribe: https://edk2.groups.io/g/devel/unsub [
> chasel.chiu@intel.com] -=-
> >> =-=-=-=-=
> >>
> >
> >
> >
> >
> >
> >
>
>
--
Thanks!
=D
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111809): https://edk2.groups.io/g/devel/message/111809
Mute This Topic: https://groups.io/mt/102645488/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 6622 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-28 12:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-17 11:35 [edk2-devel] [PATCH v2 0/1] Add support for XDSDT table Dhaval Sharma
2023-11-17 11:35 ` [edk2-devel] [PATCH v2 1/1] MdeModulePkg: Fix issue with ACPI table creation Dhaval Sharma
2023-11-17 17:50 ` Chiu, Chasel
2023-11-17 21:57 ` Laszlo Ersek
2023-11-28 12:09 ` Dhaval Sharma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox