From patchwork Wed Apr 6 15:15:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gary guo X-Patchwork-Id: 65189 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1114689lbc; Wed, 6 Apr 2016 08:17:44 -0700 (PDT) X-Received: by 10.55.77.202 with SMTP id a193mr47808884qkb.48.1459955864333; Wed, 06 Apr 2016 08:17:44 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g67si2405596qgg.60.2016.04.06.08.17.43; Wed, 06 Apr 2016 08:17:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id B131F615E9; Wed, 6 Apr 2016 15:17:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 754E361071; Wed, 6 Apr 2016 15:17:36 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 94DD761997; Wed, 6 Apr 2016 15:17:28 +0000 (UTC) Received: from mail-pf0-f170.google.com (mail-pf0-f170.google.com [209.85.192.170]) by lists.linaro.org (Postfix) with ESMTPS id B663261986 for ; Wed, 6 Apr 2016 15:16:13 +0000 (UTC) Received: by mail-pf0-f170.google.com with SMTP id n1so35645745pfn.2 for ; Wed, 06 Apr 2016 08:16:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TXUj4wuvrzyo0Gl6ZK6zu0dkndP6z/+0apXZtQQ5sjo=; b=mYhZJNSTarkiHQyx3j6OfIJ6QfUeV/AG+C1Txyba6GTc8E3tap5uQzjZPCqpQlSilD DeL6b5k8qU7iUou7OkTgk3Dz6eDJGugWC2eEuBTQx4iw3+9lLle8JvL3igONkmJ/XcTD j3B3UYkxruHJtLlRAYJUNbHh9tqdcNvZn4Ac8XvL/0qiOUTzSCr6vpWY7eUrSKL75Ba/ +HHXPHOsfEFlNI1Gcd8r9FiQf84OTDfyEp8nUW2Hb8orUk4fAqFTxRrePrPL1Dot5Yc8 U5AK0cD1fwDh+7w812fzYU62+Hs5JO4GiPa3h9QF4TNhpPK2rC/OecoBQ5QDNvqeok6Y l/og== X-Gm-Message-State: AD7BkJJXvf2SsM0niUhwCSN3cjP27H+sZCul3H31fn11y/mDZga4fgRjbQElpKuqeqqMJ9KCKjk= X-Received: by 10.98.71.86 with SMTP id u83mr39232651pfa.156.1459955773091; Wed, 06 Apr 2016 08:16:13 -0700 (PDT) Received: from localhost.localdomain ([104.238.32.32]) by smtp.gmail.com with ESMTPSA id n66sm5780440pfj.39.2016.04.06.08.16.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Apr 2016 08:16:12 -0700 (PDT) From: Heyi Guo To: linaro-uefi@lists.linaro.org Date: Wed, 6 Apr 2016 23:15:43 +0800 Message-Id: <1459955743-9521-1-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 2.7.0 Subject: [Linaro-uefi] [edk2] [PATCH] EmbeddedPkg: Add GICD table init macro for ACPI 6.0 X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" Add macro to help initialize GICD structure in MADT table according to ACPI 6.0. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo Cc: Leif Lindholm Cc: Ard Biesheuvel --- EmbeddedPkg/Include/Library/AcpiLib.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/EmbeddedPkg/Include/Library/AcpiLib.h b/EmbeddedPkg/Include/Library/AcpiLib.h index 74a929c..e5bcf56 100644 --- a/EmbeddedPkg/Include/Library/AcpiLib.h +++ b/EmbeddedPkg/Include/Library/AcpiLib.h @@ -38,6 +38,13 @@ GicDistHwId, GicDistBase, GicDistVector, EFI_ACPI_RESERVED_DWORD \ } +#define EFI_ACPI_6_0_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase, GicDistVector, GicVersion) \ + { \ + EFI_ACPI_6_0_GICD, sizeof (EFI_ACPI_6_0_GIC_DISTRIBUTOR_STRUCTURE), EFI_ACPI_RESERVED_WORD, \ + GicDistHwId, GicDistBase, GicDistVector, GicVersion, \ + {EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE} \ + } + // Note the parking protocol is configured by UEFI if required #define EFI_ACPI_5_0_GIC_STRUCTURE_INIT(GicId, AcpiCpuId, Flags, PmuIrq, GicBase) \ { \