From nobody Sun Nov 24 20:34:09 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+83379+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+83379+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1636104238; cv=none; d=zohomail.com; s=zohoarc; b=kYwek3XdkM04/Z6LE5n8q0HtArJLcFmod8OCX4A0AoB5AOUfSz0aTIG63tRzlGaisuD2TGev7Pkun87K1TS80MS0bG6O5NwPdFrBM2KngG20NB0/GVBggz+sySndxAaiDDMT8fm3igxS6XKSOsf8nCgpsHqzZII58RpDNouJPik= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636104238; 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=nJhiyJMRRy5KNQOytrdSUxMh/QP8IeYxIFpxfRFuyAs=; b=Ccq/D+BDPfHCW9J7RRbOh36IuPQRdgHvYnDaPQafM9anoIuVZwULvV2PZzfHSG46HH4rDfxByLFoMsFhDWfABRzYf3GNE8IlZCwzH4s3bCIn2596jvxTfBbcQCCVEylmlnWsurhVfTEOKYmCr1+vXBKFnd4x5YE3yo09v5tW+yk= 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+83379+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 1636104238083497.5934985373199; Fri, 5 Nov 2021 02:23:58 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 7wyWYY1788612xLEWO4FBqes; Fri, 05 Nov 2021 02:23:57 -0700 X-Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mx.groups.io with SMTP id smtpd.web12.3125.1636104237320381422 for ; Fri, 05 Nov 2021 02:23:57 -0700 X-Received: by mail-pj1-f51.google.com with SMTP id t5-20020a17090a4e4500b001a0a284fcc2so2917529pjl.2 for ; Fri, 05 Nov 2021 02:23:57 -0700 (PDT) X-Gm-Message-State: rnKL7TpmboFzKCm51bK02ujRx1787277AA= X-Google-Smtp-Source: ABdhPJzEKz2gV+t1ZBOMEAIFbjseHuNyGXY1GQ7lFS6qaul05p02s5zehEtCCswA4i33gfmTkLsKfg== X-Received: by 2002:a17:902:b084:b0:141:f5f8:1c5a with SMTP id p4-20020a170902b08400b00141f5f81c5amr28325328plr.40.1636104236171; Fri, 05 Nov 2021 02:23:56 -0700 (PDT) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id y32sm7564401pfa.145.2021.11.05.02.23.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 02:23:55 -0700 (PDT) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto , Masahisa Kojima Subject: [edk2-devel] [PATCH 4/5] [edk2-platforms] Silicon/SynQuacer: add DBG2 ACPI table Date: Fri, 5 Nov 2021 18:23:53 +0900 Message-Id: <163610423326.391624.7578010263371252647.stgit@localhost> In-Reply-To: <163610419943.391624.9289897029386201296.stgit@localhost> References: <163610419943.391624.9289897029386201296.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=1636104237; bh=w2abRIiOAigoMxtFFSLsgFQwKnO+rV4BeIdVrdm89Dw=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=HS6Fk1GxQV2oQo+Vieu2XJCsI7EreJU7672mz2zJoaeMq3YQgwkG8LJkiS83lY+936Z 14e2LLoTpiemB8RIWT0hB/PMXFtzCVGHS7q0pb058X16Q/TG/sXd8Xzf/SnCI3OdESeHI sHKh/Ht8ybXZ0wZIvDeDmTRc2rK1E662WqE= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1636104240403100001 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=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..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 Iort.aslc Madt.aslc Mcfg.aslc diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Dbg2.aslc b/Silicon/Soc= ionext/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_ACPI_5_= 0_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 (#83379): https://edk2.groups.io/g/devel/message/83379 Mute This Topic: https://groups.io/mt/86836384/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-