[PATCH v3 5/8] ArmVirtPkg/Kvmtool: Add DSDT ACPI table


PierreGondois
 

From: Sami Mujawar <sami.mujawar@arm.com>

Most ACPI tables for Kvmtool firmware are dynamically
generated. The AML code is also generated at runtime
for most components in appropriate SSDTs.

Although there may not be much to describe in the DSDT,
the DSDT table is mandatory.

Therefore, add an empty stub for DSDT.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
---

Notes:
v2:
- Coding style modifications. [Laszlo]

.../KvmtoolCfgMgrDxe/AslTables/Dsdt.asl | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 ArmVirtPkg/KvmtoolCfgMgrDxe/AslTables/Dsdt.asl

diff --git a/ArmVirtPkg/KvmtoolCfgMgrDxe/AslTables/Dsdt.asl b/ArmVirtPkg/=
KvmtoolCfgMgrDxe/AslTables/Dsdt.asl
new file mode 100644
index 000000000000..5010beabfc4b
--- /dev/null
+++ b/ArmVirtPkg/KvmtoolCfgMgrDxe/AslTables/Dsdt.asl
@@ -0,0 +1,21 @@
+/** @file
+ Differentiated System Description Table Fields (DSDT)
+
+ Copyright (c) 2021 - 2022, ARM Ltd. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-KVMT", 1) {
+ Scope (_SB) {
+ //
+ // Most ACPI tables for Kvmtool firmware are
+ // dynamically generated. The AML code is also
+ // generated at runtime for most components in
+ // appropriate SSDTs.
+ // Although there may not be much to describe
+ // in the DSDT, the DSDT table is mandatory.
+ // Therefore, add an empty stub for DSDT.
+ //
+ } // Scope (_SB)
+}
--=20
2.25.1


Rebecca Cran
 

On 1/28/22 08:41, PierreGondois wrote:

+ Differentiated System Description Table Fields (DSDT)
+
+ Copyright (c) 2021 - 2022, ARM Ltd. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-KVMT", 1) {
The Revision field should probably be 2, not 1. ACPI 6.4 says:


2. This field also sets the global integer width for the AML
interpreter. Values less than two will cause the inter-
preter to use 32-bit integers and math. Values of two
and greater will cause the interpreter to use full 64-bit
integers and math.

--
Rebecca Cran


Sami Mujawar
 

Hi Rebecca,

 

Thanks for catching this.

I think we also need to add a check in Acpiview to report this issue. However, that would be another patch series.

 

Regards,

 

Sami Mujawar

 

From: Rebecca Cran <quic_rcran@...>
Date: Monday, 31 January 2022 at 15:17
To: devel@edk2.groups.io <devel@edk2.groups.io>, Pierre Gondois <Pierre.Gondois@...>
Cc: Ard Biesheuvel <ardb+tianocore@...>, Sami Mujawar <Sami.Mujawar@...>
Subject: Re: [edk2-devel] [PATCH v3 5/8] ArmVirtPkg/Kvmtool: Add DSDT ACPI table

On 1/28/22 08:41, PierreGondois wrote:

> +  Differentiated System Description Table Fields (DSDT)
> +
> +  Copyright (c) 2021 - 2022, ARM Ltd. All rights reserved.<BR>
> +    SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-KVMT", 1) {

The Revision field should probably be 2, not 1. ACPI 6.4 says:


2. This field also sets the global integer width for the AML
interpreter. Values less than two will cause the inter-
preter to use 32-bit integers and math. Values of two
and greater will cause the interpreter to use full 64-bit
integers and math.

--
Rebecca Cran


PierreGondois
 

Hi Rebecca,

On 1/31/22 4:21 PM, Sami Mujawar wrote:
Hi Rebecca,
Thanks for catching this.
I think we also need to adda check in Acpiview to report this issue. However,
that would be another patch series.
Regards,
Sami Mujawar
*From: *Rebecca Cran <quic_rcran@quicinc.com>
*Date: *Monday, 31 January 2022 at 15:17
*To: *devel@edk2.groups.io <devel@edk2.groups.io>, Pierre Gondois
<Pierre.Gondois@arm.com>
*Cc: *Ard Biesheuvel <ardb+tianocore@kernel.org>, Sami Mujawar
<Sami.Mujawar@arm.com>
*Subject: *Re: [edk2-devel] [PATCH v3 5/8] ArmVirtPkg/Kvmtool: Add DSDT ACPI table
On 1/28/22 08:41, PierreGondois wrote:

+ Differentiated System Description Table Fields (DSDT)
+
+ Copyright (c) 2021 - 2022, ARM Ltd. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-KVMT", 1) {
The Revision field should probably be 2, not 1. ACPI 6.4 says:
2. This field also sets the global integer width for the AML
interpreter. Values less than two will cause the inter-
preter to use 32-bit integers and math. Values of two
and greater will cause the interpreter to use full 64-bit
integers and math.
--
Rebecca Cran
Yes indeed. I forgot to add it in the v4... I will send a v5.
Regards,
Pierre


Ard Biesheuvel
 

On Tue, 1 Feb 2022 at 17:55, Pierre Gondois <pierre.gondois@arm.com> wrote:

Hi Rebecca,

On 1/31/22 4:21 PM, Sami Mujawar wrote:
Hi Rebecca,

Thanks for catching this.

I think we also need to adda check in Acpiview to report this issue. However,
that would be another patch series.

Regards,

Sami Mujawar

*From: *Rebecca Cran <quic_rcran@quicinc.com>
*Date: *Monday, 31 January 2022 at 15:17
*To: *devel@edk2.groups.io <devel@edk2.groups.io>, Pierre Gondois
<Pierre.Gondois@arm.com>
*Cc: *Ard Biesheuvel <ardb+tianocore@kernel.org>, Sami Mujawar
<Sami.Mujawar@arm.com>
*Subject: *Re: [edk2-devel] [PATCH v3 5/8] ArmVirtPkg/Kvmtool: Add DSDT ACPI table

On 1/28/22 08:41, PierreGondois wrote:

+ Differentiated System Description Table Fields (DSDT)
+
+ Copyright (c) 2021 - 2022, ARM Ltd. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-KVMT", 1) {
The Revision field should probably be 2, not 1. ACPI 6.4 says:


2. This field also sets the global integer width for the AML
interpreter. Values less than two will cause the inter-
preter to use 32-bit integers and math. Values of two
and greater will cause the interpreter to use full 64-bit
integers and math.

--
Rebecca Cran
Yes indeed. I forgot to add it in the v4... I will send a v5.
Please give me a minute before sending another version.

I am still seeing


Ard Biesheuvel
 

On Tue, 1 Feb 2022 at 17:56, Ard Biesheuvel <ardb@kernel.org> wrote:

On Tue, 1 Feb 2022 at 17:55, Pierre Gondois <pierre.gondois@arm.com> wrote:

Hi Rebecca,

On 1/31/22 4:21 PM, Sami Mujawar wrote:
Hi Rebecca,

Thanks for catching this.

I think we also need to adda check in Acpiview to report this issue. However,
that would be another patch series.

Regards,

Sami Mujawar

*From: *Rebecca Cran <quic_rcran@quicinc.com>
*Date: *Monday, 31 January 2022 at 15:17
*To: *devel@edk2.groups.io <devel@edk2.groups.io>, Pierre Gondois
<Pierre.Gondois@arm.com>
*Cc: *Ard Biesheuvel <ardb+tianocore@kernel.org>, Sami Mujawar
<Sami.Mujawar@arm.com>
*Subject: *Re: [edk2-devel] [PATCH v3 5/8] ArmVirtPkg/Kvmtool: Add DSDT ACPI table

On 1/28/22 08:41, PierreGondois wrote:

+ Differentiated System Description Table Fields (DSDT)
+
+ Copyright (c) 2021 - 2022, ARM Ltd. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-KVMT", 1) {
The Revision field should probably be 2, not 1. ACPI 6.4 says:


2. This field also sets the global integer width for the AML
interpreter. Values less than two will cause the inter-
preter to use 32-bit integers and math. Values of two
and greater will cause the interpreter to use full 64-bit
integers and math.

--
Rebecca Cran
Yes indeed. I forgot to add it in the v4... I will send a v5.
Please give me a minute before sending another version.

I am still seeing


Ard Biesheuvel
 

On Tue, 1 Feb 2022 at 17:56, Ard Biesheuvel <ardb@kernel.org> wrote:

On Tue, 1 Feb 2022 at 17:55, Pierre Gondois <pierre.gondois@arm.com> wrote:

Hi Rebecca,

On 1/31/22 4:21 PM, Sami Mujawar wrote:
Hi Rebecca,

Thanks for catching this.

I think we also need to adda check in Acpiview to report this issue. However,
that would be another patch series.

Regards,

Sami Mujawar

*From: *Rebecca Cran <quic_rcran@quicinc.com>
*Date: *Monday, 31 January 2022 at 15:17
*To: *devel@edk2.groups.io <devel@edk2.groups.io>, Pierre Gondois
<Pierre.Gondois@arm.com>
*Cc: *Ard Biesheuvel <ardb+tianocore@kernel.org>, Sami Mujawar
<Sami.Mujawar@arm.com>
*Subject: *Re: [edk2-devel] [PATCH v3 5/8] ArmVirtPkg/Kvmtool: Add DSDT ACPI table

On 1/28/22 08:41, PierreGondois wrote:

+ Differentiated System Description Table Fields (DSDT)
+
+ Copyright (c) 2021 - 2022, ARM Ltd. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-KVMT", 1) {
The Revision field should probably be 2, not 1. ACPI 6.4 says:


2. This field also sets the global integer width for the AML
interpreter. Values less than two will cause the inter-
preter to use 32-bit integers and math. Values of two
and greater will cause the interpreter to use full 64-bit
integers and math.

--
Rebecca Cran
Yes indeed. I forgot to add it in the v4... I will send a v5.
Please give me a minute before sending another version.

I am still seeing
No ACPI PMU IRQ for CPU26

errors and I am trying to figure out why.


PierreGondois
 

On 2/1/22 5:56 PM, Ard Biesheuvel wrote:
On Tue, 1 Feb 2022 at 17:56, Ard Biesheuvel <ardb@kernel.org> wrote:

On Tue, 1 Feb 2022 at 17:55, Pierre Gondois <pierre.gondois@arm.com> wrote:

Hi Rebecca,

On 1/31/22 4:21 PM, Sami Mujawar wrote:
Hi Rebecca,

Thanks for catching this.

I think we also need to adda check in Acpiview to report this issue. However,
that would be another patch series.

Regards,

Sami Mujawar

*From: *Rebecca Cran <quic_rcran@quicinc.com>
*Date: *Monday, 31 January 2022 at 15:17
*To: *devel@edk2.groups.io <devel@edk2.groups.io>, Pierre Gondois
<Pierre.Gondois@arm.com>
*Cc: *Ard Biesheuvel <ardb+tianocore@kernel.org>, Sami Mujawar
<Sami.Mujawar@arm.com>
*Subject: *Re: [edk2-devel] [PATCH v3 5/8] ArmVirtPkg/Kvmtool: Add DSDT ACPI table

On 1/28/22 08:41, PierreGondois wrote:

+ Differentiated System Description Table Fields (DSDT)
+
+ Copyright (c) 2021 - 2022, ARM Ltd. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-KVMT", 1) {
The Revision field should probably be 2, not 1. ACPI 6.4 says:


2. This field also sets the global integer width for the AML
interpreter. Values less than two will cause the inter-
preter to use 32-bit integers and math. Values of two
and greater will cause the interpreter to use full 64-bit
integers and math.

--
Rebecca Cran
Yes indeed. I forgot to add it in the v4... I will send a v5.
Please give me a minute before sending another version.

I am still seeing
No ACPI PMU IRQ for CPU26
errors and I am trying to figure out why.
There is a --pmu option in kvmtool, we are not populating pmu
interrupts if kvmtool doesn't receive this option. Maybe this is it ?


Ard Biesheuvel
 

On Tue, 1 Feb 2022 at 18:02, Pierre Gondois <pierre.gondois@arm.com> wrote:



On 2/1/22 5:56 PM, Ard Biesheuvel wrote:
On Tue, 1 Feb 2022 at 17:56, Ard Biesheuvel <ardb@kernel.org> wrote:

On Tue, 1 Feb 2022 at 17:55, Pierre Gondois <pierre.gondois@arm.com> wrote:

Hi Rebecca,

On 1/31/22 4:21 PM, Sami Mujawar wrote:
Hi Rebecca,

Thanks for catching this.

I think we also need to adda check in Acpiview to report this issue. However,
that would be another patch series.

Regards,

Sami Mujawar

*From: *Rebecca Cran <quic_rcran@quicinc.com>
*Date: *Monday, 31 January 2022 at 15:17
*To: *devel@edk2.groups.io <devel@edk2.groups.io>, Pierre Gondois
<Pierre.Gondois@arm.com>
*Cc: *Ard Biesheuvel <ardb+tianocore@kernel.org>, Sami Mujawar
<Sami.Mujawar@arm.com>
*Subject: *Re: [edk2-devel] [PATCH v3 5/8] ArmVirtPkg/Kvmtool: Add DSDT ACPI table

On 1/28/22 08:41, PierreGondois wrote:

+ Differentiated System Description Table Fields (DSDT)
+
+ Copyright (c) 2021 - 2022, ARM Ltd. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-KVMT", 1) {
The Revision field should probably be 2, not 1. ACPI 6.4 says:


2. This field also sets the global integer width for the AML
interpreter. Values less than two will cause the inter-
preter to use 32-bit integers and math. Values of two
and greater will cause the interpreter to use full 64-bit
integers and math.

--
Rebecca Cran
Yes indeed. I forgot to add it in the v4... I will send a v5.
Please give me a minute before sending another version.

I am still seeing
No ACPI PMU IRQ for CPU26

errors and I am trying to figure out why.
There is a --pmu option in kvmtool, we are not populating pmu
interrupts if kvmtool doesn't receive this option. Maybe this is it ?
Yes you are right.

So this is all looking fine now - I tested booting Linux with
pci=nomsi, and the legacy interrupts are level and working as
expected.


PierreGondois
 

On 2/1/22 6:04 PM, Ard Biesheuvel wrote:
On Tue, 1 Feb 2022 at 18:02, Pierre Gondois <pierre.gondois@arm.com> wrote:



On 2/1/22 5:56 PM, Ard Biesheuvel wrote:
On Tue, 1 Feb 2022 at 17:56, Ard Biesheuvel <ardb@kernel.org> wrote:

On Tue, 1 Feb 2022 at 17:55, Pierre Gondois <pierre.gondois@arm.com> wrote:

Hi Rebecca,

On 1/31/22 4:21 PM, Sami Mujawar wrote:
Hi Rebecca,

Thanks for catching this.

I think we also need to adda check in Acpiview to report this issue. However,
that would be another patch series.

Regards,

Sami Mujawar

*From: *Rebecca Cran <quic_rcran@quicinc.com>
*Date: *Monday, 31 January 2022 at 15:17
*To: *devel@edk2.groups.io <devel@edk2.groups.io>, Pierre Gondois
<Pierre.Gondois@arm.com>
*Cc: *Ard Biesheuvel <ardb+tianocore@kernel.org>, Sami Mujawar
<Sami.Mujawar@arm.com>
*Subject: *Re: [edk2-devel] [PATCH v3 5/8] ArmVirtPkg/Kvmtool: Add DSDT ACPI table

On 1/28/22 08:41, PierreGondois wrote:

+ Differentiated System Description Table Fields (DSDT)
+
+ Copyright (c) 2021 - 2022, ARM Ltd. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARM-KVMT", 1) {
The Revision field should probably be 2, not 1. ACPI 6.4 says:


2. This field also sets the global integer width for the AML
interpreter. Values less than two will cause the inter-
preter to use 32-bit integers and math. Values of two
and greater will cause the interpreter to use full 64-bit
integers and math.

--
Rebecca Cran
Yes indeed. I forgot to add it in the v4... I will send a v5.
Please give me a minute before sending another version.

I am still seeing
No ACPI PMU IRQ for CPU26

errors and I am trying to figure out why.
There is a --pmu option in kvmtool, we are not populating pmu
interrupts if kvmtool doesn't receive this option. Maybe this is it ?
Yes you are right.
So this is all looking fine now - I tested booting Linux with
pci=nomsi, and the legacy interrupts are level and working as
expected.
Ok nice. Thanks for testing. I will send the v5 shortly.