From nobody Sun Nov 24 18:51:44 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+84625+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+84625+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1639119076; cv=none; d=zohomail.com; s=zohoarc; b=OxXBJH/8FXUBWGWk7yKoT1DyzY+EX+rIaytQM+XJIrRC2eaJ1coqKukVQPcHATtMfPTM8dbD6AeCn+O0SMKC/Tt0Pw2OFd69zhiBm3h1jec1VT+mlDsMajIYU3IOqOZQMeeNKmx5+J9n0odb3WmuQHeCiC87Kapx2S/DrTMqmfk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639119076; 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=zjJGp8L9G8EX1OzvBfIY87/nLYmX7pEJ+E2BqIfUVhU=; b=baJrd+0/8Qn0or7mULeMQNYtJjaQ8V8rWh1hfBdIeh8TUIA6fWFk7eYYNEIHStpDM6qcLiKPTNBlmRhTCSmSZFVQbD5cj4ZVKCKVkVd1zij1jgyT7fT0tnmTwNxnUaMqTrDWaq7vLVcSs5Y4sUa5tMT/Tj0f5fFU1TclZK/AxPw= 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+84625+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 1639119076911160.69919421349869; Thu, 9 Dec 2021 22:51:16 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id R4LLYY1788612xv6iDCJb4tN; Thu, 09 Dec 2021 22:51:16 -0800 X-Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mx.groups.io with SMTP id smtpd.web12.4027.1639119075882991755 for ; Thu, 09 Dec 2021 22:51:16 -0800 X-Received: by mail-pg1-f178.google.com with SMTP id r5so7257904pgi.6 for ; Thu, 09 Dec 2021 22:51:15 -0800 (PST) X-Gm-Message-State: 1knjWM2Dzummu6VnNavnm8ejx1787277AA= X-Google-Smtp-Source: ABdhPJwnWhYUwqrXrNnc3Tfh7uIBttTCXkmwoJqvQJbJco+RlF4U55VvrkA2juPVJkDg5QWaXYZ8Dw== X-Received: by 2002:aa7:8219:0:b0:4a4:bec7:ef10 with SMTP id k25-20020aa78219000000b004a4bec7ef10mr16303843pfi.37.1639119075392; Thu, 09 Dec 2021 22:51:15 -0800 (PST) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id c2sm1879213pfv.112.2021.12.09.22.51.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 22:51:15 -0800 (PST) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto , Masahisa Kojima Subject: [edk2-devel] [PATCH v3 5/6] [edk2-platforms] Silicon/SynQuacer: add DBG2 ACPI table Date: Fri, 10 Dec 2021 15:51:12 +0900 Message-Id: <163911907249.561661.11382999726925773930.stgit@localhost> In-Reply-To: <163911902995.561661.9429300579159746333.stgit@localhost> References: <163911902995.561661.9429300579159746333.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=1639119076; bh=RNpOgQJcKHxCneCbRenHKYLQGNZ2Gr1/0XF/BLtEQfc=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=C5PX8Ackah6+nzlvAarasEtbl8A6bAiITq9Dz40SaSTPu0um9Ama49AdoNdY7GPluqJ bF6w5krapLutDXOAMeuFpudt36oNBUBAi+J2eBAncsp6jVCwNFWyQEgsqpXfr54TlqmoG SEcg7d4Ap3O20yea1T66g+iTrs9MjESVC5Q= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1639119078200100002 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 (#84625): https://edk2.groups.io/g/devel/message/84625 Mute This Topic: https://groups.io/mt/87631129/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-