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=leif.lindholm@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 32F6B223972BE for ; Tue, 6 Feb 2018 06:53:16 -0800 (PST) Received: by mail-wr0-x241.google.com with SMTP id z6so2265884wrb.1 for ; Tue, 06 Feb 2018 06:58:58 -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=RYYVEPUVHFFDAnvqqaVcleELUZvGudNKGavnayr1XDs=; b=Vqk6X9L9IWdQLRu7IipTakZ4M0O5ey4wz9qD/jlWhlo0RHffZ6yDa1YizaSCJnXxeT /prS9XfvLJfW5WTFKfaxhSFZXOKfFe4XH7FkIqjkKLXEtuiN2DL2WwUVPEV0PKylW+jD f5iAY2U+fYB8fU+1Oli+A2W+Y2egU6u5QeW7U= 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=RYYVEPUVHFFDAnvqqaVcleELUZvGudNKGavnayr1XDs=; b=BbCiZ86awaotfyHMDuWSUudZM4RcagRju/AO07F7uWrePiX8OQp30zuIHPrctoN03y SEEYpQZprCnvqVEa8XdkzCFKwFupYmQ2L5PKZyWAJigYrYUUiSuFC+29RLfzZ7s4o79y cfGZMUFfhIuiqBRgm6LyxuL1lIfJ8AE+5cOdL8XYpEyPZqg19tD9ivp8eqhB6tmbyL72 4viG1C8sXLfbsJGjq+giP8NszZlyAK4FYMwoV49bzDaDPhqFTZKHbrhMKDa9BIepefxL FxyB7lrA1ZZ1CYdaPLUV4gTvGIKWjTChKeMpSnvCU8Xrdzs5QG8s3KQDItk4OoH9DurI C3qA== X-Gm-Message-State: APf1xPDV4TUy6YNfrwdGkj7LJb3PaI7uH7YDL+GPzbuuHgyZ/EbuNbOd no7S8ReYOzZJNcn5ZtVDQkKXOQ== X-Google-Smtp-Source: AH8x2260oErBY+RNjKk9qgMtocKqlVGlu+3MJM7tWOxhAJiIXzH7qXZe3Q9W8s4NlrihiPtMY8jstA== X-Received: by 10.223.197.12 with SMTP id q12mr2669889wrf.147.1517929137551; Tue, 06 Feb 2018 06:58:57 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id h13sm18069128wrc.89.2018.02.06.06.58.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Feb 2018 06:58:56 -0800 (PST) Date: Tue, 6 Feb 2018 14:58:54 +0000 From: Leif Lindholm To: Heyi Guo 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, mengfanrong@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, waip23@126.com Message-ID: <20180206145854.d5a7bbqjq7muh5kq@bivouac.eciton.net> References: <1517573143-11451-1-git-send-email-heyi.guo@linaro.org> <1517573143-11451-2-git-send-email-heyi.guo@linaro.org> MIME-Version: 1.0 In-Reply-To: <1517573143-11451-2-git-send-email-heyi.guo@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms v3 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, 06 Feb 2018 14:53:17 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Feb 02, 2018 at 08:05:29PM +0800, Heyi Guo wrote: > Move definition of Madt struct to head file, so PPTT driver > can include it. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ming Huang > Signed-off-by: Heyi Guo > Reviewed-by: Ard Biesheuvel > Reviewed-by: Graeme Gregory > Reveiwed-by: Jeremy Linton Reviewed-by: Leif Lindholm > --- > Silicon/Hisilicon/Hi1616/D05AcpiTables/Hi1616Platform.h | 30 +++++++++++++++++++- > Silicon/Hisilicon/Hi1616/D05AcpiTables/MadtHi1616.aslc | 23 +-------------- > 2 files changed, 30 insertions(+), 23 deletions(-) > > diff --git a/Silicon/Hisilicon/Hi1616/D05AcpiTables/Hi1616Platform.h b/Silicon/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_ > > +#include > + > // > // ACPI table information used to initialize tables. > // > @@ -44,5 +46,31 @@ > } > > #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_BASE | ((ClusterId) << 8) | (CoreId)) > +#define PLATFORM_GET_MPID_TB_2(ClusterId, CoreId) (HI1616_MPID_TB_2_BASE | ((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[HI1616_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 () > > #endif > diff --git a/Silicon/Hisilicon/Hi1616/D05AcpiTables/MadtHi1616.aslc b/Silicon/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" > > -// 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 | ((ClusterId) << 8) | (CoreId)) > -#define PLATFORM_GET_MPID_TB_2(ClusterId, CoreId) (0x70000 | ((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[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 = { > { > ARM_ACPI_HEADER ( > -- > 1.9.1 >