From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::241; helo=mail-wr0-x241.google.com; envelope-from=graeme.gregory@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 820CE22364880 for ; Tue, 30 Jan 2018 06:22:26 -0800 (PST) Received: by mail-wr0-x241.google.com with SMTP id y3so1538849wrh.3 for ; Tue, 30 Jan 2018 06:28:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=FuOjAI7WqN2CHlzj3HzFnAHPOCQQHHlEKCapOUxuwDg=; b=LgtKNa1G+YkkIp81qCWzb+TIEz+XPMUrKp9jjcCUJA1of2CJrUppts/BhXuI/yotGv bqVUMSPuvRMYebixR5sM/Jr5dhNOPNf3mszHNAoUZlBhSh6kuDoXEjIcEc04cjWAwMpq gZQgK7zVnXyMe76gN+MBUC7Ph+wUIQjrE0eOg= 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=FuOjAI7WqN2CHlzj3HzFnAHPOCQQHHlEKCapOUxuwDg=; b=LIEOgSUwM051qVoTvNliEnlcK0MXeDXNZeNIYu924WJWDbDULaXkgnVqyvl8c7DyIO 4YDRWutzCh49SOmrdjqVYuzLoaCuEan+jgNHiDUZNXqtcGddFCOPSCoIR8QEab5thUm0 HcE9QI/Uc6BLVNm4gyio65PGyh65yYiOT31z4BylFnaYXh1xt2QRxYBbV7zvNvT+ZhwY +TUmSD7L87NrQ2WHB+uUyep0K6LHbMhezr9fnIqrE1lGkO28IpkRGUQoRkaHOfc5lvkm FOK+7K/jiAbc3A0TdALCsRif2dDYKo1WJAwvcYqtC8j3aRphRX/0xq75JBF1zHwz7pec cIlw== X-Gm-Message-State: AKwxytfppg6SUN6KKHEL4kIaU9ZuNqtBi0jG23M3U/REF8JoefGSl3tX kroi9auzi1pIZFGENZas0lZOtiS9+XI= X-Google-Smtp-Source: AH8x225tsAD8hHLpeM7pT255Y2ZHcP3lbzhG9/7Fh6v6iM2xKllpLDerVDX+UGjITRB5+N9U0PBDkw== X-Received: by 10.223.148.33 with SMTP id 30mr21020919wrq.190.1517322479509; Tue, 30 Jan 2018 06:27:59 -0800 (PST) Received: from localhost (host-92-20-151-143.as13285.net. [92.20.151.143]) by smtp.gmail.com with ESMTPSA id w11sm15616447wrg.42.2018.01.30.06.27.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jan 2018 06:27:58 -0800 (PST) Date: Tue, 30 Jan 2018 14:27:55 +0000 From: graeme.gregory@linaro.org To: Ming Huang Cc: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, ard.biesheuvel@linaro.org, guoheyi@huawei.com, wanghuiqiang@huawei.com, huangming23@huawei.com, zhangjinsong2@huawei.com, mengfanrong@huawei.com, huangdaode@hisilicon.com, waip23@126.com Message-ID: <20180130142755.GA26342@xora-haswell> References: <1516953650-57980-1-git-send-email-huangming23@huawei.com> <1516953650-57980-2-git-send-email-huangming23@huawei.com> MIME-Version: 1.0 In-Reply-To: <1516953650-57980-2-git-send-email-huangming23@huawei.com> User-Agent: Mutt/1.9.2 (2017-12-15) Subject: Re: [PATCH edk2-platforms v2 01/15] Hisilicon/D05: Move Madt definition to head file X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jan 2018 14:22:27 -0000 X-Groupsio-MsgNum: 20702 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WIyZ46R2i8wDzkSu" Content-Disposition: inline --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 26, 2018 at 04:00:36PM +0800, Ming Huang wrote: > Move definition of Madt struct to head file, so PPTT driver > can include it. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ming Huang > Signed-off-by: Heyi Guo > --- Looks sane to me Reviewed-by: Graeme Gregory > Silicon/Hisilicon/Hi1616/D05AcpiTables/Hi1616Platform.h | 30 +++++++++++= ++++++++- > Silicon/Hisilicon/Hi1616/D05AcpiTables/MadtHi1616.aslc | 23 +----------= ---- > 2 files changed, 30 insertions(+), 23 deletions(-) >=20 > diff --git a/Silicon/Hisilicon/Hi1616/D05AcpiTables/Hi1616Platform.h b/Si= licon/Hisilicon/Hi1616/D05AcpiTables/Hi1616Platform.h > index 808219a..ad73aa2 100644 > --- a/Silicon/Hisilicon/Hi1616/D05AcpiTables/Hi1616Platform.h > +++ b/Silicon/Hisilicon/Hi1616/D05AcpiTables/Hi1616Platform.h > @@ -1,7 +1,7 @@ > /** @file > * > * Copyright (c) 2011-2015, ARM Limited. All rights reserved. > -* Copyright (c) 2015-2016, Hisilicon Limited. All rights reserved. > +* Copyright (c) 2015-2018, Hisilicon Limited. All rights reserved. > * Copyright (c) 2015-2016, Linaro Limited. All rights reserved. > * > * This program and the accompanying materials > @@ -20,6 +20,8 @@ > #ifndef _HI1610_PLATFORM_H_ > #define _HI1610_PLATFORM_H_ > =20 > +#include > + > // > // ACPI table information used to initialize tables. > // > @@ -44,5 +46,31 @@ > } > =20 > #define HI1616_WATCHDOG_COUNT 2 > +#define HI1616_GIC_STRUCTURE_COUNT 64 > + > +#define HI1616_MPID_TA_BASE 0x10000 > +#define HI1616_MPID_TB_BASE 0x30000 > +#define HI1616_MPID_TA_2_BASE 0x50000 > +#define HI1616_MPID_TB_2_BASE 0x70000 > + > +// Differs from Juno, we have another affinity level beyond cluster and = core > +#define PLATFORM_GET_MPID_TA(ClusterId, CoreId) (HI1616_MPID_TA_BASE |= ((ClusterId) << 8) | (CoreId)) > +#define PLATFORM_GET_MPID_TB(ClusterId, CoreId) (HI1616_MPID_TB_BASE |= ((ClusterId) << 8) | (CoreId)) > +#define PLATFORM_GET_MPID_TA_2(ClusterId, CoreId) (HI1616_MPID_TA_2_BA= SE | ((ClusterId) << 8) | (CoreId)) > +#define PLATFORM_GET_MPID_TB_2(ClusterId, CoreId) (HI1616_MPID_TB_2_BA= SE | ((ClusterId) << 8) | (CoreId)) > + > +// > +// Multiple APIC Description Table > +// > +#pragma pack (1) > + > +typedef struct { > + EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header; > + EFI_ACPI_6_1_GIC_STRUCTURE GicInterfaces[HI= 1616_GIC_STRUCTURE_COUNT]; > + EFI_ACPI_6_1_GIC_DISTRIBUTOR_STRUCTURE GicDistributor; > + EFI_ACPI_6_1_GIC_ITS_STRUCTURE GicITS[8]; > +} EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE; > + > +#pragma pack () > =20 > #endif > diff --git a/Silicon/Hisilicon/Hi1616/D05AcpiTables/MadtHi1616.aslc b/Sil= icon/Hisilicon/Hi1616/D05AcpiTables/MadtHi1616.aslc > index 169ee72..54605a6 100644 > --- a/Silicon/Hisilicon/Hi1616/D05AcpiTables/MadtHi1616.aslc > +++ b/Silicon/Hisilicon/Hi1616/D05AcpiTables/MadtHi1616.aslc > @@ -2,7 +2,7 @@ > * Multiple APIC Description Table (MADT) > * > * Copyright (c) 2012 - 2014, ARM Limited. All rights reserved. > -* Copyright (c) 2015 - 2016, Hisilicon Limited. All rights reserved. > +* Copyright (c) 2015 - 2018, Hisilicon Limited. All rights reserved. > * Copyright (c) 2015 - 2016, Linaro Limited. All rights reserved. > * > * This program and the accompanying materials > @@ -27,27 +27,6 @@ > #include > #include "Hi1616Platform.h" > =20 > -// Differs from Juno, we have another affinity level beyond cluster and = core > -// 0x20000 is only for socket 0 > -#define PLATFORM_GET_MPID_TA(ClusterId, CoreId) (0x10000 | ((ClusterId= ) << 8) | (CoreId)) > -#define PLATFORM_GET_MPID_TB(ClusterId, CoreId) (0x30000 | ((ClusterId= ) << 8) | (CoreId)) > -#define PLATFORM_GET_MPID_TA_2(ClusterId, CoreId) (0x50000 | ((Cluster= Id) << 8) | (CoreId)) > -#define PLATFORM_GET_MPID_TB_2(ClusterId, CoreId) (0x70000 | ((Cluster= Id) << 8) | (CoreId)) > - > -// > -// Multiple APIC Description Table > -// > -#pragma pack (1) > - > -typedef struct { > - EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header; > - EFI_ACPI_6_1_GIC_STRUCTURE GicInterfaces[64= ]; > - EFI_ACPI_6_1_GIC_DISTRIBUTOR_STRUCTURE GicDistributor; > - EFI_ACPI_6_1_GIC_ITS_STRUCTURE GicITS[8]; > -} EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE; > - > -#pragma pack () > - > EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE Madt =3D { > { > ARM_ACPI_HEADER ( > --=20 > 1.9.1 >=20 --WIyZ46R2i8wDzkSu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEenb+qYJ1KjE/UpmZkGKawB22KXYFAlpwgNQACgkQkGKawB22 KXYrFg//TctR82lwqXmL3pJaywrDZrKOWstIEAuqJY4YdnRJzANqhvBwc6oJQ+kE lyl+rGKKhsM8QwBzL/4JUAIUc5YpLIWj1ypPCuEy1VHXlPviTh7WoKJVN9RBkMw3 zKhUq5X1k4BzvsO+RDF3u8YV4dUn2IK/ora6Web8JPcbmiB/gN4qnXWWD0BcbR6/ C93SGeTottFsosBmmRLUDHIr8KTPZIWT8DA/nLFckPdvFA5c/0OWD89EDMeQTfXg 76W5Mb19EV4RR9bYTkVk/yLjZfYt49uQWcNPt+hB5eC4A8/OP5HmF2+q1wdmpta6 E4ShQPSaZufTu47Keu+Lz50/F/aW210huuRoPTAdvE6wilp2FdPQvwrdxaZelfzW RLwkIUi/H3JM9LU+5ZTxe/1QuXue0Y6xoHX1NHFEosOiIGvvNM3/52KXW79vu8zG ghUP2n++ErEMm/EzRq2lgq4KU8mKhy54jzb6vqP1y3n4fWViXBMtArwCxNT3x5Ag yrJlkMKXFUnEtRlfuTFG0cW6rUtcnpuG9/FhvKZUtGUBCwdEZ7OZgFpB0zwMj5tW EixXQh8txegJsKQhjqfsRDRGXrTlpsXj3fdVXFz15oQzb61wva45G3BRhTg4jVPi 7/TdTiYYEkTA/fAQTLcyatE1BBx1dEl6L1ritB46EEbpP9lifI0= =sc2I -----END PGP SIGNATURE----- --WIyZ46R2i8wDzkSu--