public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Rohit Mathew" <rohit.mathew@arm.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	Sami Mujawar <Sami.Mujawar@arm.com>
Cc: Thanu Rangarajan <Thanu.Rangarajan@arm.com>,
	Thomas Abraham <thomas.abraham@arm.com>, nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH 2/2] Platform/Sgi: Add serial debug controller to SSDT
Date: Tue, 2 Aug 2022 13:50:33 +0000	[thread overview]
Message-ID: <AM6PR08MB3783FDC00D161608F29545488F9D9@AM6PR08MB3783.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <32305.1658760947840235469@groups.io>

[-- Attachment #1: Type: text/plain, Size: 10146 bytes --]

Hi Sami,

Gentle reminder for this patch series.

Regards,
Rohit.

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Rohit Mathew via groups.io
Sent: 25 July 2022 15:56
To: Thanu Rangarajan <Thanu.Rangarajan@arm.com>; devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH 2/2] Platform/Sgi: Add serial debug controller to SSDT


Hi Sami/Thanu,

Please find my response inline -

On Mon, Jul 25, 2022 at 02:54 PM, Thanu Rangarajan <Thanu.Rangarajan@arm.com<mailto:Thanu.Rangarajan@arm.com>> wrote:

Hi Rohit,

The decision to use the SBSA defined HID for the Generic UART was taken after extensive discussions within the Arm ecosystem. And as Sami points out, now that formal Linux driver support for this HID is available, it would be good if it is used by other components in the stack as well.



+ Samer for any additional comments/clarifications.



Regards,

Thanu

From: Sami Mujawar <Sami.Mujawar@arm.com<mailto:Sami.Mujawar@arm.com>>
Date: Monday, 25 July 2022 at 16:12
To: Rohit Mathew <Rohit.Mathew@arm.com<mailto:Rohit.Mathew@arm.com>>, "devel@edk2.groups.io<mailto:devel@edk2.groups.io>" <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: Thanu Rangarajan <Thanu.Rangarajan@arm.com<mailto:Thanu.Rangarajan@arm.com>>, nd <nd@arm.com<mailto:nd@arm.com>>
Subject: Re: [edk2-devel] [PATCH 2/2] Platform/Sgi: Add serial debug controller to SSDT



Hi Rohit,

Please find my response inline marked [SAMI].

Regards,

Sami Mujawar

On 22/07/2022 01:46 pm, Rohit Mathew wrote:

Hi Sami,

Thank you for the review.
Regarding the use of Dynamic Tables Framework, there are no short term plans to migrate to it. Please find my response for your comment inline -

On Thu, Jul 21, 2022 at 01:42 PM, Sami Mujawar wrote:

Hi Rohit,

Have you considered moving to use Dynamic Tables Framework? There is
just too much repetition in this series which can be easily avoided. It
will also make the code more maintainable.

Apart from this I have a comment marked inline as [SAMI].

Regards,

Sami Mujawar

On 04/07/2022 05:59 pm, Rohit Mathew wrote:

Add a new device entry in the SSDT ACPI table to describe the serial
port used as the debug port. On the Neoverse reference design platforms,
the UART0 port of the SoC is used as the debug port.

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com><mailto:rohit.mathew@arm.com>
---
Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf | 1 +
Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf | 1 +
Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 1 +
Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf | 1 +
Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf | 1 +
Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf | 1 +
Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf | 1 +
Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf | 1 +
Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl | 15 +++++++++++++++
9 files changed, 23 insertions(+)

diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
index d2935f1e73e1..d46ae0274d90 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
@@ -39,6 +39,7 @@ [Packages]
[FixedPcd]
gArmPlatformTokenSpaceGuid.PcdCoreCount
gArmPlatformTokenSpaceGuid.PcdClusterCount
+ gArmPlatformTokenSpaceGuid.PcdSerialDbgInterrupt
gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
gArmPlatformTokenSpaceGuid.PL011UartInterrupt

diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
index 73f47ece7718..4bf681d3bc2e 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
@@ -39,6 +39,7 @@ [Packages]
[FixedPcd]
gArmPlatformTokenSpaceGuid.PcdCoreCount
gArmPlatformTokenSpaceGuid.PcdClusterCount
+ gArmPlatformTokenSpaceGuid.PcdSerialDbgInterrupt
gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
gArmPlatformTokenSpaceGuid.PL011UartInterrupt

diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
index da14120bde69..89f532217ceb 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
@@ -41,6 +41,7 @@ [Packages]
[FixedPcd]
gArmPlatformTokenSpaceGuid.PcdCoreCount
gArmPlatformTokenSpaceGuid.PcdClusterCount
+ gArmPlatformTokenSpaceGuid.PcdSerialDbgInterrupt
gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
gArmPlatformTokenSpaceGuid.PL011UartInterrupt

diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
index 90976250445e..66d5422df36b 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
@@ -37,6 +37,7 @@ [Packages]
Platform/ARM/SgiPkg/SgiPlatform.dec

[FixedPcd]
+ gArmPlatformTokenSpaceGuid.PcdSerialDbgInterrupt
gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
gArmPlatformTokenSpaceGuid.PL011UartInterrupt
gArmPlatformTokenSpaceGuid.PcdCoreCount
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf
index 95fb446c105d..742734ab7348 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf
@@ -37,6 +37,7 @@ [Packages]
Platform/ARM/SgiPkg/SgiPlatform.dec

