From patchwork Fri Jan 26 08:00:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gary guo X-Patchwork-Id: 125911 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp154527ljd; Fri, 26 Jan 2018 00:02:04 -0800 (PST) X-Google-Smtp-Source: AH8x226V/c8+9ChP0es+Kimb/U36rTI6g187gcqnCwnDDY3grRms1l5dM/nNBT8A/qXiWTQfWncv X-Received: by 10.99.51.203 with SMTP id z194mr14003401pgz.217.1516953723864; Fri, 26 Jan 2018 00:02:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516953723; cv=none; d=google.com; s=arc-20160816; b=IJ2Xp6WNpDDwBZmMTQYftWmJpd1P2R5EcpCoiAiAW26e5ICU3d0xlE5FIci50WE4Sa chM/nL/OnxMdIM+343ZPXnMiOl5Qwq7A/qms6+mLwaG7HEdRdUX4eUxx2lkfvdW8RZF2 24F+ZaS78U6zTkytsfjaLpCnDiolIssM/WkTBJtfbiTmqc8Pz2+hzlEwCYr79ny0+Kro 0xz1pBsUpIA9xp1QLLclxoFO9qeDicJFyOX6ZDDb3sV0YUbLUuOHREhXbH491ERzarZ/ GQ2j3uVxgiZkKNyLKMTvu/MguaClHhk+MbGUVi8Y+jj1swmbvPVfDK88y9QK7DIKT1vA nqxA== 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=+3k15NGwglWCDGzyZ+Qvp7bTH3FBN5fal3oXKmWaLTo=; b=F0iVUPXG6vPsQGxt6rAh3XMG7CVMIc5YSGH0zBxzksuELhmxf8Nt8CJYQkM6rKMzR9 PY8P3Au0z/69OQqsQa5lgiX/tyzdWevWttRh0XoyE6oYrLiozTiigBVr1AGkslrSXUec t+kPQ/6m4ls7Iuzat+zSwOkot2Fxlpj+6xRsbKianChrThcYGcFMZ+EnMEe3U8RCn4ED 2JV2iPzidjqeT42OKKevlQJMAL3mm8BuDl114eQd8H/8ROPnuT1/i3j7gQliMvkIU2lA N0n8+WuSMtGK9bAPLHU9BqDEwc5zptJ62TuOSSO/2HA6KEVsZPKcayHykekq/OZ8+seQ HE/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VN/ZMAxV; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id bc11-v6si3294760plb.688.2018.01.26.00.02.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jan 2018 00:02:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VN/ZMAxV; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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 14E562222C24C; Thu, 25 Jan 2018 23:56:33 -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::241; helo=mail-pf0-x241.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::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 C09942222C222 for ; Thu, 25 Jan 2018 23:56:31 -0800 (PST) Received: by mail-pf0-x241.google.com with SMTP id b25so7778280pfd.9 for ; Fri, 26 Jan 2018 00:02:02 -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=uN1Lz0rwAtAw8GTSeU+bcsbGE9HOjIcl7CnCtQRCwy4=; b=VN/ZMAxVJ+A4C55+nEin+TY0w8QpK97lmeNTjsK7gcqOCLb3cCq34xOYGIjRgWi7H7 fW3Edd7OX5XvCAAXBNNGMsqDyb8xEAbHDPYCIg/HV1m187FGlUbUy0bTwHkm+evzB6Df mrS9Hawu/Ah4g1saIaGa0ZqGpIAhOlkbdMthQ= 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=uN1Lz0rwAtAw8GTSeU+bcsbGE9HOjIcl7CnCtQRCwy4=; b=DpN9SJGTxssAzaeMzb0LIvji/+PxcXKLVMAWzlSBvwBSVDCGUxZT0Y6UYgEXxzLBzn tmBCry2zgP/NhV0f0oHn+fp2LHZBuNDBi1oO6wXKIMtgrmooF9mLMmHIHjlCYut5bi80 Iz7V9D+IzYk5YUGj4zZfOrJdhNa7FA7rDtdjjmGKR4A/dAhr2oYv2x37oXoCPDUbJPal r0EDGdV7COy64ubprtdHmhN7SzC8NVbMrEWwBC7H9gOysIN1sCwyeg8pnppSRqw3AmQX Q9G9szsrKKtVCqPfj9PCvEbzGw1srcqZtSYL9Xxgzadn1zuPT/4xLkZgr7Xjf7otYd1v xZHQ== X-Gm-Message-State: AKwxytfPsTiZ8inuVljlxejYk0YVQWVd+n4SbAIrTdfWsVmR0A7JfKsx tfUeCjC1+jZ/Kr3hFUIYgZfQwg== X-Received: by 10.101.98.147 with SMTP id f19mr11181119pgv.100.1516953721716; Fri, 26 Jan 2018 00:02:01 -0800 (PST) Received: from localhost.localdomain ([120.31.149.194]) by smtp.gmail.com with ESMTPSA id k71sm18406091pfg.52.2018.01.26.00.01.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jan 2018 00:02:00 -0800 (PST) From: Ming Huang X-Google-Original-From: Ming Huang To: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org Date: Fri, 26 Jan 2018 16:00:36 +0800 Message-Id: <1516953650-57980-2-git-send-email-huangming23@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1516953650-57980-1-git-send-email-huangming23@huawei.com> References: <1516953650-57980-1-git-send-email-huangming23@huawei.com> Subject: [edk2] [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: , Cc: huangming23@huawei.com, ard.biesheuvel@linaro.org, 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 --- 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: Graeme Gregory 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 (