From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by mx.groups.io with SMTP id smtpd.web09.33805.1637999544847292718 for ; Fri, 26 Nov 2021 23:52:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=kGf1eTs9; spf=pass (domain: linaro.org, ip: 209.85.166.51, mailfrom: masami.hiramatsu@linaro.org) Received: by mail-io1-f51.google.com with SMTP id m9so14316968iop.0 for ; Fri, 26 Nov 2021 23:52:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=EFey6tUN+o/ZDAhgeEDQZKh4SpKYNPKcsAGhCXJ2xOk=; b=kGf1eTs92hL7R4Hi+czieGA+AiT1b9xyYD4fZhdQ9gnmDTw+ofvRYcGwceg5LG0q75 5yGD6ndPfod5UtWKFzGZZhz1Q1r9VtvNGSsCQhBujlci+/YTtCpA5ht6sU6XmYh7HKq5 m/fF1CnuV7JvWS9BOcFx7K/xufAJYRo29ii1gogeKfiWUKuHTbv3FbamA7lyFkR3lbvJ lhMYVVyGgbEkYqhtgUlKbSwKCYac+iMMG5QN73DGt9B3Q/hYbrQchfD+r7ImMDFb7R1Q dppSRsSwh0Z2HiTvLLytN4K/o6IbPk/jsJGd6zISF3eNKxs8HQEUhycJ86aOmhJbG+dP 6K4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=EFey6tUN+o/ZDAhgeEDQZKh4SpKYNPKcsAGhCXJ2xOk=; b=EvROg+eMhLeIcdapEsNktw2O13dBfoM2kUofYAuIhmQxd+A+U9Bcf/qL+prVu8GnmM hQ9LCv5JoNRYaTlH/QTmvTUODRpVC2l/ErCEMMfFq5exB20XmhRkhZ6T+Efld9v+JFQg X+NRRUnv5uPmee2hUGxD+z+9T4/aRXIdYcEV8zNL7jDnv77BDAUhFiu4+nF3Idsv4E2P B2hC+DEHQ+QvZG9RcmWPhKw4Umai3QbM0ZqMR8w195F0nDuwTXe6LHP2zNMPAwvYDmIX I+iGMZ65Epb0Wd+JU5jwVNjGq48WCdtJ54VqmkQidDup6/cD0XhLjWifGKHIaS+3gOyo nqwg== X-Gm-Message-State: AOAM531G5YggT9oRf8/47Ld5ffnwl+fIIHMGnXS6ipe95VFU7GvLFbgi a83ENNDApx75gnuqOeAB6XG7KBriXzKsHHjBw0655GEmn00= X-Google-Smtp-Source: ABdhPJx8RpMogI5roMphXSI61H6dRBmV84eDo74nv+63+DLwyvF0eA3p2X6JoBQ8fb7nLybDJnWg0IcWer+OgFcCBJ4= X-Received: by 2002:a05:6638:1648:: with SMTP id a8mr54108353jat.92.1637999544164; Fri, 26 Nov 2021 23:52:24 -0800 (PST) MIME-Version: 1.0 References: <163610419943.391624.9289897029386201296.stgit@localhost> <163610423326.391624.7578010263371252647.stgit@localhost> In-Reply-To: From: "Masami Hiramatsu" Date: Sat, 27 Nov 2021 16:52:13 +0900 Message-ID: Subject: Re: [PATCH 4/5] [edk2-platforms] Silicon/SynQuacer: add DBG2 ACPI table To: Leif Lindholm Cc: Ard Biesheuvel , devel@edk2.groups.io, Kazuhiko Sakamoto , Masahisa Kojima Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Leif, 2021=E5=B9=B411=E6=9C=8827=E6=97=A5(=E5=9C=9F) 3:10 Leif Lindholm : > > On Fri, Nov 05, 2021 at 18:23:53 +0900, Masami Hiramatsu wrote: > > Add DBG2 table to ACPI tables. The COM1 uart port will be used > > for OS debug, and it is 16550 compatible. > > > > Signed-off-by: Masami Hiramatsu > > --- > > .../Socionext/SynQuacer/AcpiTables/AcpiTables.inf | 1 > > Silicon/Socionext/SynQuacer/AcpiTables/Dbg2.aslc | 70 ++++++++++++= ++++++++ > > 2 files changed, 71 insertions(+) > > create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Dbg2.aslc > > > > diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf b/Si= licon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf > > index 886777a0fa..3023206330 100644 > > --- a/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf > > +++ b/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf > > @@ -22,6 +22,7 @@ > > Dsdt.asl > > Fadt.aslc > > Gtdt.aslc > > + Dbg2.aslc > > Please move this before Dsdt.asl, to keep the list alphabetically sorted. OK. > > > Iort.aslc > > Madt.aslc > > Mcfg.aslc > > diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Dbg2.aslc b/Silicon= /Socionext/SynQuacer/AcpiTables/Dbg2.aslc > > new file mode 100644 > > index 0000000000..027b3b658b > > --- /dev/null > > +++ b/Silicon/Socionext/SynQuacer/AcpiTables/Dbg2.aslc > > @@ -0,0 +1,70 @@ > > +/** @file > > +* Debug Port Table (DBG2) > > +* > > +* Copyright (c) 2020,2021 Linaro Ltd. All rights reserved. > > +* > > +* SPDX-License-Identifier: BSD-2-Clause-Patent > > +* > > +**/ > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include "AcpiTables.h" > > + > > +#pragma pack(1) > > + > > +#define SYNQUACER_UART1_STR { '\\', '_', 'S', 'B', '.', 'C', 'O', 'M',= '1', 0x00 } > > +#define SQ_GAS32(Address) { EFI_ACPI_5_0_SYSTEM_MEMORY, 32, 0, EFI_ACP= I_5_0_BYTE, Address } > > Use EFI_ACPI_6_3_ consistently? OK, got it. Thank you, > > / > Leif > > > + > > +typedef struct { > > + EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT Dbg2Device; > > + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE BaseAddressRegister; > > + UINT32 AddressSize; > > + UINT8 NameSpaceString[10]; > > +} DBG2_DEBUG_DEVICE_INFORMATION; > > + > > +typedef struct { > > + EFI_ACPI_DEBUG_PORT_2_DESCRIPTION_TABLE Description; > > + DBG2_DEBUG_DEVICE_INFORMATION Dbg2DeviceInfo; > > +} DBG2_TABLE; > > + > > + > > +STATIC DBG2_TABLE Dbg2 =3D { > > + { > > + __ACPI_HEADER ( > > + EFI_ACPI_6_3_DEBUG_PORT_2_TABLE_SIGNATURE, > > + DBG2_TABLE, > > + EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION > > + ), > > + OFFSET_OF (DBG2_TABLE, Dbg2DeviceInfo), > > + 1 /* NumberOfDebugPorts */ > > + }, > > + { > > + { > > + EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION, > > + sizeof (DBG2_DEBUG_DEVICE_INFORMATION), > > + 1, /* NumberofGenericAddressRe= gisters */ > > + 10, /* NameSpaceStringLength */ > > + OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, NameSpaceString), > > + 0, /* OemDataLength */ > > + 0, /* OemDataOffset */ > > + EFI_ACPI_DBG2_PORT_TYPE_SERIAL, > > + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_16550_WITH_GAS, > > + {EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE}, > > + OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, BaseAddressRegister), > > + OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, AddressSize) > > + }, > > + SQ_GAS32 (SYNQUACER_UART1_BASE), /* BaseAddressRegister */ > > + SYNQUACER_UART1_SIZE, /* AddressSize */ > > + SYNQUACER_UART1_STR, /* NameSpaceString */ > > + } > > +}; > > + > > +#pragma pack() > > + > > +// Reference the table being generated to prevent the optimizer from r= emoving > > +// the data structure from the executable > > +VOID* CONST ReferenceAcpiTable =3D &Dbg2; > > --=20 Masami Hiramatsu