[FixedPcd]
+ gArmPlatformTokenSpaceGuid.PcdSerialDbgInterrupt
gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
gArmPlatformTokenSpaceGuid.PcdCoreCount
gArmPlatformTokenSpaceGuid.PcdClusterCount
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf
index 3540575dd641..cc41dda1a135 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf
@@ -37,6 +37,7 @@ [Packages]
Platform/ARM/SgiPkg/SgiPlatform.dec

[FixedPcd]
+ gArmPlatformTokenSpaceGuid.PcdSerialDbgInterrupt
gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
gArmPlatformTokenSpaceGuid.PL011UartInterrupt
gArmPlatformTokenSpaceGuid.PcdCoreCount
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf
index c6bd69b4a538..ecb42bf3cc33 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf
@@ -39,6 +39,7 @@ [Packages]
Platform/ARM/SgiPkg/SgiPlatform.dec

[FixedPcd]
+ gArmPlatformTokenSpaceGuid.PcdSerialDbgInterrupt
gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
gArmPlatformTokenSpaceGuid.PL011UartInterrupt
gArmPlatformTokenSpaceGuid.PcdCoreCount
diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
index cb3f3fcdb9b6..379b5c9e6122 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
+++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
@@ -39,6 +39,7 @@ [Packages]
[FixedPcd]
gArmPlatformTokenSpaceGuid.PcdCoreCount
gArmPlatformTokenSpaceGuid.PcdClusterCount
+ gArmPlatformTokenSpaceGuid.PcdSerialDbgInterrupt
gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
gArmPlatformTokenSpaceGuid.PL011UartInterrupt

diff --git a/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl b/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl
index fd20c67e1225..ab8578072836 100644
--- a/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl
+++ b/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl
@@ -29,6 +29,21 @@ DefinitionBlock ("SsdtRosTable.aml", "SSDT", 2, "ARMLTD", "ARMSGI",
})
}

+ Device (COM1) {
+ Name (_HID, "ARMH0011")
+ Name (_CID, "ARMH0011")

[SAMI] Any reason for not using  ARMHB000 (see Section 2.3 of the ACPI
for Arm Components 1.1 specification)?

[Rohit]: COM1 is based on PL011. Since PL011 would satisfy SBSA compliance, we have used PL011's HID.

[SAMI] Following is an extract from Section 2.3 of the 'ACPI for Arm Components 1.1' specification.

"Some operating systems use the PL011 HID (see Table 5 above)
to bind to the Arm Generic UART in the system. While this
practice is flawed and not encouraged by Arm, Arm
acknowledges that it must be permitted until formal support for
the Arm Generic UART HID is made available in these operating
systems.
Arm strongly recommends use of the Arm Generic UART HID
going forward."

1. The Arm Generic UART is a subset of PL011. This means using the ARMHB000 should not be an issue.

2. This file is common to all platforms in SgiPkg, which are infrastructure platforms.

3. Some opreating systems (like Linux) have already integrated support for ARMHB000.

    Ref: serial: pl011: Add ACPI SBSA UART match id<https://github.com/torvalds/linux/commit/ac442a077acf9a6bf1db4320ec0c3f303be092b3>

Considering the above, I think ARMHB000 should be used, here.

[/SAMI]
[Rohit] Apologies for not adding more context earlier. RD FVPs instantiates PL011 UART and not the Generic SBSA UART. Although 'Generic UART' would work as it is a subset of PL011, PL011 HID accurately describes the UART controllers for infra platforms. I'm not sure if this is any better explanation; Please let me know if you think otherwise.
[/Rohit]





+ Name (_UID, One)
+ Name (_STA, 0xF)
+ Name (_CRS, ResourceTemplate () {
+ Memory32Fixed (
+ ReadWrite,
+ FixedPcdGet64 (PcdSerialDbgRegisterBase),
+ 0x1000
+ )
+ Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { FixedPcdGet32 (PcdSerialDbgInterrupt) }
+ })
+ }
+
// VIRTIO DISK
Device (VR00) {
Name (_HID, "LNRO0005")

Regards,
Rohit
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


[-- Attachment #2: Type: text/html, Size: 16447 bytes --]

  reply	other threads:[~2022-08-02 13:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04 16:59 [edk2-platforms][PATCH 0/2] Platform/Sgi: Update serial port usage Rohit Mathew
2022-07-04 16:59 ` [PATCH 1/2] Platform/Sgi: Update ACPI tables to use console UART Rohit Mathew
2022-07-21 12:40   ` Sami Mujawar
2022-07-04 16:59 ` [PATCH 2/2] Platform/Sgi: Add serial debug controller to SSDT Rohit Mathew
2022-07-21 12:41   ` Sami Mujawar
2022-07-22 12:46     ` [edk2-devel] " Rohit Mathew
2022-07-25 10:41       ` Sami Mujawar
2022-07-25 11:36         ` Thanu Rangarajan
2022-07-25 14:55           ` Rohit Mathew
2022-08-02 13:50             ` Rohit Mathew [this message]
2022-08-17  9:19               ` Rohit Mathew
2022-08-17  9:45             ` Sami Mujawar
2022-08-17 10:31               ` Rohit Mathew
2022-07-04 21:38 ` [edk2-platforms][PATCH 0/2] Platform/Sgi: Update serial port usage Thomas Abraham
2022-07-18 18:00 ` [edk2-devel] " Rohit Mathew
2022-09-15 17:13 ` Sami Mujawar

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=AM6PR08MB3783FDC00D161608F29545488F9D9@AM6PR08MB3783.eurprd08.prod.outlook.com \
    --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