From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) by mx.groups.io with SMTP id smtpd.web11.4044.1657590184153520942 for ; Mon, 11 Jul 2022 18:43:04 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=hCHpQp7M; spf=pass (domain: linaro.org, ip: 209.85.128.169, mailfrom: masahisa.kojima@linaro.org) Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-31d85f82f0bso30890427b3.7 for ; Mon, 11 Jul 2022 18:43:04 -0700 (PDT) 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; bh=yNGG1P7rtL+/faITlkxRT+39hkVb5qe4OHePFayFNHE=; b=hCHpQp7M4gGPY2yMEcJAGn8XaLEWSBKTeW/FqgU4Rk5RNthvF6GBUGJoCjkPbKH8aU emLakeUmg3Pj+YdI8qrKuOZbWXgH90g6CGraTBTXG+NVFLSDv5ue3BPaTMtfiWc3Mp2X 2VmE0YEDKs26XiRgDWh6RfdkFdm881c2WB4vK2nMhxRF7uX/47xTdWQ/1fdCugPC09zf SUq8Gdx2Mva2B0OYN5E20FWiYwpUZpvZ7NmEX5RLlndgdLHudKyPM7OydH4H1J2fYhlX 3IOZnbDb2krkDR+8EVI80hDWMk6cenIKvl/jJXWAdkJCt39ZCPvq33P37EioA2L/m6xp rT4Q== 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; bh=yNGG1P7rtL+/faITlkxRT+39hkVb5qe4OHePFayFNHE=; b=kDcw8Dou/3LccHmeoMOnKyXe/Qo/wqeVQ9iSDDMUIZFcow4aBNGJyAZUKQYX/y3nNX 2HHnWRqQpFRISB1EgKPY/CHEVjyr4P+Mc4g/+ASoa9bhXMZ5IdaxO7qjnEPOZEKPnP3L 3b/F21MBgewJiHcghdFkZzHsqYA90PC7jutGKELfeiA37QUDI0gPrvmHdsEhk9HIJ8Bs M12JSag1W6f0ffVIDc6roLz1SvYc7JZlP4+ZamwsNEqzhl94pfttTknMacz6oatbkyae D6/LCDK6dPRKF9vEWDZE70IHDnhnKYovr1245iPPP/d+36XYmcg5Fi8bpqxm9RPLrsIr 74Hw== X-Gm-Message-State: AJIora++VS+E/qVxzC2YSTNxeYtMIVWiOZz4HeTHoDX4eTeYE4NXRdi2 lhSkGI3gKhzN3LM1RNdEJx1hkNJuxTZeraXoDSwiOA== X-Google-Smtp-Source: AGRyM1sZTjELUQ065a1DpbZShMXzydtHPK5JZcDZBCl89tSlJrYpAiLluqB2BAKvVbbukqq5hb643k7XTECCTKrA73U= X-Received: by 2002:a0d:ee02:0:b0:31c:da1b:c826 with SMTP id x2-20020a0dee02000000b0031cda1bc826mr23179465ywe.212.1657590183389; Mon, 11 Jul 2022 18:43:03 -0700 (PDT) MIME-Version: 1.0 References: <163911902995.561661.9429300579159746333.stgit@localhost> <163911907249.561661.11382999726925773930.stgit@localhost> <16F1A3225F3A2D28.18186@groups.io> In-Reply-To: <16F1A3225F3A2D28.18186@groups.io> From: "Masahisa Kojima" Date: Tue, 12 Jul 2022 10:42:52 +0900 Message-ID: Subject: Re: [edk2-devel] [PATCH v3 5/6] [edk2-platforms] Silicon/SynQuacer: add DBG2 ACPI table To: Leif Lindholm , Ard Biesheuvel Cc: devel@edk2.groups.io, Kazuhiko Sakamoto , Jaswinder Singh Content-Type: text/plain; charset="UTF-8" Hi Leif, Ard, A gentle ping again on this. Thanks, Masahisa Kojima On Mon, 23 May 2022 at 13:58, Masahisa Kojima via groups.io wrote: > > Hi Leif, Ard, > > A gentle ping on this on behalf of Masami, since he left Linaro. > > Thanks, > Masahisa Kojima > > > On Fri, 10 Dec 2021 at 15:51, 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 > > --- > > Changes in v2: > > - Move Dbg2.aslc before Dsdt.asl to keep the list alphabetically sorted. > > - Use EFI_ACPI_6_3_SYSTEM_MEMORY and EFI_ACPI_6_3_BYTE for initialization. > > --- > > .../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/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf > > index 886777a0fa..e77d7a3056 100644 > > --- a/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf > > +++ b/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf > > @@ -19,6 +19,7 @@ > > [Sources] > > AcpiTables.h > > AcpiSsdtRootPci.asl > > + Dbg2.aslc > > Dsdt.asl > > Fadt.aslc > > Gtdt.aslc > > diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Dbg2.aslc b/Silicon/Socionext/SynQuacer/AcpiTables/Dbg2.aslc > > new file mode 100644 > > index 0000000000..89c9dbd998 > > --- /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_6_3_SYSTEM_MEMORY, 32, 0, EFI_ACPI_6_3_BYTE, Address } > > + > > +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 = { > > + { > > + __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, /* NumberofGenericAddressRegisters */ > > + 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 removing > > +// the data structure from the executable > > +VOID* CONST ReferenceAcpiTable = &Dbg2; > > > > > > >