From nobody Sun Nov 24 20:07:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+84298+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84298+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1638519180; cv=none; d=zohomail.com; s=zohoarc; b=Qdw05SfxOM+oLRoLmzq0mUXrUzthDL6oXcFrC/LBMq3nZ0ejvrOB9zHiWLDJws4EGXHdUfy3f6rGleCZHgpFar7wsAkDFRZPrTqP3b36spAVxD8kTpJSt4l+KvjHoEJLSBwm1t1lEPOFQwcYHq+NmvDoKW4F27DaHzN4AyfOyM0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638519180; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Y/QDCAYWdwVCnqcGTF7nTuOHVKGfps09iwbATH7FGrs=; b=ABjRGBU/vbPunrSjx8BqA1jIdaJzuk5xPSVWDNw4hxfPuE7y6b5qylXu3qMV56NkTqQfWDTpVB5449vmJmXNgrFOMhpMMp68HQkeAr/XmrAwr50gekowvh+GmU0ug8lbX8AkbO2eonkUTrZzx0oAUxnUy6pb+zOzHkn0typMmNQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84298+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1638519180083238.20392883337468; Fri, 3 Dec 2021 00:13:00 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id VcNYYY1788612xpMVT5Ji9wG; Fri, 03 Dec 2021 00:12:59 -0800 X-Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mx.groups.io with SMTP id smtpd.web12.9308.1638519179178782612 for ; Fri, 03 Dec 2021 00:12:59 -0800 X-Received: by mail-pj1-f52.google.com with SMTP id gx15-20020a17090b124f00b001a695f3734aso1883013pjb.0 for ; Fri, 03 Dec 2021 00:12:59 -0800 (PST) X-Gm-Message-State: BcaJ3BNOmJmD72cwdpdANZ6qx1787277AA= X-Google-Smtp-Source: ABdhPJyM+B6VWirZrw6FMHu3TOFdGalmHv/H64M6q10ZrTC6q0WVmR0UJPuZdvWS6AJw045s5zxv5g== X-Received: by 2002:a17:90a:6886:: with SMTP id a6mr12421009pjd.78.1638519178736; Fri, 03 Dec 2021 00:12:58 -0800 (PST) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id o124sm2142602pfb.177.2021.12.03.00.12.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Dec 2021 00:12:58 -0800 (PST) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto , Masahisa Kojima Subject: [edk2-devel] [PATCH v2 5/5] [edk2-platforms] Silicon/SynQuacer: add DBG2 ACPI table Date: Fri, 3 Dec 2021 17:12:55 +0900 Message-Id: <163851917557.1636051.61892798163129130.stgit@localhost> In-Reply-To: <163851913341.1636051.3357297397950801289.stgit@localhost> References: <163851913341.1636051.3357297397950801289.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,masami.hiramatsu@linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1638519179; bh=EgIu0MyWEHRdP+j3ALfUiYL49u5SqTC1W7rmRK4uVEk=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=vYm+EN2bpBkjBSgZIsLuifAu4lP1EOTt0dJAaGBcrRJuVdB7j4HlWHfAB8MJCoVK5cT 99lSrP3WkpE2UCuM4g7CNd5Rm7DTZUYEWYnnk/BfI1KeOYB6y3txfI7cKCYmJp3pqvl/n tblqcgCGu+uunZhpf57njvIiQmei5WijJ2I= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1638519180884100002 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 initializatio= n. --- .../Socionext/SynQuacer/AcpiTables/AcpiTables.inf | 1=20 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/Silico= n/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/Soc= ionext/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 =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, /* NumberofGenericAddressRegist= ers */ + 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 remov= ing +// the data structure from the executable +VOID* CONST ReferenceAcpiTable =3D &Dbg2; -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#84298): https://edk2.groups.io/g/devel/message/84298 Mute This Topic: https://groups.io/mt/87472870/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-