From patchwork Fri Feb 2 12:05:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gary guo X-Patchwork-Id: 126640 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp576322ljc; Fri, 2 Feb 2018 04:05:58 -0800 (PST) X-Google-Smtp-Source: AH8x224qvjAvNL/XRlaANaUTmpnppGy+3xO20v3c5iimEkAto8HFRtf4hqwoyaYQitlRS5X5+0D6 X-Received: by 10.99.114.90 with SMTP id c26mr3471499pgn.427.1517573158099; Fri, 02 Feb 2018 04:05:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517573158; cv=none; d=google.com; s=arc-20160816; b=WzqTMPFJv/me4xL6k3S5OoR2j8Gi9Ll40/HZ9F0g0nP5DfQH2Tcv2WfakuUyJec3vb s3tOS4HBDK+NCzWsJ2bPZQd0VakHJ1Lt6YG+JkrUhc/uS2tgp5dgsexYoPaMIud2XWB+ WIfG/HHxoELELfv/d3rPL9/iUqKhXUN6FDs2xO4RQLtFllch2lw0Xuq62jhUYSiAtnc8 BZpacUPGC4C2QzcTbclRsijnBytn1N2+d0/cno+bLwprN3ZzHVg0hjN35lEzLrNE3Tf/ xhWf7pespyLtpyy87t+m1Ge4ibcHgMGYSr4WPiOpJSEVH2MctVe0UaRHur2YFxcLpVLf YKVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=48yhiGWb7R1ZE8zMOzclYfEIJ+7XexKS5T4Sc90pzG8=; b=VwlqOQmsCAptA/pjFX7/7K+ys3VbLdnq0gUnAix1/OS380XVrlnNrBceQJcImCMwlp kwxIsdy5gueUJOOw/XZ7mjjHhOm6EgTNCNiAcVTQXGjxGeXumq7Lz/tVPahG0vibDtQJ OlhXTJqGVtj7PG/jTks5KKZMzou2v+XX1AR2V5xrIs60DNJN2bRWzaiwRSD81XEFqR77 xoGQ/t9TforIoCOnBMo/mCTaxFR3t4LeJhv3EGSpk7ZfPvuKa/bB9BAJda0Mg0rhf23R af8NF1m4LQkBZxauuU1h3GhTcy00jbded4D+vEHONZQexEXDr5rw4b/dEdZNowR3Y/k3 y3IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=JVcvToOx; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id 6-v6si1667081plb.379.2018.02.02.04.05.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Feb 2018 04:05:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=JVcvToOx; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 329B222393651; Fri, 2 Feb 2018 04:00:18 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c00::243; helo=mail-pf0-x243.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::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 092552215BD98 for ; Fri, 2 Feb 2018 04:00:15 -0800 (PST) Received: by mail-pf0-x243.google.com with SMTP id u15so1100997pfa.0 for ; Fri, 02 Feb 2018 04:05:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FggV1FB8CZB+6aIAtN/e0hE+V+eyp/YLxYr3zGMvoug=; b=JVcvToOxbMuj+eJkTJ75J1FP1G362badH95BRHO6u9KLzRJbI8LnhK9m3jQbA/MyUO bfai8psB5R4q7QzzbywcmiZ4BvHJsniFXjcwcJYuSIodVzK6AJbDU+5/MZIqHOlfPPHm JRclf6vSy4fIYal6EKmSt0pA2jxZZXhaZSkKE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FggV1FB8CZB+6aIAtN/e0hE+V+eyp/YLxYr3zGMvoug=; b=j71Anoryh/B5w8fFoQav+MVfbhbzE3WgzEbvnb7XgEi0LZT03H7CvyV/spAPCfHvJp 7dAEsHl2pjQrmRHCyW7/3QTikIyqwY4hoaxXNLeOa988ZZliKgUSZgypXO2HRUG3l3fH UUs7uHwqmbenjmctC++th4eHGO3H5Js63gjDDEiYoiBeoKO1rQwWUgYWprCGnEj0L4pG pXODC+F42vfj1pMPVRJvJcT5lk2IM8je7p71Afdg1WCdKHpYTgLoZ4OcPaM1ZaYyBKg1 oZq1p2brhDjnsPZCdxCiMQrwnVvz77Jbb+zrHRiQzi3Ma8Ai/TxuS9/lwB34oIJt1S5x Ai3Q== X-Gm-Message-State: AKwxytdOVCi7fuS8SM//MFdGLezdIVCIkQiULRk1kLm07R/vpiaPtTf1 CV4kAUk/XWaMnGswQF0EzJVdcA== X-Received: by 10.101.97.165 with SMTP id i5mr20275544pgv.55.1517573154048; Fri, 02 Feb 2018 04:05:54 -0800 (PST) Received: from localhost.localdomain ([120.31.149.194]) by smtp.gmail.com with ESMTPSA id b8sm3673047pff.31.2018.02.02.04.05.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Feb 2018 04:05:53 -0800 (PST) From: Heyi Guo To: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org Date: Fri, 2 Feb 2018 20:05:29 +0800 Message-Id: <1517573143-11451-2-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1517573143-11451-1-git-send-email-heyi.guo@linaro.org> References: <1517573143-11451-1-git-send-email-heyi.guo@linaro.org> Subject: [edk2] [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: , Cc: huangming23@huawei.com, ard.biesheuvel@linaro.org, john.garry@huawei.com, zhangjinsong2@huawei.com, Heyi Guo , wanghuiqiang@huawei.com, guoheyi@huawei.com, waip23@126.com, mengfanrong@huawei.com, huangdaode@hisilicon.com MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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 --- Silicon/Hisilicon/Hi1616/D05AcpiTables/Hi1616Platform.h | 30 +++++++++++++++++++- Silicon/Hisilicon/Hi1616/D05AcpiTables/MadtHi1616.aslc | 23 +-------------- 2 files changed, 30 insertions(+), 23 deletions(-) -- 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm 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 (