From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web11.108994.1597925615665132000 for ; Thu, 20 Aug 2020 05:13:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=OnJw/sMf; spf=pass (domain: nuviainc.com, ip: 209.85.221.66, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f66.google.com with SMTP id y3so1807138wrl.4 for ; Thu, 20 Aug 2020 05:13:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ibu3F+3GeQpsS9zGjE4Ghr8BLOVjWkTpGeNyBby6E64=; b=OnJw/sMfKuNqO67jmRjSwhkZ5B75XWL0TmSWv+7oaNqZVxL3FzVj4t63f272vpjn1S +7H6SkqJE3K06drF88VCq5ejYaljWZYTGbDTiC/UwNjqGT+EoNpN9p/rN/Ew/Sr3KzAh 6PGpZjbRzBctwcnxwPKaU7CJAKyYq70SqOI15Y1l6qBeoQNjHwbeFtMw9rWvaK6Rs3kK FPd/LOnEPel1N6trvHmPXZRrQob7wdItoUviq6dpCP1ROQqG7hzA05I05C3kArp3SSXr eTtW+MOdtidElbeTBI1BaNZVSlgqsrHIqJx/qYJeQpl/+1pbkAEtwMNkFH/ZEg9xvz0O 5igg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ibu3F+3GeQpsS9zGjE4Ghr8BLOVjWkTpGeNyBby6E64=; b=TwePLIqLYqqas99e6ogHg8xR97TjisFD63+W6973KrRg+5levV4cTAHxlOqEWLSAlU t6ydE7M+6E+pzarbnmS0DMglEOh1bCTBmRDxv7VcUvwgsKO62iIJ7XBYy5OefT9v0Fmq 9MCJhuHj6lLODM7HL2Dz2qUoMtNZCYNl1RSa0721TmeI/aJlycLHsDga7V5em4xRVAm+ FpZg8fUO2pfRGV5clLR5LcD183ZevD5QRoVftAh3VXrVkgiT+iMey0oFp/lVlG916uiD pWyGqljTKm+Ea/nQrqBTxxBP5KaY3/AoCrYt4QVuioOHNkLd29vwdr8mCHSyqI/xAtVt 42aw== X-Gm-Message-State: AOAM530Zv6+bq1Zi7bl3DVWO5+hiOSCTmhKBhnF7fQt+ALk6SNtiH2vf BqYblH7atmIFMGOJUxjvbV08Gw== X-Google-Smtp-Source: ABdhPJzfh8z11UeAgWq4uLCMcMrN84aBJudmQd7mvMgbOfku5+eJq4idcoznBree3tJvJ3220MFMRQ== X-Received: by 2002:adf:fc06:: with SMTP id i6mr2900285wrr.79.1597925614106; Thu, 20 Aug 2020 05:13:34 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id k10sm3734771wrm.74.2020.08.20.05.13.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2020 05:13:33 -0700 (PDT) Date: Thu, 20 Aug 2020 13:13:31 +0100 From: "Leif Lindholm" To: Tanmay Jagdale Cc: graeme@nuviainc.com, shashi.mallela@linaro.org, devel@edk2.groups.io, paul.isaacs@linaro.org, tanmay@marvell.com Subject: Re: [PATCH edk2-platforms 7/7] SbsaQemu: AcpiTables: Add DBG2 Table Message-ID: <20200820121331.GH1191@vanye> References: <20200819143005.13999-1-tanmay.jagdale@linaro.org> <20200819143005.13999-8-tanmay.jagdale@linaro.org> MIME-Version: 1.0 In-Reply-To: <20200819143005.13999-8-tanmay.jagdale@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 19, 2020 at 20:00:05 +0530, Tanmay Jagdale wrote: > Signed-off-by: Tanmay Jagdale > --- > .../Qemu/SbsaQemu/AcpiTables/AcpiTables.inf | 1 + > Silicon/Qemu/SbsaQemu/AcpiTables/Dbg2.aslc | 68 +++++++++++++++++++ > 2 files changed, 69 insertions(+) > create mode 100644 Silicon/Qemu/SbsaQemu/AcpiTables/Dbg2.aslc > > diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf > index 0b5017ce81c5..cf6628c9e491 100644 > --- a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf > +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf > @@ -17,6 +17,7 @@ [Defines] > > [Sources] > Dsdt.asl > + Dbg2.aslc That should go before Dsdt.asl. > Fadt.aslc > Gtdt.aslc > Spcr.aslc > diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/Dbg2.aslc b/Silicon/Qemu/SbsaQemu/AcpiTables/Dbg2.aslc > new file mode 100644 > index 000000000000..801b05b59a42 > --- /dev/null > +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/Dbg2.aslc > @@ -0,0 +1,68 @@ > +/** @file > +* Debug Port Table (DBG2) > +* > +* Copyright (c) 2020 Linaro Ltd. All rights reserved. > +* > +* SPDX-License-Identifier: BSD-2-Clause-Patent > +* > +**/ > +#include > +#include Can drop Acpi63.h. / Leif > +#include > +#include > +#include > +#include > + > +#pragma pack(1) > + > +#define SBSAQEMU_UART_STR { '\\', '_', 'S', 'B', '.', 'C', 'O', 'M', '0', 0x00 } > + > +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 = { > + { > + SBSAQEMU_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_ARM_PL011_UART, > + {EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE}, > + OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, BaseAddressRegister), > + OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, AddressSize) > + }, > + ARM_GAS32 (SBSAQEMU_UART0_BASE), /* BaseAddressRegister */ > + 0x1000, /* AddressSize */ > + SBSAQEMU_UART_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; > -- > 2.28.0 >