* [edk2-devel] [PATCH v5 0/1] MdeModulePkg/AcpiTableDxe: Prefer xDSDT over DSDT when installing tables @ 2024-01-28 13:39 Dhaval Sharma 2024-01-28 13:39 ` [edk2-devel] [PATCH v5 1/1] " Dhaval Sharma 0 siblings, 1 reply; 7+ messages in thread From: Dhaval Sharma @ 2024-01-28 13:39 UTC (permalink / raw) To: devel; +Cc: gaoliming, zhiguang.liu, dandan.bi, pedro.falcato, chasel.chiu As per ACPI Spec 6.5+ Table 5-9 if xDSDT is available, it should be used first. Handle required flow when xDSDT is absent or present. Test: Tested on RISCV64 Qemu platform with xDSDT and booted to linux kernel. Cc: Liming Gao <gaoliming@...> Cc: Zhiguang Liu <zhiguang.liu@...> Cc: Dandan Bi <dandan.bi@...> Cc: Pedro Falcato <pedro.falcato@...> Cc: devel@edk2.groups.io Signed-off-by: Dhaval Sharma <dhaval@...> Acked-by: Chasel Chiu <chasel.chiu@...> Notes: v5: - If DSDT is not found, throw error and continue to build other tables with an error log v4: - Fix typos and commit message adding more clarity to patch subject v3: - Added description of ACPI spec clarification based on which this patch is created - Optimizing if-else flow v2: - Added proper indentation for else if https://github.com/tianocore/edk2/pull/5311 Dhaval (1): MdeModulePkg/AcpiTableDxe: Prefer xDSDT over DSDT when installing tables MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 24 ++++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) -- 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114654): https://edk2.groups.io/g/devel/message/114654 Mute This Topic: https://groups.io/mt/104011825/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 7+ messages in thread
* [edk2-devel] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: Prefer xDSDT over DSDT when installing tables 2024-01-28 13:39 [edk2-devel] [PATCH v5 0/1] MdeModulePkg/AcpiTableDxe: Prefer xDSDT over DSDT when installing tables Dhaval Sharma @ 2024-01-28 13:39 ` Dhaval Sharma 2024-01-30 1:21 ` 回复: " gaoliming via groups.io [not found] ` <17AEFB5BFEE74D09.16647@groups.io> 0 siblings, 2 replies; 7+ messages in thread From: Dhaval Sharma @ 2024-01-28 13:39 UTC (permalink / raw) To: devel; +Cc: gaoliming, zhiguang.liu, dandan.bi, pedro.falcato, chasel.chiu As per ACPI Spec 6.5+ Table 5-9 if xDSDT is available, it should be used first. Handle required flow when xDSDT is absent or present. Test: Tested on RISCV64 Qemu platform with xDSDT and booted to linux kernel. Cc: Liming Gao <gaoliming@...> Cc: Zhiguang Liu <zhiguang.liu@...> Cc: Dandan Bi <dandan.bi@...> Cc: Pedro Falcato <pedro.falcato@...> Cc: devel@edk2.groups.io Signed-off-by: Dhaval Sharma <dhaval@...> Acked-by: Chasel Chiu <chasel.chiu@...> --- Notes: v5: - If DSDT is not found, throw error and continue to build other tables v4: - Fix typos and commit message adding more clarity to patch subject v3: - Added description of ACPI spec clarification based on which this patch is created - Optimizing if-else flow v2: - Added proper indentation for else if MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 24 ++++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c index e09bc9b704f5..3879e10b3349 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c @@ -1892,14 +1892,24 @@ InstallAcpiTableFromHob ( } } - if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)ChildTable)->Dsdt != 0) { + // + // First check if xDSDT is available, as that is preferred as per + // ACPI Spec 6.5+ Table 5-9 X_DSDT definition + // + 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; + } 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)) { - DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACPI table DSDT\n")); - ASSERT_EFI_ERROR (Status); - break; - } + } else { + DEBUG ((DEBUG_ERROR, "DSDT table not found\n")); + continue; + } + + Status = AddTableToList (AcpiTableInstance, TableToInstall, TRUE, Version, TRUE, &TableKey); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add ACPI table DSDT\n")); + ASSERT_EFI_ERROR (Status); + break; } } } -- 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114655): https://edk2.groups.io/g/devel/message/114655 Mute This Topic: https://groups.io/mt/104011845/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] 7+ messages in thread
* 回复: [edk2-devel] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: Prefer xDSDT over DSDT when installing tables 2024-01-28 13:39 ` [edk2-devel] [PATCH v5 1/1] " Dhaval Sharma @ 2024-01-30 1:21 ` gaoliming via groups.io [not found] ` <17AEFB5BFEE74D09.16647@groups.io> 1 sibling, 0 replies; 7+ messages in thread From: gaoliming via groups.io @ 2024-01-30 1:21 UTC (permalink / raw) To: devel, dhaval; +Cc: zhiguang.liu, dandan.bi, pedro.falcato, chasel.chiu This version is good to me. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> > -----邮件原件----- > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Dhaval > Sharma > 发送时间: 2024年1月28日 21:39 > 收件人: devel@edk2.groups.io > 抄送: gaoliming@byosoft.com.cn; zhiguang.liu@intel.com; > dandan.bi@intel.com; pedro.falcato@gmail.com; chasel.chiu@intel.com > 主题: [edk2-devel] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: Prefer > xDSDT over DSDT when installing tables > > As per ACPI Spec 6.5+ Table 5-9 if xDSDT is available, > it should be used first. Handle required flow when xDSDT > is absent or present. > > Test: Tested on RISCV64 Qemu platform with xDSDT and booted to > linux kernel. > > Cc: Liming Gao <gaoliming@...> > Cc: Zhiguang Liu <zhiguang.liu@...> > Cc: Dandan Bi <dandan.bi@...> > Cc: Pedro Falcato <pedro.falcato@...> > Cc: devel@edk2.groups.io > Signed-off-by: Dhaval Sharma <dhaval@...> > Acked-by: Chasel Chiu <chasel.chiu@...> > --- > > Notes: > v5: > - If DSDT is not found, throw error and continue to build other tables > v4: > - Fix typos and commit message adding more clarity to patch subject > v3: > - Added description of ACPI spec clarification based on which this patch is > created > - Optimizing if-else flow > v2: > - Added proper indentation for else if > > MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 24 > ++++++++++++++------ > 1 file changed, 17 insertions(+), 7 deletions(-) > > diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > index e09bc9b704f5..3879e10b3349 100644 > --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > @@ -1892,14 +1892,24 @@ InstallAcpiTableFromHob ( > } > } > > - if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE > *)ChildTable)->Dsdt != 0) { > + // > + // First check if xDSDT is available, as that is preferred as per > + // ACPI Spec 6.5+ Table 5-9 X_DSDT definition > + // > + 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; > + } 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)) { > - DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to > add ACPI table DSDT\n")); > - ASSERT_EFI_ERROR (Status); > - break; > - } > + } else { > + DEBUG ((DEBUG_ERROR, "DSDT table not found\n")); > + continue; > + } > + > + Status = AddTableToList (AcpiTableInstance, TableToInstall, TRUE, > Version, TRUE, &TableKey); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to add > ACPI table DSDT\n")); > + ASSERT_EFI_ERROR (Status); > + break; > } > } > } > -- > 2.39.2 > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114754): https://edk2.groups.io/g/devel/message/114754 Mute This Topic: https://groups.io/mt/104045452/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <17AEFB5BFEE74D09.16647@groups.io>]
* [edk2-devel] 回复: [edk2-stable202402] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: Prefer xDSDT over DSDT when installing tables [not found] ` <17AEFB5BFEE74D09.16647@groups.io> @ 2024-02-15 1:41 ` gaoliming via groups.io 2024-02-15 9:56 ` Leif Lindholm 0 siblings, 1 reply; 7+ messages in thread From: gaoliming via groups.io @ 2024-02-15 1:41 UTC (permalink / raw) To: devel, gaoliming, dhaval Cc: zhiguang.liu, dandan.bi, pedro.falcato, chasel.chiu, 'Laszlo Ersek', 'Leif Lindholm', 'Andrew Fish', michael.d.kinney Hi, all This patch was reviewed before soft feature freeze. I would like to merge it for this stable tag. If you have any comments, please reply this mail. Thanks Liming > -----邮件原件----- > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 gaoliming via > groups.io > 发送时间: 2024年1月30日 9:21 > 收件人: devel@edk2.groups.io; dhaval@rivosinc.com > 抄送: zhiguang.liu@intel.com; dandan.bi@intel.com; > pedro.falcato@gmail.com; chasel.chiu@intel.com > 主题: 回复: [edk2-devel] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: > Prefer xDSDT over DSDT when installing tables > > This version is good to me. Reviewed-by: Liming Gao > <gaoliming@byosoft.com.cn> > > > -----邮件原件----- > > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Dhaval > > Sharma > > 发送时间: 2024年1月28日 21:39 > > 收件人: devel@edk2.groups.io > > 抄送: gaoliming@byosoft.com.cn; zhiguang.liu@intel.com; > > dandan.bi@intel.com; pedro.falcato@gmail.com; chasel.chiu@intel.com > > 主题: [edk2-devel] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: Prefer > > xDSDT over DSDT when installing tables > > > > As per ACPI Spec 6.5+ Table 5-9 if xDSDT is available, > > it should be used first. Handle required flow when xDSDT > > is absent or present. > > > > Test: Tested on RISCV64 Qemu platform with xDSDT and booted to > > linux kernel. > > > > Cc: Liming Gao <gaoliming@...> > > Cc: Zhiguang Liu <zhiguang.liu@...> > > Cc: Dandan Bi <dandan.bi@...> > > Cc: Pedro Falcato <pedro.falcato@...> > > Cc: devel@edk2.groups.io > > Signed-off-by: Dhaval Sharma <dhaval@...> > > Acked-by: Chasel Chiu <chasel.chiu@...> > > --- > > > > Notes: > > v5: > > - If DSDT is not found, throw error and continue to build other tables > > v4: > > - Fix typos and commit message adding more clarity to patch subject > > v3: > > - Added description of ACPI spec clarification based on which this > patch is > > created > > - Optimizing if-else flow > > v2: > > - Added proper indentation for else if > > > > MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 24 > > ++++++++++++++------ > > 1 file changed, 17 insertions(+), 7 deletions(-) > > > > diff --git > a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > > b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > > index e09bc9b704f5..3879e10b3349 100644 > > --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > > +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > > @@ -1892,14 +1892,24 @@ InstallAcpiTableFromHob ( > > } > > } > > > > - if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE > > *)ChildTable)->Dsdt != 0) { > > + // > > + // First check if xDSDT is available, as that is preferred as per > > + // ACPI Spec 6.5+ Table 5-9 X_DSDT definition > > + // > > + 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; > > + } 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)) { > > - DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to > > add ACPI table DSDT\n")); > > - ASSERT_EFI_ERROR (Status); > > - break; > > - } > > + } else { > > + DEBUG ((DEBUG_ERROR, "DSDT table not found\n")); > > + continue; > > + } > > + > > + Status = AddTableToList (AcpiTableInstance, TableToInstall, TRUE, > > Version, TRUE, &TableKey); > > + if (EFI_ERROR (Status)) { > > + DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to > add > > ACPI table DSDT\n")); > > + ASSERT_EFI_ERROR (Status); > > + break; > > } > > } > > } > > -- > > 2.39.2 > > > > > > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115476): https://edk2.groups.io/g/devel/message/115476 Mute This Topic: https://groups.io/mt/104365766/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [edk2-devel] 回复: [edk2-stable202402] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: Prefer xDSDT over DSDT when installing tables 2024-02-15 1:41 ` [edk2-devel] 回复: [edk2-stable202402] " gaoliming via groups.io @ 2024-02-15 9:56 ` Leif Lindholm 2024-02-15 10:40 ` Dhaval Sharma 0 siblings, 1 reply; 7+ messages in thread From: Leif Lindholm @ 2024-02-15 9:56 UTC (permalink / raw) To: devel, gaoliming, dhaval Cc: zhiguang.liu, dandan.bi, pedro.falcato, chasel.chiu, 'Laszlo Ersek', 'Andrew Fish', michael.d.kinney Hi Liming, On 2024-02-15 01:41, gaoliming via groups.io wrote: > Hi, all > This patch was reviewed before soft feature freeze. I would like to merge > it for this stable tag. If you have any comments, please reply this mail. I agree this is a bugfix, but the criterion for hard freeze is supposed to be *critical* bugfix. By definition this is a very invasive change for systems where it has any effect. So I would feel more comfortable if it had more time before going into a stable tag. Dhaval, how critical is this fix for you? Are you OK for it to go in after stable tag? Regards, Leif > Thanks > Liming >> -----邮件原件----- >> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 gaoliming via >> groups.io >> 发送时间: 2024年1月30日 9:21 >> 收件人: devel@edk2.groups.io; dhaval@rivosinc.com >> 抄送: zhiguang.liu@intel.com; dandan.bi@intel.com; >> pedro.falcato@gmail.com; chasel.chiu@intel.com >> 主题: 回复: [edk2-devel] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: >> Prefer xDSDT over DSDT when installing tables >> >> This version is good to me. Reviewed-by: Liming Gao >> <gaoliming@byosoft.com.cn> >> >>> -----邮件原件----- >>> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Dhaval >>> Sharma >>> 发送时间: 2024年1月28日 21:39 >>> 收件人: devel@edk2.groups.io >>> 抄送: gaoliming@byosoft.com.cn; zhiguang.liu@intel.com; >>> dandan.bi@intel.com; pedro.falcato@gmail.com; chasel.chiu@intel.com >>> 主题: [edk2-devel] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: Prefer >>> xDSDT over DSDT when installing tables >>> >>> As per ACPI Spec 6.5+ Table 5-9 if xDSDT is available, >>> it should be used first. Handle required flow when xDSDT >>> is absent or present. >>> >>> Test: Tested on RISCV64 Qemu platform with xDSDT and booted to >>> linux kernel. >>> >>> Cc: Liming Gao <gaoliming@...> >>> Cc: Zhiguang Liu <zhiguang.liu@...> >>> Cc: Dandan Bi <dandan.bi@...> >>> Cc: Pedro Falcato <pedro.falcato@...> >>> Cc: devel@edk2.groups.io >>> Signed-off-by: Dhaval Sharma <dhaval@...> >>> Acked-by: Chasel Chiu <chasel.chiu@...> >>> --- >>> >>> Notes: >>> v5: >>> - If DSDT is not found, throw error and continue to build other > tables >>> v4: >>> - Fix typos and commit message adding more clarity to patch subject >>> v3: >>> - Added description of ACPI spec clarification based on which this >> patch is >>> created >>> - Optimizing if-else flow >>> v2: >>> - Added proper indentation for else if >>> >>> MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 24 >>> ++++++++++++++------ >>> 1 file changed, 17 insertions(+), 7 deletions(-) >>> >>> diff --git >> a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c >>> b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c >>> index e09bc9b704f5..3879e10b3349 100644 >>> --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c >>> +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c >>> @@ -1892,14 +1892,24 @@ InstallAcpiTableFromHob ( >>> } >>> } >>> >>> - if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE >>> *)ChildTable)->Dsdt != 0) { >>> + // >>> + // First check if xDSDT is available, as that is preferred as > per >>> + // ACPI Spec 6.5+ Table 5-9 X_DSDT definition >>> + // >>> + 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; >>> + } 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)) { >>> - DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to >>> add ACPI table DSDT\n")); >>> - ASSERT_EFI_ERROR (Status); >>> - break; >>> - } >>> + } else { >>> + DEBUG ((DEBUG_ERROR, "DSDT table not found\n")); >>> + continue; >>> + } >>> + >>> + Status = AddTableToList (AcpiTableInstance, TableToInstall, > TRUE, >>> Version, TRUE, &TableKey); >>> + if (EFI_ERROR (Status)) { >>> + DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to >> add >>> ACPI table DSDT\n")); >>> + ASSERT_EFI_ERROR (Status); >>> + break; >>> } >>> } >>> } >>> -- >>> 2.39.2 >>> >>> >>> >>> >>> >> >> >> >> >> >> >> > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115504): https://edk2.groups.io/g/devel/message/115504 Mute This Topic: https://groups.io/mt/104365766/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [edk2-devel] 回复: [edk2-stable202402] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: Prefer xDSDT over DSDT when installing tables 2024-02-15 9:56 ` Leif Lindholm @ 2024-02-15 10:40 ` Dhaval Sharma 2024-02-15 16:07 ` Leif Lindholm 0 siblings, 1 reply; 7+ messages in thread From: Dhaval Sharma @ 2024-02-15 10:40 UTC (permalink / raw) To: Leif Lindholm Cc: devel, gaoliming, zhiguang.liu, dandan.bi, pedro.falcato, chasel.chiu, Laszlo Ersek, Andrew Fish, michael.d.kinney [-- Attachment #1: Type: text/plain, Size: 5819 bytes --] For me it is not impacting a production system so I can wait a cycle more. @Liming Gao <gaoliming@byosoft.com.cn> I will send out the PR with your rb tag. On Thu, Feb 15, 2024 at 3:26 PM Leif Lindholm <quic_llindhol@quicinc.com> wrote: > Hi Liming, > > On 2024-02-15 01:41, gaoliming via groups.io wrote: > > Hi, all > > This patch was reviewed before soft feature freeze. I would like to > merge > > it for this stable tag. If you have any comments, please reply this mail. > > I agree this is a bugfix, but the criterion for hard freeze is supposed > to be *critical* bugfix. By definition this is a very invasive change > for systems where it has any effect. So I would feel more comfortable if > it had more time before going into a stable tag. > > Dhaval, how critical is this fix for you? Are you OK for it to go in > after stable tag? > > Regards, > > Leif > > > > Thanks > > Liming > >> -----邮件原件----- > >> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 gaoliming via > >> groups.io > >> 发送时间: 2024年1月30日 9:21 > >> 收件人: devel@edk2.groups.io; dhaval@rivosinc.com > >> 抄送: zhiguang.liu@intel.com; dandan.bi@intel.com; > >> pedro.falcato@gmail.com; chasel.chiu@intel.com > >> 主题: 回复: [edk2-devel] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: > >> Prefer xDSDT over DSDT when installing tables > >> > >> This version is good to me. Reviewed-by: Liming Gao > >> <gaoliming@byosoft.com.cn> > >> > >>> -----邮件原件----- > >>> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Dhaval > >>> Sharma > >>> 发送时间: 2024年1月28日 21:39 > >>> 收件人: devel@edk2.groups.io > >>> 抄送: gaoliming@byosoft.com.cn; zhiguang.liu@intel.com; > >>> dandan.bi@intel.com; pedro.falcato@gmail.com; chasel.chiu@intel.com > >>> 主题: [edk2-devel] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: Prefer > >>> xDSDT over DSDT when installing tables > >>> > >>> As per ACPI Spec 6.5+ Table 5-9 if xDSDT is available, > >>> it should be used first. Handle required flow when xDSDT > >>> is absent or present. > >>> > >>> Test: Tested on RISCV64 Qemu platform with xDSDT and booted to > >>> linux kernel. > >>> > >>> Cc: Liming Gao <gaoliming@...> > >>> Cc: Zhiguang Liu <zhiguang.liu@...> > >>> Cc: Dandan Bi <dandan.bi@...> > >>> Cc: Pedro Falcato <pedro.falcato@...> > >>> Cc: devel@edk2.groups.io > >>> Signed-off-by: Dhaval Sharma <dhaval@...> > >>> Acked-by: Chasel Chiu <chasel.chiu@...> > >>> --- > >>> > >>> Notes: > >>> v5: > >>> - If DSDT is not found, throw error and continue to build other > > tables > >>> v4: > >>> - Fix typos and commit message adding more clarity to patch > subject > >>> v3: > >>> - Added description of ACPI spec clarification based on which this > >> patch is > >>> created > >>> - Optimizing if-else flow > >>> v2: > >>> - Added proper indentation for else if > >>> > >>> MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 24 > >>> ++++++++++++++------ > >>> 1 file changed, 17 insertions(+), 7 deletions(-) > >>> > >>> diff --git > >> a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > >>> b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > >>> index e09bc9b704f5..3879e10b3349 100644 > >>> --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > >>> +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > >>> @@ -1892,14 +1892,24 @@ InstallAcpiTableFromHob ( > >>> } > >>> } > >>> > >>> - if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE > >>> *)ChildTable)->Dsdt != 0) { > >>> + // > >>> + // First check if xDSDT is available, as that is preferred as > > per > >>> + // ACPI Spec 6.5+ Table 5-9 X_DSDT definition > >>> + // > >>> + 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; > >>> + } 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)) { > >>> - DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to > >>> add ACPI table DSDT\n")); > >>> - ASSERT_EFI_ERROR (Status); > >>> - break; > >>> - } > >>> + } else { > >>> + DEBUG ((DEBUG_ERROR, "DSDT table not found\n")); > >>> + continue; > >>> + } > >>> + > >>> + Status = AddTableToList (AcpiTableInstance, TableToInstall, > > TRUE, > >>> Version, TRUE, &TableKey); > >>> + if (EFI_ERROR (Status)) { > >>> + DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to > >> add > >>> ACPI table DSDT\n")); > >>> + ASSERT_EFI_ERROR (Status); > >>> + break; > >>> } > >>> } > >>> } > >>> -- > >>> 2.39.2 > >>> > >>> > >>> > >>> > >>> > >> > >> > >> > >> > >> > >> > >> > > > > > > > > > > > > > > > > > > -- Thanks! =D -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115518): https://edk2.groups.io/g/devel/message/115518 Mute This Topic: https://groups.io/mt/104365766/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: 9590 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [edk2-devel] 回复: [edk2-stable202402] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: Prefer xDSDT over DSDT when installing tables 2024-02-15 10:40 ` Dhaval Sharma @ 2024-02-15 16:07 ` Leif Lindholm 0 siblings, 0 replies; 7+ messages in thread From: Leif Lindholm @ 2024-02-15 16:07 UTC (permalink / raw) To: Dhaval Sharma Cc: devel, gaoliming, zhiguang.liu, dandan.bi, pedro.falcato, chasel.chiu, Laszlo Ersek, Andrew Fish, michael.d.kinney Excellent, thank you. And it will still go in within the next few weeks, just not before we make the stable tag. / Leif On 2024-02-15 10:40, Dhaval Sharma wrote: > For me it is not impacting a production system so I can wait a cycle > more. @Liming Gao <mailto:gaoliming@byosoft.com.cn> I will send out the > PR with your rb tag. > > On Thu, Feb 15, 2024 at 3:26 PM Leif Lindholm <quic_llindhol@quicinc.com > <mailto:quic_llindhol@quicinc.com>> wrote: > > Hi Liming, > > On 2024-02-15 01:41, gaoliming via groups.io <http://groups.io> wrote: > > Hi, all > > This patch was reviewed before soft feature freeze. I would > like to merge > > it for this stable tag. If you have any comments, please reply > this mail. > > I agree this is a bugfix, but the criterion for hard freeze is supposed > to be *critical* bugfix. By definition this is a very invasive change > for systems where it has any effect. So I would feel more > comfortable if > it had more time before going into a stable tag. > > Dhaval, how critical is this fix for you? Are you OK for it to go in > after stable tag? > > Regards, > > Leif > > > > Thanks > > Liming > >> -----邮件原件----- > >> 发件人: devel@edk2.groups.io <mailto:devel@edk2.groups.io> > <devel@edk2.groups.io <mailto:devel@edk2.groups.io>> 代表 gaoliming via > >> groups.io <http://groups.io> > >> 发送时间: 2024年1月30日 9:21 > >> 收件人: devel@edk2.groups.io <mailto:devel@edk2.groups.io>; > dhaval@rivosinc.com <mailto:dhaval@rivosinc.com> > >> 抄送: zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com>; > dandan.bi@intel.com <mailto:dandan.bi@intel.com>; > >> pedro.falcato@gmail.com <mailto:pedro.falcato@gmail.com>; > chasel.chiu@intel.com <mailto:chasel.chiu@intel.com> > >> 主题: 回复: [edk2-devel] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: > >> Prefer xDSDT over DSDT when installing tables > >> > >> This version is good to me. Reviewed-by: Liming Gao > >> <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>> > >> > >>> -----邮件原件----- > >>> 发件人: devel@edk2.groups.io <mailto:devel@edk2.groups.io> > <devel@edk2.groups.io <mailto:devel@edk2.groups.io>> 代表 Dhaval > >>> Sharma > >>> 发送时间: 2024年1月28日 21:39 > >>> 收件人: devel@edk2.groups.io <mailto:devel@edk2.groups.io> > >>> 抄送: gaoliming@byosoft.com.cn > <mailto:gaoliming@byosoft.com.cn>; zhiguang.liu@intel.com > <mailto:zhiguang.liu@intel.com>; > >>> dandan.bi@intel.com <mailto:dandan.bi@intel.com>; > pedro.falcato@gmail.com <mailto:pedro.falcato@gmail.com>; > chasel.chiu@intel.com <mailto:chasel.chiu@intel.com> > >>> 主题: [edk2-devel] [PATCH v5 1/1] MdeModulePkg/AcpiTableDxe: Prefer > >>> xDSDT over DSDT when installing tables > >>> > >>> As per ACPI Spec 6.5+ Table 5-9 if xDSDT is available, > >>> it should be used first. Handle required flow when xDSDT > >>> is absent or present. > >>> > >>> Test: Tested on RISCV64 Qemu platform with xDSDT and booted to > >>> linux kernel. > >>> > >>> Cc: Liming Gao <gaoliming@...> > >>> Cc: Zhiguang Liu <zhiguang.liu@...> > >>> Cc: Dandan Bi <dandan.bi@...> > >>> Cc: Pedro Falcato <pedro.falcato@...> > >>> Cc: devel@edk2.groups.io <mailto:devel@edk2.groups.io> > >>> Signed-off-by: Dhaval Sharma <dhaval@...> > >>> Acked-by: Chasel Chiu <chasel.chiu@...> > >>> --- > >>> > >>> Notes: > >>> v5: > >>> - If DSDT is not found, throw error and continue to build > other > > tables > >>> v4: > >>> - Fix typos and commit message adding more clarity to > patch subject > >>> v3: > >>> - Added description of ACPI spec clarification based on > which this > >> patch is > >>> created > >>> - Optimizing if-else flow > >>> v2: > >>> - Added proper indentation for else if > >>> > >>> MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 24 > >>> ++++++++++++++------ > >>> 1 file changed, 17 insertions(+), 7 deletions(-) > >>> > >>> diff --git > >> a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > >>> b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > >>> index e09bc9b704f5..3879e10b3349 100644 > >>> --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > >>> +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c > >>> @@ -1892,14 +1892,24 @@ InstallAcpiTableFromHob ( > >>> } > >>> } > >>> > >>> - if (((EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE > >>> *)ChildTable)->Dsdt != 0) { > >>> + // > >>> + // First check if xDSDT is available, as that is > preferred as > > per > >>> + // ACPI Spec 6.5+ Table 5-9 X_DSDT definition > >>> + // > >>> + 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; > >>> + } 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)) { > >>> - DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to > >>> add ACPI table DSDT\n")); > >>> - ASSERT_EFI_ERROR (Status); > >>> - break; > >>> - } > >>> + } else { > >>> + DEBUG ((DEBUG_ERROR, "DSDT table not found\n")); > >>> + continue; > >>> + } > >>> + > >>> + Status = AddTableToList (AcpiTableInstance, > TableToInstall, > > TRUE, > >>> Version, TRUE, &TableKey); > >>> + if (EFI_ERROR (Status)) { > >>> + DEBUG ((DEBUG_ERROR, "InstallAcpiTableFromHob: Fail to > >> add > >>> ACPI table DSDT\n")); > >>> + ASSERT_EFI_ERROR (Status); > >>> + break; > >>> } > >>> } > >>> } > >>> -- > >>> 2.39.2 > >>> > >>> > >>> > >>> > >>> > >> > >> > >> > >> > >> > >> > >> > > > > > > > > > > > > > > > > > > > > -- > Thanks! > =D -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115525): https://edk2.groups.io/g/devel/message/115525 Mute This Topic: https://groups.io/mt/104365766/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-02-15 16:07 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-01-28 13:39 [edk2-devel] [PATCH v5 0/1] MdeModulePkg/AcpiTableDxe: Prefer xDSDT over DSDT when installing tables Dhaval Sharma 2024-01-28 13:39 ` [edk2-devel] [PATCH v5 1/1] " Dhaval Sharma 2024-01-30 1:21 ` 回复: " gaoliming via groups.io [not found] ` <17AEFB5BFEE74D09.16647@groups.io> 2024-02-15 1:41 ` [edk2-devel] 回复: [edk2-stable202402] " gaoliming via groups.io 2024-02-15 9:56 ` Leif Lindholm 2024-02-15 10:40 ` Dhaval Sharma 2024-02-15 16:07 ` Leif Lindholm
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox