From patchwork Wed Feb 7 08:22:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gary guo X-Patchwork-Id: 127116 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp240553ljc; Wed, 7 Feb 2018 00:23:23 -0800 (PST) X-Google-Smtp-Source: AH8x226lejdEQE1BKU49SAK1mu73D1xBBCuyDKN8IQEpmj8dy3F9Sw0VTkaxM/c+60f5HCm2kDKZ X-Received: by 10.101.93.79 with SMTP id e15mr4223412pgt.293.1517991803601; Wed, 07 Feb 2018 00:23:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517991803; cv=none; d=google.com; s=arc-20160816; b=VNSPK93S+EwrwVx5FFlcItVww5w1y9aiHiEesntbasdcu9frIMtQE64X2T4GxbQlHl 6Wuq4gUdIzOW53dVNEY9Y/rtHn1W6zRZ8ijebxY0RmIoXuDuC97g20TFvahf9EDXXzFs e7v9ncTTZJHR5iGm1PsHlCJ0FW73Gz21w/615u4v0j/BIME++LDI7yswAct0vUq2bQ4F /dNVdB2NEadfsoMKvamrHLaARljgmc6KdDvvLo0mMkEE44fxH9zF/QtnTKEXQpdPmOjU 7TLRdKsnvYCi/Ll4eP8kL04U0doO13G8tI8gVPwDnxrJH6SBCgiBTY15bVMXLooEdXPx oJmQ== 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=aKGYSv+z27U76Z5SQsAFrviTM3ziP+oSCh4+0DwUkKI=; b=uKYZVcTb+kPfg/7dr4WQuwmlEcnVqXLKxX64OKv9x08vXoGKzt3wqp+2PcJVd7tneA 6GqmuRk18bJR1wtnyuq1/1M31pz3QWRlFMa1IYcdegi6hidAkwitLG25Np7QpvNkatOk iNlaQM6EVjHyyEm1oQ6ln04MRSvI1LY4pQCjUCQCdNXBpCCjIeWtju96ossEupQiF+Iu Yqe0ngSeECW9Rl0cVZ56zKLpTGIq2c+U7BDfC7VBiEfGKH0XNsvCKbOP7sazFsBRj5TF hpdqlt2o6B7xEfQGzRUbJ44tVOxPbLqqmL97Fz6DMgG0thkhWREUV0u8tK+kTlFL6NJz GQVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=c9JeZt88; 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 a3si747011pfh.413.2018.02.07.00.23.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Feb 2018 00:23:23 -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=c9JeZt88; 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 BD1B221F833A8; Wed, 7 Feb 2018 00:17:38 -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 B144121F0DA6F for ; Wed, 7 Feb 2018 00:17:37 -0800 (PST) Received: by mail-pf0-x241.google.com with SMTP id 17so22623pfw.11 for ; Wed, 07 Feb 2018 00:23:21 -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=bKYWOo0tckjmF2xq+B0jjREcXmK9GaQmqQ3Ats0fdMU=; b=c9JeZt88TbcAi7F28GRqMrubynGHQ1X56AnJJiP2XbBMJdy2DvDQqDI6eUFzz3EEFD 2XC5ChmhkRRMAMMVEaCtzlPwRq8Wfz0DIxM6u6AJLKWpFIInEYiroORVXXb5Vza1iWzx 7s6aWpP36B3fc3ez7+lccy+bWx3FUVFnInYgk= 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=bKYWOo0tckjmF2xq+B0jjREcXmK9GaQmqQ3Ats0fdMU=; b=RbWtNZj3jFX14qU8C/gT+j/qiJy9DIAU6uSv2c4Q73JVgEMaWNrPpYYi09ygwLo9ph i52Q0kwy5wN+mmRFEjzRG8uZxXI6QIeDziqvMdNMdLz2pwzG8QGwosj8L5c2LI+fJDha Y7PpCowJB9dyMBoN7sKpbKGEIxIthVUHrh5bo44S0benKIOwclODatoZwqC2ohk10SMe sdofgPDmL1ft1ZHO766930YajQEfPX8jWSjx0wIdYhu7sOLdZ1KIeeGiVfLV5C4jw26N xjM2LtIB0o1wB2qb7gU2yLYaN5Qrq2dwYH2rnUvYIG05bJpF6Yzj3Z7t+lnTh1xrfsM+ GLNw== X-Gm-Message-State: APf1xPCHBqzItLW/soGZ5REn3PC6hxHw2HfSMxi5kjqj6ak8M4ApBY0D G6X4ySv7ojvnvclzu7Ursb0+tg== X-Received: by 10.98.60.5 with SMTP id j5mr5218173pfa.217.1517991799703; Wed, 07 Feb 2018 00:23:19 -0800 (PST) Received: from localhost.localdomain ([120.31.149.194]) by smtp.gmail.com with ESMTPSA id k127sm1984999pga.92.2018.02.07.00.23.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Feb 2018 00:23:19 -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: Wed, 7 Feb 2018 16:22:35 +0800 Message-Id: <1517991769-5485-2-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1517991769-5485-1-git-send-email-heyi.guo@linaro.org> References: <1517991769-5485-1-git-send-email-heyi.guo@linaro.org> Subject: [edk2] [PATCH edk2-platforms v4 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 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 (