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:c09::243; helo=mail-wm0-x243.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (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 334C521BADAB2 for ; Fri, 3 Aug 2018 03:37:19 -0700 (PDT) Received: by mail-wm0-x243.google.com with SMTP id o18-v6so5935552wmc.0 for ; Fri, 03 Aug 2018 03:37:19 -0700 (PDT) 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=9QAwS4k+QyvM+rhKgkIaIfNSFE+F87oKOslFXMIjBCk=; b=Wss+Hfn4J7XzcIJMib8Ma01PgdzJIJH7F9IBbL49Tn8wEhPeiHevsSohFMXvWbQp2j i4uPb4vCJuS7QcgPyyPJXG7qlGBQuEA1Q6GyVS9cDdQmzHaEl/m+K2MaRmYimmNHNOEV gpF/XzJ53U0y28nCpJpyUxlPIRlmTBcd07pJU= 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=9QAwS4k+QyvM+rhKgkIaIfNSFE+F87oKOslFXMIjBCk=; b=rtiIEqLN60Z1XxynZ3Nu1H768DCGs28+gKDe1EjKh3cU5WYH3lrY6N6MsnCZ5CXFPK 4F6lUMhJdyf19xvrOVlPlntaguMmqKfn7QVc7yXNfkhtb2TotVE1RHk86U7Ka68PWAXt FMw+J3qQGKVRrAzb2fcRF/VBvyuCK4Fyxn+ra8fmWnb25FSdS+ILTc6AdX6KKbSmAjFK 58x1GLTW3XgKQ9kOZvNygd7JKcVtd6AgbHdym7ijVYz5QeAHQXV/Kg9/4BTnDKb5CM/p iUibh0V58VzWMRLe3t4Yv7hzfEo9rWBl2K5MsLIoghCt9Ssg80Huo2UdsyzHojUHYxYd uCaA== X-Gm-Message-State: AOUpUlEfLrSf/Gwt+Jhyl/3uNQnSLh+Jn6Wuxu96pPhbpWo7E3tJMgAs BMP8xtHPjcXO2+9bfxdItT8piA== X-Google-Smtp-Source: AAOMgpdxyBeQnCFQUacdOZ2uFoAQK0wPAEDcsCHHsVdeRymCQUuwfx/VxV0WA6tO4lSOsxvshBUHOA== X-Received: by 2002:a1c:e455:: with SMTP id b82-v6mr4967083wmh.93.1533292638300; Fri, 03 Aug 2018 03:37:18 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id q70-v6sm6681618wmd.39.2018.08.03.03.37.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Aug 2018 03:37:17 -0700 (PDT) Date: Fri, 3 Aug 2018 11:37:15 +0100 From: Leif Lindholm To: Ming Huang Cc: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org, ard.biesheuvel@linaro.org, guoheyi@huawei.com, wanghuiqiang@huawei.com, huangming23@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, xinliang.liu@linaro.org, Sun Yuanchen , Heyi Guo Message-ID: <20180803103715.ep6dquwyzx5xytqm@bivouac.eciton.net> References: <20180724070922.63362-1-ming.huang@linaro.org> <20180724070922.63362-14-ming.huang@linaro.org> MIME-Version: 1.0 In-Reply-To: <20180724070922.63362-14-ming.huang@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms v1 13/38] Silicon/Hisilicon/Acpi: Move some macro to PlatformArch.h X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2018 10:37:20 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 24, 2018 at 03:08:57PM +0800, Ming Huang wrote: > From: Sun Yuanchen > > ARM_ACPI_HEADER is used by a unify module in other Pkg, What other Pkg? > so move some macro to PlatformArch.h for unify D0x. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Sun Yuanchen > Signed-off-by: Ming Huang > Signed-off-by: Heyi Guo On the whole, I think this should be implemented for 1610/1616 separately, and then introduced in the first version of the 1620 header. > --- > Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/Hi1610Platform.h | 27 +++----------------- > Silicon/Hisilicon/Hi1610/Include/PlatformArch.h | 24 +++++++++++++++++ > Silicon/Hisilicon/Hi1616/D05AcpiTables/Hi1616Platform.h | 24 +---------------- > Silicon/Hisilicon/Hi1616/Include/PlatformArch.h | 23 +++++++++++++++++ > Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Platform.h | 25 ++---------------- > Silicon/Hisilicon/Hi1620/Include/PlatformArch.h | 23 +++++++++++++++++ > 6 files changed, 76 insertions(+), 70 deletions(-) > > diff --git a/Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/Hi1610Platform.h b/Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/Hi1610Platform.h > index 5a95b02055..28546bea99 100644 > --- a/Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/Hi1610Platform.h > +++ b/Silicon/Hisilicon/Hi1610/Hi1610AcpiTables/Hi1610Platform.h > @@ -1,8 +1,8 @@ > /** @file > * > * Copyright (c) 2011-2015, ARM Limited. All rights reserved. > -* Copyright (c) 2015, Hisilicon Limited. All rights reserved. > -* Copyright (c) 2015, Linaro Limited. All rights reserved. > +* Copyright (c) 2015-2018, Hisilicon Limited. All rights reserved. > +* Copyright (c) 2015-2018, Linaro Limited. All rights reserved. > * > * This program and the accompanying materials > * are licensed and made available under the terms and conditions of the BSD License > @@ -20,28 +20,7 @@ > #ifndef _HI1610_PLATFORM_H_ > #define _HI1610_PLATFORM_H_ > > -// > -// ACPI table information used to initialize tables. > -// > -#define EFI_ACPI_ARM_OEM_ID 'H','I','S','I',' ',' ' // OEMID 6 bytes long > -#define EFI_ACPI_ARM_OEM_TABLE_ID SIGNATURE_64('H','I','P','0','6',' ',' ',' ') // OEM table id 8 bytes long > -#define EFI_ACPI_ARM_OEM_REVISION 0x00000000 > -#define EFI_ACPI_ARM_CREATOR_ID SIGNATURE_32('I','N','T','L') > -#define EFI_ACPI_ARM_CREATOR_REVISION 0x20151124 > - > -// A macro to initialise the common header part of EFI ACPI tables as defined by > -// EFI_ACPI_DESCRIPTION_HEADER structure. > -#define ARM_ACPI_HEADER(Signature, Type, Revision) { \ > - Signature, /* UINT32 Signature */ \ > - sizeof (Type), /* UINT32 Length */ \ > - Revision, /* UINT8 Revision */ \ > - 0, /* UINT8 Checksum */ \ > - { EFI_ACPI_ARM_OEM_ID }, /* UINT8 OemId[6] */ \ > - EFI_ACPI_ARM_OEM_TABLE_ID, /* UINT64 OemTableId */ \ > - EFI_ACPI_ARM_OEM_REVISION, /* UINT32 OemRevision */ \ > - EFI_ACPI_ARM_CREATOR_ID, /* UINT32 CreatorId */ \ > - EFI_ACPI_ARM_CREATOR_REVISION /* UINT32 CreatorRevision */ \ > - } > +#include <../Include/PlatformArch.h> No relative #includes. > > #define HI1610_WATCHDOG_COUNT 2 > > diff --git a/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h b/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h > index f2e931f30b..03e96cfd31 100644 > --- a/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h > +++ b/Silicon/Hisilicon/Hi1610/Include/PlatformArch.h > @@ -37,5 +37,29 @@ > > #define S1_BASE 0x40000000000 > > + > +// > +// ACPI table information used to initialize tables. > +// > +#define EFI_ACPI_ARM_OEM_ID 'H','I','S','I',' ',' ' // OEMID 6 bytes long > +#define EFI_ACPI_ARM_OEM_TABLE_ID SIGNATURE_64 ('H','I','P','0','6',' ',' ',' ') // OEM table id 8 bytes long > +#define EFI_ACPI_ARM_OEM_REVISION 0x00000000 > +#define EFI_ACPI_ARM_CREATOR_ID SIGNATURE_32 ('I','N','T','L') I realise this is just moving, but ... why are we claiming that Intel is the creator of these tables? > +#define EFI_ACPI_ARM_CREATOR_REVISION 0x20151124 > + > +// A macro to initialise the common header part of EFI ACPI tables as defined by > +// EFI_ACPI_DESCRIPTION_HEADER structure. > +#define ARM_ACPI_HEADER(Signature, Type, Revision) { \ > + Signature, /* UINT32 Signature */ \ > + sizeof (Type), /* UINT32 Length */ \ > + Revision, /* UINT8 Revision */ \ > + 0, /* UINT8 Checksum */ \ > + { EFI_ACPI_ARM_OEM_ID }, /* UINT8 OemId[6] */ \ > + EFI_ACPI_ARM_OEM_TABLE_ID, /* UINT64 OemTableId */ \ > + EFI_ACPI_ARM_OEM_REVISION, /* UINT32 OemRevision */ \ > + EFI_ACPI_ARM_CREATOR_ID, /* UINT32 CreatorId */ \ > + EFI_ACPI_ARM_CREATOR_REVISION /* UINT32 CreatorRevision */ \ > + } > + > #endif > > diff --git a/Silicon/Hisilicon/Hi1616/D05AcpiTables/Hi1616Platform.h b/Silicon/Hisilicon/Hi1616/D05AcpiTables/Hi1616Platform.h > index ad73aa2668..04f9e34a14 100644 > --- a/Silicon/Hisilicon/Hi1616/D05AcpiTables/Hi1616Platform.h > +++ b/Silicon/Hisilicon/Hi1616/D05AcpiTables/Hi1616Platform.h > @@ -21,29 +21,7 @@ > #define _HI1610_PLATFORM_H_ > > #include > - > -// > -// ACPI table information used to initialize tables. > -// > -#define EFI_ACPI_ARM_OEM_ID 'H','I','S','I',' ',' ' // OEMID 6 bytes long > -#define EFI_ACPI_ARM_OEM_TABLE_ID SIGNATURE_64('H','I','P','0','7',' ',' ',' ') // OEM table id 8 bytes long > -#define EFI_ACPI_ARM_OEM_REVISION 0x00000000 > -#define EFI_ACPI_ARM_CREATOR_ID SIGNATURE_32('I','N','T','L') > -#define EFI_ACPI_ARM_CREATOR_REVISION 0x20151124 > - > -// A macro to initialise the common header part of EFI ACPI tables as defined by > -// EFI_ACPI_DESCRIPTION_HEADER structure. > -#define ARM_ACPI_HEADER(Signature, Type, Revision) { \ > - Signature, /* UINT32 Signature */ \ > - sizeof (Type), /* UINT32 Length */ \ > - Revision, /* UINT8 Revision */ \ > - 0, /* UINT8 Checksum */ \ > - { EFI_ACPI_ARM_OEM_ID }, /* UINT8 OemId[6] */ \ > - EFI_ACPI_ARM_OEM_TABLE_ID, /* UINT64 OemTableId */ \ > - EFI_ACPI_ARM_OEM_REVISION, /* UINT32 OemRevision */ \ > - EFI_ACPI_ARM_CREATOR_ID, /* UINT32 CreatorId */ \ > - EFI_ACPI_ARM_CREATOR_REVISION /* UINT32 CreatorRevision */ \ > - } > +#include <../Include/PlatformArch.h> No relative includes. > > #define HI1616_WATCHDOG_COUNT 2 > #define HI1616_GIC_STRUCTURE_COUNT 64 > diff --git a/Silicon/Hisilicon/Hi1616/Include/PlatformArch.h b/Silicon/Hisilicon/Hi1616/Include/PlatformArch.h > index f2e931f30b..14e9b483af 100644 > --- a/Silicon/Hisilicon/Hi1616/Include/PlatformArch.h > +++ b/Silicon/Hisilicon/Hi1616/Include/PlatformArch.h > @@ -37,5 +37,28 @@ > > #define S1_BASE 0x40000000000 > > +// > +// ACPI table information used to initialize tables. > +// > +#define EFI_ACPI_ARM_OEM_ID 'H','I','S','I',' ',' ' // OEMID 6 bytes long > +#define EFI_ACPI_ARM_OEM_TABLE_ID SIGNATURE_64 ('H','I','P','0','7',' ',' ',' ') // OEM table id 8 bytes long > +#define EFI_ACPI_ARM_OEM_REVISION 0x00000000 > +#define EFI_ACPI_ARM_CREATOR_ID SIGNATURE_32 ('I','N','T','L') > +#define EFI_ACPI_ARM_CREATOR_REVISION 0x20151124 > + > +// A macro to initialise the common header part of EFI ACPI tables as defined by > +// EFI_ACPI_DESCRIPTION_HEADER structure. > +#define ARM_ACPI_HEADER(Signature, Type, Revision) { \ > + Signature, /* UINT32 Signature */ \ > + sizeof (Type), /* UINT32 Length */ \ > + Revision, /* UINT8 Revision */ \ > + 0, /* UINT8 Checksum */ \ > + { EFI_ACPI_ARM_OEM_ID }, /* UINT8 OemId[6] */ \ > + EFI_ACPI_ARM_OEM_TABLE_ID, /* UINT64 OemTableId */ \ > + EFI_ACPI_ARM_OEM_REVISION, /* UINT32 OemRevision */ \ > + EFI_ACPI_ARM_CREATOR_ID, /* UINT32 CreatorId */ \ > + EFI_ACPI_ARM_CREATOR_REVISION /* UINT32 CreatorRevision */ \ > + } > + > #endif > > diff --git a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Platform.h b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Platform.h > index 676d91fa49..5a6aa9a876 100644 > --- a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Platform.h > +++ b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Platform.h > @@ -2,7 +2,7 @@ > * > * Copyright (c) 2011-2015, ARM Limited. All rights reserved. > * Copyright (c) 2018, Hisilicon Limited. All rights reserved. > -* Copyright (c) 2015, Linaro Limited. All rights reserved. > +* Copyright (c) 2015-2018, Linaro Limited. All rights reserved. > * > * This program and the accompanying materials > * are licensed and made available under the terms and conditions of the BSD License > @@ -20,28 +20,7 @@ > #ifndef _HI1620_PLATFORM_H_ > #define _HI1620_PLATFORM_H_ > > -// > -// ACPI table information used to initialize tables. > -// > -#define EFI_ACPI_ARM_OEM_ID 'H','I','S','I',' ',' ' // OEMID 6 bytes long > -#define EFI_ACPI_ARM_OEM_TABLE_ID SIGNATURE_64 ('H','I','P','0','8',' ',' ',' ') // OEM table id 8 bytes long > -#define EFI_ACPI_ARM_OEM_REVISION 0x00000000 > -#define EFI_ACPI_ARM_CREATOR_ID SIGNATURE_32 ('I','N','T','L') > -#define EFI_ACPI_ARM_CREATOR_REVISION 0x20151124 > - > -// A macro to initialise the common header part of EFI ACPI tables as defined by > -// EFI_ACPI_DESCRIPTION_HEADER structure. > -#define ARM_ACPI_HEADER(Signature, Type, Revision) { \ > - Signature, /* UINT32 Signature */ \ > - sizeof (Type), /* UINT32 Length */ \ > - Revision, /* UINT8 Revision */ \ > - 0, /* UINT8 Checksum */ \ > - { EFI_ACPI_ARM_OEM_ID }, /* UINT8 OemId[6] */ \ > - EFI_ACPI_ARM_OEM_TABLE_ID, /* UINT64 OemTableId */ \ > - EFI_ACPI_ARM_OEM_REVISION, /* UINT32 OemRevision */ \ > - EFI_ACPI_ARM_CREATOR_ID, /* UINT32 CreatorId */ \ > - EFI_ACPI_ARM_CREATOR_REVISION /* UINT32 CreatorRevision */ \ > - } > +#include <../Include/PlatformArch.h> No relative includes. / Leif > > #define HI1620_WATCHDOG_COUNT 2 > > diff --git a/Silicon/Hisilicon/Hi1620/Include/PlatformArch.h b/Silicon/Hisilicon/Hi1620/Include/PlatformArch.h > index 2fc1b9219d..ac90e9dfb5 100644 > --- a/Silicon/Hisilicon/Hi1620/Include/PlatformArch.h > +++ b/Silicon/Hisilicon/Hi1620/Include/PlatformArch.h > @@ -36,5 +36,28 @@ > #define EFI_ACPI_MEMORY_AFFINITY_STRUCTURE_COUNT 16 > #define EFI_ACPI_6_2_ITS_AFFINITY_STRUCTURE_COUNT 1 > > +// > +// ACPI table information used to initialize tables. > +// > +#define EFI_ACPI_ARM_OEM_ID 'H','I','S','I',' ',' ' // OEMID 6 bytes long > +#define EFI_ACPI_ARM_OEM_TABLE_ID SIGNATURE_64 ('H','I','P','0','8',' ',' ',' ') // OEM table id 8 bytes long > +#define EFI_ACPI_ARM_OEM_REVISION 0x00000000 > +#define EFI_ACPI_ARM_CREATOR_ID SIGNATURE_32 ('I','N','T','L') > +#define EFI_ACPI_ARM_CREATOR_REVISION 0x20151124 > + > +// A macro to initialise the common header part of EFI ACPI tables as defined by > +// EFI_ACPI_DESCRIPTION_HEADER structure. > +#define ARM_ACPI_HEADER(Signature, Type, Revision) { \ > + Signature, /* UINT32 Signature */ \ > + sizeof (Type), /* UINT32 Length */ \ > + Revision, /* UINT8 Revision */ \ > + 0, /* UINT8 Checksum */ \ > + { EFI_ACPI_ARM_OEM_ID }, /* UINT8 OemId[6] */ \ > + EFI_ACPI_ARM_OEM_TABLE_ID, /* UINT64 OemTableId */ \ > + EFI_ACPI_ARM_OEM_REVISION, /* UINT32 OemRevision */ \ > + EFI_ACPI_ARM_CREATOR_ID, /* UINT32 CreatorId */ \ > + EFI_ACPI_ARM_CREATOR_REVISION /* UINT32 CreatorRevision */ \ > + } > + > #endif > > -- > 2.17.0 >