From patchwork Tue Mar 5 13:32:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 159653 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4974774jad; Tue, 5 Mar 2019 05:33:01 -0800 (PST) X-Google-Smtp-Source: APXvYqyqDC8R4Kz350rtTfNFa/FHk9rQ6yMi3feSdg5NauYQ9UcE4YMjAlCg9hSzhuyfVT1+p/FA X-Received: by 2002:a65:6546:: with SMTP id a6mr1448606pgw.296.1551792781546; Tue, 05 Mar 2019 05:33:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551792781; cv=none; d=google.com; s=arc-20160816; b=n4c8RFCcdf8I0L1/bblaCBErj9crzPP5EP7DZ6T7v3yuclKJkFLyRCDvcq9UdF8Okr wjMp0I9lXXk0sieIjDXdnRLIdKvirEAM22sI6zn+VwNP0E0PQiUBrwXl8zeiVxffRyGY kwVbCIjMc/4lWavbDadTlu4ROx1C6BnvEH+5dpxwd0U78bYpVmlBeDLHE0qJBg2D5KLy CO2jqrvEXAKALPDJalsTV/I7LO7aHtSZRklo0ICOe5ju3ni1jRirjZFCCUHzp1hlq8yi S4bQhcJWBFNw0RxQr33NCW/Dl8bhbT7IsdazQEVi811tRlgmww9Btr0+Vopuh+vfl5VP B9hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=dYm3smWt5BV3fUPfkJ4OiEmd7Wv3r78bSYi5Jp6C7iA=; b=mopYx4rs09zdLrOkwaAVMIF2ZlWLQUxXquWq/PpX/hyVByMKjH0pxl2zd/wCktBEUa IaSw33lz6zRc+wukzyT9/zcyCG+lqFZSxmkHeHF9O7Vs+2ac3Xi1SsDcSp+I1fKLHW1C I76tXUO1+6VYway9Nuf39o39IaerKFvCwfk/DluV4MkLVdxSru6K6fSsR0bRcI04YJhu aRGcZZwBWxRzGm1xNPI4yaG77RJkga4UxSx/qgTqjQ4C8l+0EntOUZj8C8dKOyyM46RI zfUJGJRTKTrqwKb87fVvFYN7PWSBql4zfnHCQJEmdO8Qe02m2u09F+t8v7Fw0tW2nCWx yPRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=i0yW3E5f; 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 v1si7835284pgn.583.2019.03.05.05.33.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:01 -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=i0yW3E5f; 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 16FDB211D504E; Tue, 5 Mar 2019 05:33:01 -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=2a00:1450:4864:20::343; helo=mail-wm1-x343.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (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 B89AE211D3917 for ; Tue, 5 Mar 2019 05:32:59 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id x10so2550167wmg.2 for ; Tue, 05 Mar 2019 05:32:59 -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 :mime-version:content-transfer-encoding; bh=vRRUxgXjudhw3F99t3LrF0zoEQOsTJzZNtrjn2iyHpc=; b=i0yW3E5fAz+Ua6qc93ahH0cCT1aT//dQcMeFOYrdmmI9VboyeagwRZM3NLPMcAENva 5TmwbleT5bMQ1cU3hbOXriy8e4lIWPsNDgY68Hq74bbkHm92DUeU/jJHdcjG5hc8xbfl InyYdzR7N33XVLQC5ZVd1zbA/QnN9DobySNf30CWNxxvHUlrPA1SsED0p0snKLxyR8ZV gelUHyrnh+WxM/gLf+GI14Wo9GqPMMEkbpymaZCH7+9CDmm9WSfRgVg9iL7o6Y8T/FIE i4Kej+EZnbu/GB7HAH0yUAKukxua1aCbx4jegwTOsyxaIee5EqbPQVSXeoaMYWIU9RJm tWNA== 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:mime-version:content-transfer-encoding; bh=vRRUxgXjudhw3F99t3LrF0zoEQOsTJzZNtrjn2iyHpc=; b=JhrQTXRerCLrz7bSIDpSKzFPIlRGluzQQvpzd5c6Afl6bagIukZ+HmJI2GzPjK3VAc Muw3z67ut6FxmeEFFPpSSMAod6f1n7YQ9eej4Oj4kaRch8i3zwihqqOTe1t2GdiFaD4F BUY12clU1C6w5N5B6qqiehHEeaad3pOh7piiIFLVGUz0fuc1YL6MDTLkKFlCsUwrwLp/ bwyZbJEjKXtOPHmTeOOle4966qMmcPsH4mmPBcKXcTvm6txyiMLKLCcyLF/+4TnX49Ot 08/YwfqachdDASmsoO372TKWt/QTGZZ9vnn2Jpmwzw+StsF0RI9iSDYCMP+cAJjJKI2P PhfA== X-Gm-Message-State: APjAAAU+5p+IyhJHqgFKQC7rt8lgeVOw/mZONCRqLS8HoFOYziCiolW8 iTojyCeh3H6nTZl0o8DmyWuwDWj3f6s= X-Received: by 2002:a1c:480a:: with SMTP id v10mr2599867wma.57.1551792776738; Tue, 05 Mar 2019 05:32:56 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-18-114.w90-86.abo.wanadoo.fr. [90.86.221.114]) by smtp.gmail.com with ESMTPSA id i4sm8370097wrw.19.2019.03.05.05.32.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:32:55 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 5 Mar 2019 14:32:39 +0100 Message-Id: <20190305133248.4828-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190305133248.4828-1-ard.biesheuvel@linaro.org> References: <20190305133248.4828-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH 01/10] StandaloneMmPkg: drop redundant definition of gEfiMmConfigurationProtocolGuid X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" gEfiMmConfigurationProtocolGuid is already defined in MdePkg, so drop the duplicate definition from StandaloneMmPkg. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- StandaloneMmPkg/StandaloneMmPkg.dec | 3 --- 1 file changed, 3 deletions(-) -- 2.20.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: jiewen.yao@intel.com diff --git a/StandaloneMmPkg/StandaloneMmPkg.dec b/StandaloneMmPkg/StandaloneMmPkg.dec index 34108376233d..0b5fbf9e1767 100644 --- a/StandaloneMmPkg/StandaloneMmPkg.dec +++ b/StandaloneMmPkg/StandaloneMmPkg.dec @@ -42,6 +42,3 @@ [Guids] [PcdsFeatureFlag] gStandaloneMmPkgTokenSpaceGuid.PcdStandaloneMmEnable|FALSE|BOOLEAN|0x00000001 -[Protocols] - gEfiMmConfigurationProtocolGuid = { 0xc109319, 0xc149, 0x450e, { 0xa3, 0xe3, 0xb9, 0xba, 0xdd, 0x9d, 0xc3, 0xa4 }} - From patchwork Tue Mar 5 13:32:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 159654 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4974843jad; Tue, 5 Mar 2019 05:33:04 -0800 (PST) X-Google-Smtp-Source: APXvYqyxI0H9QYtVK5Flyf6DzessQLQRmpkOxz/OSCdqZ1Vu5dWpASIkRrr7YL1hYXtJiR0PAQAl X-Received: by 2002:a63:4607:: with SMTP id t7mr1415580pga.306.1551792784514; Tue, 05 Mar 2019 05:33:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551792784; cv=none; d=google.com; s=arc-20160816; b=wOjbVJeigtsrC7oydFTXAjtsEJJ8CDGbAsLzHv4JFEZuAp8juEYsST+WVIuNFCtq5t tNWBdNBcXUiebauYW6racskXRN3wwKJU2ZL8XusnHKtwF8BmNO2h/zVSPNaUBE7FxFSn TkSjK5bXXlNS3wOu/qJ+Liq1FOOaO2bXWDZr14O9Ez66zzgXTTz0vmrWf6AzNzqxuuMu 2tOTXcOfh/mdP8lu93w7dUPhuDyOHf1soQ+yOWoShNQ0Z9J/Kd/cBm0qJADBdrcpLbYg x1sHmW/anLnXE/oRp506kcdIKDIJEP33KRUqdXxcWq9F4IVw2apbRK4XpNouEFRHFWHv RvgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=7i5gD5Lofh1yfKqiJiBbaMaIwdReuRN+twn639r6a6c=; b=JuqWzbGBrH1Z6uuMMcplXOPbCS1OmgB6XI0V4nQJyvSN2PzcCrT9sNwHKF96OHku+w LSI/5uyAxt/q9OfumImVmJqZ+qgE/MI3wI7FIVEtSyjjzm9YkILArtreutXf6GPQTVLf v1M9H8M9xitFqrjcEi6emoiKikWpC76zrNCvJ2to2JL3KOCojHdYTlslgMiLLEjdIJRm 29oCWD/KNnuY1mO5ivtlogxspd+lfuyr1MF5A9wKrvKrSdhzJ/mWt9K4/zSUMoIznlX+ chAQSpTni86crJIP8ee8b7EdlFYcXxEoydOAXkVMGowQ4qDcg7Q0LdSZpI7Ku1SJFqA3 /axQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=GSgcDOrd; 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 d9si8906189pln.403.2019.03.05.05.33.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:04 -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=GSgcDOrd; 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 4BF6F211D5054; Tue, 5 Mar 2019 05:33:02 -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=2a00:1450:4864:20::442; helo=mail-wr1-x442.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (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 5A87C2194EB70 for ; Tue, 5 Mar 2019 05:33:00 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id l5so9465394wrw.6 for ; Tue, 05 Mar 2019 05:33:00 -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 :mime-version:content-transfer-encoding; bh=fBTPKjFBnThj3wqCC4pkNHEAK/9TzFnuRMlvF9maxoc=; b=GSgcDOrdIboM5lHuDXDSutF6UcDhqORjbXlnX1ApvCxt0XEjwqbvj9ymF5FsbBPUaL SDBj9poT2dFmLtsgUc5q6mnik0EHzJq0kI1MchuvlrBCDXL6VOmlIM2s0i4FzfvcJRuk JRYpNo5lTRK9GcgQQa1wE8T8gZmp/G5xHv+fTUdYsl5RKfLcqk1NPC2g0zyolqgmcqNC RWDsvnYNxd32VGk38AtzYqhfZulNyPDf/L2HgjNgJdWz2CZD7TErlt6H6H/3i/GAaWrL 71qodh21jSkOyDy3FrWuI937OfVVAQQvvMSDOTiZR9XpHE2IdnTFKUgxeDTpH+yW+CIu udng== 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:mime-version:content-transfer-encoding; bh=fBTPKjFBnThj3wqCC4pkNHEAK/9TzFnuRMlvF9maxoc=; b=nTDv3/3ZKY5kqITtRGbQXykKuXO6+mqQnhEWpzvHIGHSjU3yqRF6g2F3h9U4oAdVmi Oxg3tQGODMncbrtRYJtHr++kjK7eapVo4X0JP9D1YhKDj/srFXYFZro9y8XMdKpTImrR 5e1DiZm94q3I5Y0FvglXJqWy0fThoZxASsA7hcpEpUEs6CqLpkMUxZI0NMyIxQNFqpCT HYoOisFfft+BjNcczRqfHRs1l2PQY4EoX/e++1/4nKqR9CAOlWdMPZ6mBFStT3sGtc02 rITcTph48Pn3UjAKD5fLVG9B0gEY200njUOMWuO/SGmBmkk3HrXJA4n3iewrDeCbx1LM Tv8Q== X-Gm-Message-State: APjAAAUdsl5CbvlN1/mN/YHSfyUEyBbxZSJFuvZWJNrzA9yPYGlg7Zg9 mV341PrS6C8fMU4bOMLBZ9+V1jT7Q3U= X-Received: by 2002:adf:ba84:: with SMTP id p4mr16569026wrg.156.1551792778336; Tue, 05 Mar 2019 05:32:58 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-18-114.w90-86.abo.wanadoo.fr. [90.86.221.114]) by smtp.gmail.com with ESMTPSA id i4sm8370097wrw.19.2019.03.05.05.32.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:32:57 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 5 Mar 2019 14:32:40 +0100 Message-Id: <20190305133248.4828-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190305133248.4828-1-ard.biesheuvel@linaro.org> References: <20190305133248.4828-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH 02/10] StandaloneMmPkg: drop unused PCD PcdStandaloneMmEnable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" The PCD PcdStandaloneMmEnable is unused, and shouldn't exist in the first place since the value is implied by the context (it is never valid to set it to FALSE for standalone MM or TRUE for traditional MM). So drop it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- StandaloneMmPkg/StandaloneMmPkg.dec | 3 --- StandaloneMmPkg/StandaloneMmPkg.dsc | 3 --- StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/StandaloneMmPeCoffExtraActionLib.inf | 3 --- 3 files changed, 9 deletions(-) -- 2.20.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: jiewen.yao@intel.com Reviewed-by: achin.gupta@arm.com diff --git a/StandaloneMmPkg/StandaloneMmPkg.dec b/StandaloneMmPkg/StandaloneMmPkg.dec index 0b5fbf9e1767..2d178c5e20a6 100644 --- a/StandaloneMmPkg/StandaloneMmPkg.dec +++ b/StandaloneMmPkg/StandaloneMmPkg.dec @@ -39,6 +39,3 @@ [Guids] gEfiStandaloneMmNonSecureBufferGuid = { 0xf00497e3, 0xbfa2, 0x41a1, { 0x9d, 0x29, 0x54, 0xc2, 0xe9, 0x37, 0x21, 0xc5 }} gEfiArmTfCpuDriverEpDescriptorGuid = { 0x6ecbd5a1, 0xc0f8, 0x4702, { 0x83, 0x01, 0x4f, 0xc2, 0xc5, 0x47, 0x0a, 0x51 }} -[PcdsFeatureFlag] - gStandaloneMmPkgTokenSpaceGuid.PcdStandaloneMmEnable|FALSE|BOOLEAN|0x00000001 - diff --git a/StandaloneMmPkg/StandaloneMmPkg.dsc b/StandaloneMmPkg/StandaloneMmPkg.dsc index e8d71ad56f52..f279d9e7e5c7 100644 --- a/StandaloneMmPkg/StandaloneMmPkg.dsc +++ b/StandaloneMmPkg/StandaloneMmPkg.dsc @@ -78,9 +78,6 @@ [LibraryClasses.AARCH64] # Pcd Section - list of all EDK II PCD Entries defined by this Platform # ################################################################################ -[PcdsFeatureFlag] - gStandaloneMmPkgTokenSpaceGuid.PcdStandaloneMmEnable|TRUE - [PcdsFixedAtBuild] gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x800000CF gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xff diff --git a/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/StandaloneMmPeCoffExtraActionLib.inf b/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/StandaloneMmPeCoffExtraActionLib.inf index eef3d7c6e253..181c15b9345a 100644 --- a/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/StandaloneMmPeCoffExtraActionLib.inf +++ b/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/StandaloneMmPeCoffExtraActionLib.inf @@ -37,9 +37,6 @@ [Packages] MdePkg/MdePkg.dec StandaloneMmPkg/StandaloneMmPkg.dec -[FeaturePcd] - gStandaloneMmPkgTokenSpaceGuid.PcdStandaloneMmEnable - [LibraryClasses] StandaloneMmMmuLib PcdLib From patchwork Tue Mar 5 13:32:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 159655 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4974885jad; Tue, 5 Mar 2019 05:33:07 -0800 (PST) X-Google-Smtp-Source: APXvYqx6hG8MlAc/Kosx8mmgK1RVclBJ0thlUl629/8dOorrgUWFbdj24XZIwpGnV/ZcbnJp6Yzq X-Received: by 2002:a17:902:a508:: with SMTP id s8mr1151144plq.275.1551792787617; Tue, 05 Mar 2019 05:33:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551792787; cv=none; d=google.com; s=arc-20160816; b=0sGJY009K5lb9HWvZ0+QgByrsM/PXVmuAGZWtfMrs5Z2c2kdnq87ZgTuXwmn+/8u5E gWZjQIKCMVnTQxljX1PWUTTOtiMe3FwGRcX3hLWnrFiJr9kHNHoqX7vHi0LVpry9izH8 adMzsdy7OfVY4fU/bpx8VhObNe3F4OnwEuuiHqfEebBJQ2rCx7SZLWnus+YNJZpokU2o i9ZJcmDNuMpG5BalJeOWE3HEfq00a7mdcAmGkzOF8yFZMVvnEc8aKMDq7mdoCRfK37cJ O7l8+DVSIslpo/FNsZ9i6zd7qJedGObBEYsqBenvIkSLKPYYkSl64bI2R6SsoKFC8dqA G4kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=X/bk0ItLwj01mf5ReUXZr89APuoGHdqNDMPvwXnWQnM=; b=DlRBlj6HbdMSenCTPkRv2Lwqggw7tBAiemBrwl9VWO+9C2CaXbRjhBnZRjPHIu3FoY ori5u2cbFRE7FBFW3S8JTD+6T1nCue9vIErSoc5FrDqV2YDNqMAhlFui6Xd8d/JxshNC 0ACGUSBPUyMCGwymzpXeKsoW6KJdD+gqR35cnSK/hY/0/qPeclqrc26G9esDmesU1is1 43+twNwG7v/oYoLv0oqdimWwAoqhb1+5PA5WztVKRN0/4UVPR+LhB2N00hLW+U9cc942 WW7TDc0fMCOL3aDLoNiQL/XEH+8dSsQ73sqLNvgRFEzzfNr508qZ2QWkUJ+KIK1zF6O0 kl2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=BOm8fWXb; 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 f18si7600341pgv.253.2019.03.05.05.33.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:07 -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=BOm8fWXb; 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 7A29C211D504C; Tue, 5 Mar 2019 05:33:03 -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=2a00:1450:4864:20::443; helo=mail-wr1-x443.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (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 B6158211D5051 for ; Tue, 5 Mar 2019 05:33:01 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id i16so9450775wrs.13 for ; Tue, 05 Mar 2019 05:33:01 -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 :mime-version:content-transfer-encoding; bh=MZOXjw49CTWiyWdiQjxgtnQVT6DbGpy2P1Vssi8mXgg=; b=BOm8fWXbR5IUDDcSvb5m+NAYjvpfg7lieeQ05qldLqZEn+8jlIE72YMGY8gPJPogHV 55WxwcEpyL35HPcat9jZ3tUfkWt30dS9vULMTviSZL2cRAfouzjMU9cjUsfkkTcTUO+4 fpQlPz4tKDej2mQ2yl+OJIg6X5WMihH30kMJcuvkhs0UrQm1xBAYDosgoA5kgngzobAG a5Dd0HU/bp2syYB98Ge7l9YbvPphAAIF24xVioce/k0crRHVLNTZdHjYPvzIWZH2vWjn SwqWovDEuwrTVBfPOdCJfW283IeFnmm8ecS8b6DQ3pdp4KYqiv2z4uzMju1iCeEBWm1+ XUgQ== 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:mime-version:content-transfer-encoding; bh=MZOXjw49CTWiyWdiQjxgtnQVT6DbGpy2P1Vssi8mXgg=; b=E/AsQ1OWLz7fgoGki0NMGqYqeHo0vTNqVVmmyLEPUnVpczsHJTktkWiWyBN5kLf783 w901V4pV3MA4Wi+HKy/Ve2XrO3Wf6PnLrlRxSaXwo0CH3qQlWtti0vgyiAb0dvG6WQ/n luGoXTOdRcEhnabmh88/RMn4v1WNe+uUIOYe7Khz+0EZ5mM7YOodzKTAHJn5vBEPNcGI r49FDS1kT7l1OO98Z9pRmD6Jv8lpS/pNBxPRMGIw/Ssl5T4WtolL9UcaOiq6qSQ1wW74 9gBfQfnlfjqw9DkN6bn3D3k5/k3drd8GaG/jHMcQpx0HBDM6p7BTDthPhi4HsxAtEyY1 1k1w== X-Gm-Message-State: APjAAAVcdDDQKzEftQXbMHqWYX/vCE6M7uNYo43aEgolcdcn4qXsUPge bnjelo9OsKxnL59QYE5FN1oRi7QsOyU= X-Received: by 2002:adf:cd02:: with SMTP id w2mr16061749wrm.30.1551792779793; Tue, 05 Mar 2019 05:32:59 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-18-114.w90-86.abo.wanadoo.fr. [90.86.221.114]) by smtp.gmail.com with ESMTPSA id i4sm8370097wrw.19.2019.03.05.05.32.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:32:59 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 5 Mar 2019 14:32:41 +0100 Message-Id: <20190305133248.4828-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190305133248.4828-1-ard.biesheuvel@linaro.org> References: <20190305133248.4828-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH 03/10] StandaloneMmPkg: switch to NULL DebugLib resolution X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Building StandaloneMmPkg from its .DSC is mainly intended for build coverage, and so platform specific configuration such as UART addresses don't belong here. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- StandaloneMmPkg/StandaloneMmPkg.dsc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) -- 2.20.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: jiewen.yao@intel.com Reviewed-by: achin.gupta@arm.com diff --git a/StandaloneMmPkg/StandaloneMmPkg.dsc b/StandaloneMmPkg/StandaloneMmPkg.dsc index f279d9e7e5c7..8def9688fe7d 100644 --- a/StandaloneMmPkg/StandaloneMmPkg.dsc +++ b/StandaloneMmPkg/StandaloneMmPkg.dsc @@ -43,7 +43,7 @@ [LibraryClasses] # BaseLib|MdePkg/Library/BaseLib/BaseLib.inf BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf FvLib|StandaloneMmPkg/Library/FvLib/FvLib.inf HobLib|StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf @@ -66,10 +66,6 @@ [LibraryClasses.AARCH64] ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf CacheMaintenanceLib|ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMaintenanceLib.inf PeCoffExtraActionLib|StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/StandaloneMmPeCoffExtraActionLib.inf - PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf - PL011UartClockLib|ArmPlatformPkg/Library/PL011UartClockLib/PL011UartClockLib.inf - # ARM PL011 UART Driver - SerialPortLib|ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf StandaloneMmCoreEntryPoint|StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf @@ -83,11 +79,6 @@ [PcdsFixedAtBuild] gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xff gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x0f -[PcdsFixedAtBuild.AARCH64] - ## PL011 - Serial Terminal - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x1c0b0000 - gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200 - ################################################################################################### # # Components Section - list of the modules and components that will be processed by compilation From patchwork Tue Mar 5 13:32:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 159656 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4974949jad; Tue, 5 Mar 2019 05:33:11 -0800 (PST) X-Google-Smtp-Source: APXvYqzR6PoXGyeloqXaTp2AmDDKAfh1O38YZDh/8yKi0I8Mpr5VFve/MTimYV+SthMbPuL6SxYz X-Received: by 2002:a17:902:4203:: with SMTP id g3mr1193038pld.99.1551792791728; Tue, 05 Mar 2019 05:33:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551792791; cv=none; d=google.com; s=arc-20160816; b=xOc58hvvUNL56dHz0sPfthskRMwjhQlp894CAyDqp49pgTKuWuDxjXzR+j+iWP1PjT uHb3naTRMyy3Fv7stjhi01BP/FRmZvuptddlTyUEOboK+2SeqLFbQUVulpCei2p6UQx8 lf61FH1x6h3vE4kzX94c7zt1UGZxCL0YhVcDNCb4UBcsESWdTFIpP6oPlznwSKByNVq7 HKGI2Y+j2TXirWFe9JQe5vICBap65qvqwbl/HSgw42sBOEGBVoCslivjhKNkmaEjeYvY hNtM56qeArn0ECJeTQ06s/OY4ZnIRG7QEkemZOI6OZ7pQCtacLJZKSO5m0WmY7YrRiyl JkBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=gFV7NtHUQv3WMIqIC3aTqba8q4Frnc6BCuYUCOolSv0=; b=s9BzXkjo+yu8fFat17mi1YVS8nCzkCkEOwpcfmXC4LUKVvd+r8AzrbwSnj0hylp3oM SZdb9UdXuFMk5N+DyL2UryHfpawwlLCEAEpNbc7kSIHU23GtmLyIcoy5dDCnN57pOP1W VsrW2lm3dxelSFJm7IzQA8eb7c790PLVKgmOwk7dz/w3Sm6GKLWA1Adr8RYF93KRwAuO qLMIEz+yZgKvqUHWTSTIb0pA5gEm+xMPP3+QKRt5wMrv/Cbp1onuEa8yoJYXGgaVOH3P GImomP9sVmxwJHl2nnRcEOG7Zs6vcqkxlmyYPOhu2W0g0H7Q7/GaPeA0pJitxkM193VT icNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IEhZdSR8; 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 j70si7691841pgd.65.2019.03.05.05.33.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:11 -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=IEhZdSR8; 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 A3FF0211D5059; Tue, 5 Mar 2019 05:33:03 -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=2a00:1450:4864:20::42e; helo=mail-wr1-x42e.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (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 14831211D5058 for ; Tue, 5 Mar 2019 05:33:03 -0800 (PST) Received: by mail-wr1-x42e.google.com with SMTP id n2so9471066wrw.8 for ; Tue, 05 Mar 2019 05:33: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 :mime-version:content-transfer-encoding; bh=P3sj9G00/9dWu6acUoJIoA2/xlbe7ypCq7V6GfrB9FU=; b=IEhZdSR8nT4rUT3O8POQbW+h0jsah4V0WPfk9KCfQKC4JKFwuGggFSz48hjaWzu/3p ltqIq6I+IASwFsQo5BFRbJk6XgH0Zs9v+kS1a4a/y/7hgQk4I+XPyxri8y1jhF+WbezI Obr+7UHkJPahTvHUnLcr8LuOmemrUcHRhmzgetw5DcgbAic7PAOP8UYIGGG5+2DlBqyn sP6G+dA9RUvrtOej1UYhn4zWutHNuh2vMs5suYp0nymrnJeJrEsO7mTc1yhnjdgZMcoh j+VqfGawP9KfhO2lgmdygHbvNobYlG4HfIgv9gVKvkxjbHQ9+r2bbQgo9GqLaFgyntRM t/JQ== 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:mime-version:content-transfer-encoding; bh=P3sj9G00/9dWu6acUoJIoA2/xlbe7ypCq7V6GfrB9FU=; b=QD1hxMLnnlOr/WqgY9ybvnEYL8LOjy1ahmKpEnHuVpAoD9F6/NTNG0/V1TDBTt34SE XEJ98kpsrcItObPWMHk8FUe7lXQu/t6G0mWXg4zcxHbONvS7IEikuwWMqvuyp99cjGRE 4th9Tgq1ohjPczrVfXMRF3v/kzzAYtcOreiy5ixsduZDIaOtU7xyeqm/K4O2zXGbBtRc 6Vll/CR8H3ttZo791dLnaAu1qyFklULjhQzkySB9FPmrOPsgWY/QSqQOeD1GwduT0U9z qtrhqffCLLOg6+VAEa87JKQQj3krpGCYy2bzJ06fapUSVux2ETIy3cJCzf0vM/BKfSpP xrog== X-Gm-Message-State: APjAAAXluCyJGR3+LTtqwlkdP/qAwVCSKIuxx6WxZLo3BWdLO4TPIk7B gQAgP32rPumjBoKGbbhRV36fk0pNC1k= X-Received: by 2002:adf:e9c2:: with SMTP id l2mr15763195wrn.315.1551792780962; Tue, 05 Mar 2019 05:33:00 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-18-114.w90-86.abo.wanadoo.fr. [90.86.221.114]) by smtp.gmail.com with ESMTPSA id i4sm8370097wrw.19.2019.03.05.05.32.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:00 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 5 Mar 2019 14:32:42 +0100 Message-Id: <20190305133248.4828-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190305133248.4828-1-ard.biesheuvel@linaro.org> References: <20190305133248.4828-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH 04/10] StandaloneMmPkg: remove redundant StandaloneMmDriverEntryPoint driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" StandaloneMmDriverEntryPoint is implemented in MdePkg now, so let's drop the redundant StandaloneMmPkg version. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- StandaloneMmPkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf | 41 -------- StandaloneMmPkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.c | 99 -------------------- 2 files changed, 140 deletions(-) -- 2.20.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: jiewen.yao@intel.com diff --git a/StandaloneMmPkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf b/StandaloneMmPkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf deleted file mode 100644 index 4d1896db10ba..000000000000 --- a/StandaloneMmPkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf +++ /dev/null @@ -1,41 +0,0 @@ -## @file -# Module entry point library for Standalone MM driver. -# -# Copyright (c) 2015, Intel Corporation. All rights reserved.
-# Copyright (c) 2016-2018, ARM Ltd. All rights reserved.
-# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php. -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# -## - -[Defines] - INF_VERSION = 0x0001001A - BASE_NAME = StandaloneMmDriverEntryPoint - FILE_GUID = BBC33478-98F8-4B78-B29D-574D681B7E43 - MODULE_TYPE = MM_STANDALONE - VERSION_STRING = 1.0 - PI_SPECIFICATION_VERSION = 0x00010032 - LIBRARY_CLASS = StandaloneMmDriverEntryPoint|MM_STANDALONE - -# -# The following information is for reference only and not required by the build tools. -# -# VALID_ARCHITECTURES = IA32 X64 IPF EBC -# - -[Sources] - StandaloneMmDriverEntryPoint.c - -[Packages] - MdePkg/MdePkg.dec - -[LibraryClasses] - BaseLib - DebugLib - diff --git a/StandaloneMmPkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.c deleted file mode 100644 index 64bffcfccc8a..000000000000 --- a/StandaloneMmPkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.c +++ /dev/null @@ -1,99 +0,0 @@ -/** @file - Entry point to a Standalone MM driver. - -Copyright (c) 2015, Intel Corporation. All rights reserved.
-Copyright (c) 2016 - 2018, ARM Ltd. All rights reserved.
- -This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#include - -#include -#include - -VOID -EFIAPI -ProcessLibraryConstructorList ( - IN EFI_HANDLE ImageHandle, - IN IN EFI_MM_SYSTEM_TABLE *MmSystemTable - ); - -EFI_STATUS -EFIAPI -ProcessModuleEntryPointList ( - IN EFI_HANDLE ImageHandle, - IN IN EFI_MM_SYSTEM_TABLE *MmSystemTable - ); - -VOID -EFIAPI -ProcessLibraryDestructorList ( - IN EFI_HANDLE ImageHandle, - IN IN EFI_MM_SYSTEM_TABLE *MmSystemTable - ); - -/** - The entry point of PE/COFF Image for a Standalone MM Driver. - - This function is the entry point for a Standalone MM Driver. - This function must call ProcessLibraryConstructorList() and - ProcessModuleEntryPointList(). - If the return status from ProcessModuleEntryPointList() - is an error status, then ProcessLibraryDestructorList() must be called. - The return value from ProcessModuleEntryPointList() is returned. - If _gDriverUnloadImageCount is greater than zero, then an unload - handler must be registered for this image - and the unload handler must invoke ProcessModuleUnloadList(). - If _gUefiDriverRevision is not zero and SystemTable->Hdr.Revision is less - than _gUefiDriverRevison, then return EFI_INCOMPATIBLE_VERSION. - - - @param ImageHandle The image handle of the Standalone MM Driver. - @param SystemTable A pointer to the EFI System Table. - - @retval EFI_SUCCESS The Standalone MM Driver exited normally. - @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than - SystemTable->Hdr.Revision. - @retval Other Return value from ProcessModuleEntryPointList(). - -**/ -EFI_STATUS -EFIAPI -_ModuleEntryPoint ( - IN EFI_HANDLE ImageHandle, - IN IN EFI_MM_SYSTEM_TABLE *MmSystemTable - ) -{ - EFI_STATUS Status; - - // - // Call constructor for all libraries - // - ProcessLibraryConstructorList (ImageHandle, MmSystemTable); - - // - // Call the driver entry point - // - Status = ProcessModuleEntryPointList (ImageHandle, MmSystemTable); - - // - // If all of the drivers returned errors, then invoke all of the library destructors - // - if (EFI_ERROR (Status)) { - ProcessLibraryDestructorList (ImageHandle, MmSystemTable); - } - - // - // Return the cumulative return status code from all of the driver entry points - // - return Status; -} - From patchwork Tue Mar 5 13:32:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 159657 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4975016jad; Tue, 5 Mar 2019 05:33:15 -0800 (PST) X-Google-Smtp-Source: APXvYqwSlYoYfkclsWcMKHxOUsrw4FLf4Y3p59Ap5Pldf92JLmfZtuy+CsoGeEHeNzPwvaQKjWrp X-Received: by 2002:a63:d04f:: with SMTP id s15mr1456167pgi.80.1551792795473; Tue, 05 Mar 2019 05:33:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551792795; cv=none; d=google.com; s=arc-20160816; b=UCp8f/74RY42Zkv4iHYm4WP9FV1WFkOyKNlOZB0w8cXbrFNrljkGLYJ9/1HzTG+RHr FY0nSa7KCiEMhB+JVt+rjZau7oSGVBlCAtruJFKzEkCIIraCXLZLJ2FfuDQd5CkY/Jaa i3pdUvx6YP8CNaZN/qEU4zCYGVKR56oH4qApa9OW5pPObifZcx8z9+/eo1ScOVH7W7LL 09Os15Qv/LZNvp+7EEvdv1JJBe6qVQkwuRUH3rP+iqBE51r3dOZkzeEOjhc90Dxoi/J4 cIjEOWd9OmOLV/hgZ2CKyXjGTNkWT5yro510YUPUNedfVv2EL46vgcFme2kMSc+xysKs JFdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=M8t4/15jg8sdSvhWQ8SXz0sE7DNaH5qo72o4olXG89U=; b=xI8Wg6KRyFBTYweEvspx7I/A+ig3pZ+wpVtRHn7p6jZymeVti7hg9P7Qrrf8HNfpFk oERKZ+XqW6LmFIfFrtFmipHOG2tIbqsr/PtNzn99WhkU64u6tVLuxPPTem4nGlX6z3J3 l5DyUbnG+pSMY7GGKpuVGi8KalL/qXsLde1kb/qqRk+LVhcnoATEBBHQl0sSd82ukhKP UQ0h8tujCiw1IxeRFqEPZpvPox+Youd1Pb6Sy89xxvWs7Kq2ujRCzCyAlU4sbjuGkM6v Z2z3mbdUU/odCro0ddaCTOHmxqmkWk+qJmnEPUyduoE0/7wBNZ/5d3aImjYg4N4XQcyw 5dig== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RbIP4R3+; 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 t191si7890186pgd.270.2019.03.05.05.33.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:15 -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=RbIP4R3+; 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 D144E211D5058; Tue, 5 Mar 2019 05:33:04 -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=2a00:1450:4864:20::441; helo=mail-wr1-x441.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (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 E657F2194EB7A for ; Tue, 5 Mar 2019 05:33:03 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id n2so9471116wrw.8 for ; Tue, 05 Mar 2019 05:33:03 -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 :mime-version:content-transfer-encoding; bh=An6SiMbMOvpxV10pC1uX4PVQ5FOWVxmS1PbizIqkmao=; b=RbIP4R3+r/j45PaRkiYJ0aczks3a8STNzCgIpi3vj649a5ktKoiLZME0tCfXtaqQ42 Z/HDMBCff1A+TT9dmnP6o1xdZPTPsPWLa/7qdyrhv7m5L9Pc+30c4EikKB76413JjAFy eDRycC8rBXhFwNA5FJCEyhsd73VeauIBd8KQTcXGE7d4YAQjKLmUjh+nN4SWtSS7PsAN tMc0og5JLt4Uuvfpi29tEb0rfOwUc+v0/cwEkuv2qbNEC+/M3ki6fJ2Z8n6Drk5LRGIu bCS9TULUkpMu1cr6pCCOvLhSxo4yDdIu0oOOdEytvKgoNqM43NV4fXe/Ty2cvJDXI5XA bwQQ== 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:mime-version:content-transfer-encoding; bh=An6SiMbMOvpxV10pC1uX4PVQ5FOWVxmS1PbizIqkmao=; b=QtFiUFhfmVs1R8lncqRNtlT5v8En1mc2ygrMn3M5D5SwvtP0OhGBaFULd5u44EhiPX JcyIG8EnEpCdk449iM2J7y7eCL6u+095bLuSyMrwdNfkHwNEvau+KEWwTCWxR1D7Z/oH QUFC6v9NbQE1+XiKTkJprg1TP3dgIGCh+R2O3FSF4GJA77KspfZfAwSsRgj0e3CRo9QS bioFLUwhCqnax1CocqCzNwzpv0jdwh7cBvHLR99rsIZ5166pMq7C51lRGQ5nWtZlgynu fvDJBBc94YZFn0PmBpiqUqs4+w9eKlBPhoo1dBvKMzRTZ4dL+GFvW92cxXvrL8KuwfOt XR3w== X-Gm-Message-State: APjAAAXSf8iD+E673hlxHyG0oibNsz2rlgM2LWbsbRd3b83ZHt22gMtD 3btkX2XMXwnwI85skCG6uRfkEp0DhNE= X-Received: by 2002:adf:eb84:: with SMTP id t4mr17398441wrn.100.1551792782160; Tue, 05 Mar 2019 05:33:02 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-18-114.w90-86.abo.wanadoo.fr. [90.86.221.114]) by smtp.gmail.com with ESMTPSA id i4sm8370097wrw.19.2019.03.05.05.33.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:01 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 5 Mar 2019 14:32:43 +0100 Message-Id: <20190305133248.4828-6-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190305133248.4828-1-ard.biesheuvel@linaro.org> References: <20190305133248.4828-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH 05/10] StandaloneMmPkg/StandaloneMmCoreEntryPoint: drop explicit SerialPortLib call X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Sending DEBUG output to the serial port should only be done via DebugLib calls, which is in charge of initializing the serial port when appropriate. So drop the explicit SerialPortInitialize () invocation, and rely on normal constructor ordering to get the serial port into the appropriate state at the right time. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c | 3 --- 1 file changed, 3 deletions(-) -- 2.20.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Jiewen.yao@intel.com Reviewed-by: achin.gupta@arm.com diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c index 5cca532456fd..c8e11a253d24 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c @@ -232,9 +232,6 @@ _ModuleEntryPoint ( VOID *TeData; UINTN TeDataSize; - Status = SerialPortInitialize (); - ASSERT_EFI_ERROR (Status); - // Get Secure Partition Manager Version Information Status = GetSpmVersion (); if (EFI_ERROR (Status)) { From patchwork Tue Mar 5 13:32:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 159658 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4975068jad; Tue, 5 Mar 2019 05:33:19 -0800 (PST) X-Google-Smtp-Source: APXvYqwOtmhSEyrOOVh93uO6w/7z3g2VwH/PVHHxzuDJ6nhxg8SI1hxHqqDIcNe4UjU2LtRBMXJM X-Received: by 2002:a17:902:b609:: with SMTP id b9mr1265554pls.134.1551792799260; Tue, 05 Mar 2019 05:33:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551792799; cv=none; d=google.com; s=arc-20160816; b=YB4h2kS9p6VG4DKkOV0SwnuqlwHMPgK3mcbs17fa7uQQsGL4/e8TOmj4fcBOn+RRxc b90uevni05lEHMEp/hR27yqjB2BsSgKd3xpXNGcq3/81ASAYch05CnFbcUaBbt0D0PJg KofcbOG8gwKPzCjeFZDgvg2dqHCfu+ZvdHsp6DuxUqRIY6NPrQFbmScNBzzVH6q7HT0T 1UkUH/LNuQcngjpz1WdTVsIEc58WsI0gcZmTbJlp+MDrr6s+7AZkeZhyJJoXgx0vDUCf rD95TFDx3VlIKMDUX+RH5anP13c19VUdceHn56PgxXIp7EmiWHgHrUa4A5nOuf+LNZoh oEZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=m1+IZenHKPZAj7o0OXsxIyJvRsClGnl7pGn8ah7j/nU=; b=X6o4EtXro7xe+r4lZktXJ06j+jYT+COMR/70yDQW9gc3nlFF35cnBxN+tr2b/Y4p0K 4z62+p87q1GFZYXIedZ2hQ7zCaYlWwyVbdZGSKWfLQujWc8locEcFL/tYjdxt1rDgkeb IF6HlPyHyQhrwgz/qw00IhN3qmCMLMnJlzv1XYVFBdXbB+u+wLTDjNR9SEZCYRsCgt9g x+zGfYAfjnIId7vKrNBKwwrU1+2gzInHVPxiX3MCAR9Ur5yZkWw/+2slhrMCMB2WZGCn Ekq9rV+bLOqhzEJ7qojGRLp+/WuHVX4uNFvEMJvNQEMqrhkhEtYxOQ+qTlBNoJEihw1E 5+WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="e/yLKxmz"; 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 42si1339389pld.383.2019.03.05.05.33.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:19 -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="e/yLKxmz"; 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 0C38D211D5064; Tue, 5 Mar 2019 05:33:07 -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=2a00:1450:4864:20::441; helo=mail-wr1-x441.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (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 61EC4211D5061 for ; Tue, 5 Mar 2019 05:33:05 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id r5so9471943wrg.9 for ; Tue, 05 Mar 2019 05:33:05 -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 :mime-version:content-transfer-encoding; bh=rky618Avva4UqzStzvPcrQ3U6Des/fM8Ep0IpBc6i0M=; b=e/yLKxmz5ed1SDWrhWOg0Ho/KUVLPq57ODT+5lyK7VW7xqBG4A0HHChQBzCTXH7xRh dg0aO+qyha4+qpUPf45PUUfijTsrZ5YRECPkh+9OGn6ECk3IiaUuBWWdPAsvVrr2DQeg VVrBILzH3nS7RxR6RaS7nV0+KFiA8Lb+hW4Ekzxe54cbAo1nGV0H5xNR/N8R7+frxUts +cpNEtAL2jwo/1pfzin6UxiD4otZautSmNQaQTxDsM4p2C/yUr9yGNPgcmOi0H9guS2d DRZKMSY+iYctzwiVkthdVotY/zuWaN+hWoLiA3eDZ7ysLaw6y20FeiH6wa/OOHdYsDyp 526w== 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:mime-version:content-transfer-encoding; bh=rky618Avva4UqzStzvPcrQ3U6Des/fM8Ep0IpBc6i0M=; b=bcZ8Dnwuo9z13Ji3jKJwUHjrCOlV2E7SNEG38YUA6TNRAssbp5pm7XYgHMcgXRyQHn WsmctlzvNgJ5pC4pC0iilr3FZk4srNzRMRipgoZ4CQbXYl2pUlqwBzpDA1ykOIf/PoKW Y6ZmG3+4bi3CfMmxhfWNHYWxODuVq3XoSLDleNP6gOj/ftam6eutULnKNBp98Ry2GyD3 ikgbb940AKUD7YhuOmMqzoyCq75+AJn8EqbUcMcfvmUDg145O5inA+z+9bTQIckuxscb UcC2DLiT9SEkm7rbN18AgJlfH/ct6LfZROBdNJBlH/RYyEwoQMvJiD2tT6KnpT8x4/PX C8Ew== X-Gm-Message-State: APjAAAUhuyJPJiLdXug79xjXgPCbTZDJnRScvbxffkhtJyVNLXIJWPJ8 Sb4g76ixY8LxYKXZ5aZ58WBSsCkEoBQ= X-Received: by 2002:adf:e48a:: with SMTP id i10mr17300232wrm.257.1551792783667; Tue, 05 Mar 2019 05:33:03 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-18-114.w90-86.abo.wanadoo.fr. [90.86.221.114]) by smtp.gmail.com with ESMTPSA id i4sm8370097wrw.19.2019.03.05.05.33.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:02 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 5 Mar 2019 14:32:44 +0100 Message-Id: <20190305133248.4828-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190305133248.4828-1-ard.biesheuvel@linaro.org> References: <20190305133248.4828-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH 06/10] StandaloneMmPkg/Core: permit encapsulated firmware volumes X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Standalone MM requires 4 KB section alignment for all images, so that strict permissions can be applied. Unfortunately, this results in a lot of wasted space, which is usually costly in the secure world environment that standalone MM is expected to operate in. So let's permit the standalone MM drivers (but not the core) to be delivered in a compressed firmware volume. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- StandaloneMmPkg/Core/StandaloneMmCore.inf | 1 + StandaloneMmPkg/Core/FwVol.c | 99 ++++++++++++++++++-- 2 files changed, 91 insertions(+), 9 deletions(-) -- 2.20.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: jiewen.yao@intel.com Reviewed-by: achin.gupta@arm.com diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.inf b/StandaloneMmPkg/Core/StandaloneMmCore.inf index ff2b8b9cef03..83d31e2d92c5 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.inf +++ b/StandaloneMmPkg/Core/StandaloneMmCore.inf @@ -49,6 +49,7 @@ [LibraryClasses] BaseMemoryLib CacheMaintenanceLib DebugLib + ExtractGuidedSectionLib FvLib HobLib MemoryAllocationLib diff --git a/StandaloneMmPkg/Core/FwVol.c b/StandaloneMmPkg/Core/FwVol.c index 5abf98c24797..d95491f252f9 100644 --- a/StandaloneMmPkg/Core/FwVol.c +++ b/StandaloneMmPkg/Core/FwVol.c @@ -14,6 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "StandaloneMmCore.h" #include +#include // // List of file types supported by dispatcher @@ -65,15 +66,25 @@ Returns: --*/ { - EFI_STATUS Status; - EFI_STATUS DepexStatus; - EFI_FFS_FILE_HEADER *FileHeader; - EFI_FV_FILETYPE FileType; - VOID *Pe32Data; - UINTN Pe32DataSize; - VOID *Depex; - UINTN DepexSize; - UINTN Index; + EFI_STATUS Status; + EFI_STATUS DepexStatus; + EFI_FFS_FILE_HEADER *FileHeader; + EFI_FV_FILETYPE FileType; + VOID *Pe32Data; + UINTN Pe32DataSize; + VOID *Depex; + UINTN DepexSize; + UINTN Index; + EFI_COMMON_SECTION_HEADER *Section; + VOID *SectionData; + UINTN SectionDataSize; + UINT32 DstBufferSize; + VOID *ScratchBuffer; + UINT32 ScratchBufferSize; + VOID *DstBuffer; + UINT16 SectionAttribute; + UINT32 AuthenticationStatus; + EFI_FIRMWARE_VOLUME_HEADER *InnerFvHeader; DEBUG ((DEBUG_INFO, "MmCoreFfsFindMmDriver - 0x%x\n", FwVolHeader)); @@ -83,6 +94,71 @@ Returns: FvIsBeingProcesssed (FwVolHeader); + // + // First check for encapsulated compressed firmware volumes + // + FileHeader = NULL; + do { + Status = FfsFindNextFile (EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE, + FwVolHeader, &FileHeader); + if (EFI_ERROR (Status)) { + break; + } + Status = FfsFindSectionData (EFI_SECTION_GUID_DEFINED, FileHeader, + &SectionData, &SectionDataSize); + if (EFI_ERROR (Status)) { + break; + } + Section = (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1); + Status = ExtractGuidedSectionGetInfo (Section, &DstBufferSize, + &ScratchBufferSize, &SectionAttribute); + if (EFI_ERROR (Status)) { + break; + } + + // + // Allocate scratch buffer + // + ScratchBuffer = (VOID *)(UINTN)AllocatePages (EFI_SIZE_TO_PAGES (ScratchBufferSize)); + if (ScratchBuffer == NULL) { + return EFI_OUT_OF_RESOURCES; + } + + // + // Allocate destination buffer, extra one page for adjustment + // + DstBuffer = (VOID *)(UINTN)AllocatePages (EFI_SIZE_TO_PAGES (DstBufferSize)); + if (DstBuffer == NULL) { + return EFI_OUT_OF_RESOURCES; + } + + // + // Call decompress function + // + Status = ExtractGuidedSectionDecode (Section, &DstBuffer, ScratchBuffer, + &AuthenticationStatus); + FreePages (ScratchBuffer, EFI_SIZE_TO_PAGES (ScratchBufferSize)); + if (EFI_ERROR (Status)) { + goto FreeDstBuffer; + } + + DEBUG ((DEBUG_INFO, + "Processing compressed firmware volume (AuthenticationStatus == %x)\n", + AuthenticationStatus)); + + Status = FindFfsSectionInSections (DstBuffer, DstBufferSize, + EFI_SECTION_FIRMWARE_VOLUME_IMAGE, &Section); + if (EFI_ERROR (Status)) { + goto FreeDstBuffer; + } + + InnerFvHeader = (VOID *)(Section + 1); + Status = MmCoreFfsFindMmDriver (InnerFvHeader); + if (EFI_ERROR (Status)) { + goto FreeDstBuffer; + } + } while (TRUE); + for (Index = 0; Index < sizeof (mMmFileTypes) / sizeof (mMmFileTypes[0]); Index++) { DEBUG ((DEBUG_INFO, "Check MmFileTypes - 0x%x\n", mMmFileTypes[Index])); FileType = mMmFileTypes[Index]; @@ -100,5 +176,10 @@ Returns: } while (!EFI_ERROR (Status)); } + return EFI_SUCCESS; + +FreeDstBuffer: + FreePages (DstBuffer, EFI_SIZE_TO_PAGES (DstBufferSize)); + return Status; } From patchwork Tue Mar 5 13:32:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 159659 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4975135jad; Tue, 5 Mar 2019 05:33:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyf4GMVF0iXXJ/RTpl4Ik+TinRtzQJ9KJJoe6btxC+VWMpXJ3uJ7ECBU+arw4Qd7CfosnmS X-Received: by 2002:a17:902:59c3:: with SMTP id d3mr1263139plj.214.1551792803243; Tue, 05 Mar 2019 05:33:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551792803; cv=none; d=google.com; s=arc-20160816; b=w393yEzleet3vPVd2CmYnw7JarexCNOqmnO994+vg9r18EFP75V0iLIhcB0B5t23Qz uoMroYrPxaJFFqfkVrLIxkvW4SO0xP6m3QK0MlctcbATxPQH3ot2D4LLFEEbXcO9CLdU wappinajve4hyS2Rq/3Lb6IpeA+WAsZ4i3LfjdmnCWyErBdCwnF8IW/qLZU2hImuiYG1 PY8C0un3pLCJykXEHHYUMm/73D4DBgEcRyai64bQZzWpJ7aOm1cEBCOlJk7gwzLGIU8o YQ11fRmmr+iHIGZDDRpKffW30twd8ec85zWOLxuvIb7EpN8K1gycFgnNLSRuza7dO6Zi 9F/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=e9R7ZsSaMamXMqVc+ZqBgkbaksOvwixg4W5qtqyZBOg=; b=Fe8X/bi0R4dVTL4uqld13ZNjTpC4SjXGZIVqgpXpQlNZ2y2ba4Qw95sy/ZUjZgHLYZ viusZt/N3xFJQ7DgxeKePwCJlOxqK07k4xecXRJaXg2pf54PPMEQ/crETGGIPvI9uvic jMaVbpb4kdnqg7g9Rz+eWFesfoDqtSfo5XiGn4UW1hC0hG6rhtEYQdp8apuds7eYZbAN tmQr8LdunNsba7yIG8US40hM3piYQwplqATbaqZxbG5AxE5h9DCMGzHl60EKvPI3+WRC vLs14xTnK8xCCpAFBo2dHWPi3R9vXvCczLYUtLrd3OVhqPUMR+6e5Bo0hS+u5+Pz+MwZ /ZbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=rdQm5l4f; 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 e67si8423637pfh.212.2019.03.05.05.33.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33: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=rdQm5l4f; 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 44FC5211D5069; Tue, 5 Mar 2019 05:33:08 -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=2a00:1450:4864:20::442; helo=mail-wr1-x442.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (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 B4EB3211D5046 for ; Tue, 5 Mar 2019 05:33:06 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id r5so9472030wrg.9 for ; Tue, 05 Mar 2019 05:33:06 -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 :mime-version:content-transfer-encoding; bh=1RE1+vGgiZiOcu4jfk79Td4okKIeFX+7ziOiGqVMEW8=; b=rdQm5l4f4hW1fFtewXynDMPleiJjI6VpDoocybfD/xdD1tgJv/kAy3Jze4exIJL0iU SCbqTQf57irKB4fgnjKiSnSoNYS6FgSlt/4WzteGq+BIngMduk621zPrULvZu9l8l+on 9tNcobYC7S+Mj39oyLvjBg7yFpPpRK3HZm5pExAq67gH0HMNXKArB8+PlJvYG8weU6Nh OW2z7XB/KErvWmWEWdCKmGiX/zOFHRcn0Y62VFieyeO0nCd/YH2d6zZW1eZ/s7p3/DSd x5fPtpwJSQRdwtZ4QjT/ZIKQofTZnhaNrwy0d9B1VDFS5yaqmIrudlM8gNPczHr+Ovkb apeg== 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:mime-version:content-transfer-encoding; bh=1RE1+vGgiZiOcu4jfk79Td4okKIeFX+7ziOiGqVMEW8=; b=L+AwAkRE5HtX6KZkLwDfe1mNFHBvLUcuuehpbN41lH2+/yglxjXhfxxpMHttlvc+ZH 9mfW31o3j8TxDWSxZi9N2HXM50/QkOINb5k4lKTSp6Ym2U0bjU0r5dByy20umCXBeTsS 1NoNlWtOoX8wDGDkzi52Gq8CYts153afAkEFODktMswCIu2tj7+fDTQ7KXXCGcOvFY6E NAgF71D8iyVszPUgTxPOzQMbSbwwOCTluxPYdsnGShMEuSY/T/XcHyUNgBl2u+hBaWlY D2wFSZV5EWXaXOleur87xSb85tVYBsSe37P5/rMLPiJb+VOdFF4KOfD4l0iWLKS+4kPK V/dA== X-Gm-Message-State: APjAAAXQS0wTKWBpX6tTzB3PamjuZoa3HwvSiKJrwG9G75lyt74f7HIk fQBto+PEv1lxrZOTY0ZzawK4UzLp2Cc= X-Received: by 2002:adf:ba84:: with SMTP id p4mr16569400wrg.156.1551792784990; Tue, 05 Mar 2019 05:33:04 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-18-114.w90-86.abo.wanadoo.fr. [90.86.221.114]) by smtp.gmail.com with ESMTPSA id i4sm8370097wrw.19.2019.03.05.05.33.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:04 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 5 Mar 2019 14:32:45 +0100 Message-Id: <20190305133248.4828-8-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190305133248.4828-1-ard.biesheuvel@linaro.org> References: <20190305133248.4828-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH 07/10] StandaloneMmPkg/Core: dispatch all drivers at init time X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Instead of deferring dispatch of the remaining MM drivers once the CPU driver has been dispatched, proceed and dispatch all drivers. This makes sense for standalone MM, since all dispatchable drivers should be present in the initial firmware volume anyway: dispatch of additional FVs originating in the non-secure side is not supported. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- StandaloneMmPkg/Core/Dispatcher.c | 92 -------------------- StandaloneMmPkg/Core/StandaloneMmCore.c | 1 - 2 files changed, 93 deletions(-) -- 2.20.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: jiewen.yao@intel.com Reviewed-by: achin.gupta@arm.com diff --git a/StandaloneMmPkg/Core/Dispatcher.c b/StandaloneMmPkg/Core/Dispatcher.c index 8a2ad5118d92..bede4832cfb7 100644 --- a/StandaloneMmPkg/Core/Dispatcher.c +++ b/StandaloneMmPkg/Core/Dispatcher.c @@ -575,7 +575,6 @@ MmDispatcher ( LIST_ENTRY *Link; EFI_MM_DRIVER_ENTRY *DriverEntry; BOOLEAN ReadyToRun; - BOOLEAN PreviousMmEntryPointRegistered; DEBUG ((DEBUG_INFO, "MmDispatcher\n")); @@ -639,11 +638,6 @@ MmDispatcher ( DriverEntry->Initialized = TRUE; RemoveEntryList (&DriverEntry->ScheduledLink); - // - // Cache state of MmEntryPointRegistered before calling entry point - // - PreviousMmEntryPointRegistered = gMmCorePrivate->MmEntryPointRegistered; - // // For each MM driver, pass NULL as ImageHandle // @@ -661,20 +655,6 @@ MmDispatcher ( DEBUG ((DEBUG_INFO, "StartImage Status - %r\n", Status)); MmFreePages(DriverEntry->ImageBuffer, DriverEntry->NumberOfPage); } - - if (!PreviousMmEntryPointRegistered && gMmCorePrivate->MmEntryPointRegistered) { - // - // Return immediately if the MM Entry Point was registered by the MM - // Driver that was just dispatched. The MM IPL will reinvoke the MM - // Core Dispatcher. This is required so MM Mode may be enabled as soon - // as all the dependent MM Drivers for MM Mode have been dispatched. - // Once the MM Entry Point has been registered, then MM Mode will be - // used. - // - gRequestDispatch = TRUE; - gDispatcherRunning = FALSE; - return EFI_NOT_READY; - } } // @@ -903,78 +883,6 @@ MmAddToDriverList ( return EFI_SUCCESS; } -/** - This function is the main entry point for an MM handler dispatch - or communicate-based callback. - - Event notification that is fired every time a FV dispatch protocol is added. - More than one protocol may have been added when this event is fired, so you - must loop on MmLocateHandle () to see how many protocols were added and - do the following to each FV: - If the Fv has already been processed, skip it. If the Fv has not been - processed then mark it as being processed, as we are about to process it. - Read the Fv and add any driver in the Fv to the mDiscoveredList.The - mDiscoveredList is never free'ed and contains variables that define - the other states the MM driver transitions to.. - While you are at it read the A Priori file into memory. - Place drivers in the A Priori list onto the mScheduledQueue. - - @param DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister(). - @param Context Points to an optional handler context which was specified when the handler was registered. - @param CommBuffer A pointer to a collection of data in memory that will - be conveyed from a non-MM environment into an MM environment. - @param CommBufferSize The size of the CommBuffer. - - @return Status Code - -**/ -EFI_STATUS -EFIAPI -MmDriverDispatchHandler ( - IN EFI_HANDLE DispatchHandle, - IN CONST VOID *Context, OPTIONAL - IN OUT VOID *CommBuffer, OPTIONAL - IN OUT UINTN *CommBufferSize OPTIONAL - ) -{ - EFI_STATUS Status; - - DEBUG ((DEBUG_INFO, "MmDriverDispatchHandler\n")); - - // - // Execute the MM Dispatcher on any newly discovered FVs and previously - // discovered MM drivers that have been discovered but not dispatched. - // - Status = MmDispatcher (); - - // - // Check to see if CommBuffer and CommBufferSize are valid - // - if (CommBuffer != NULL && CommBufferSize != NULL) { - if (*CommBufferSize > 0) { - if (Status == EFI_NOT_READY) { - // - // If a the MM Core Entry Point was just registered, then set flag to - // request the MM Dispatcher to be restarted. - // - *(UINT8 *)CommBuffer = COMM_BUFFER_MM_DISPATCH_RESTART; - } else if (!EFI_ERROR (Status)) { - // - // Set the flag to show that the MM Dispatcher executed without errors - // - *(UINT8 *)CommBuffer = COMM_BUFFER_MM_DISPATCH_SUCCESS; - } else { - // - // Set the flag to show that the MM Dispatcher encountered an error - // - *(UINT8 *)CommBuffer = COMM_BUFFER_MM_DISPATCH_ERROR; - } - } - } - - return EFI_SUCCESS; -} - /** This function is the main entry point for an MM handler dispatch or communicate-based callback. diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.c b/StandaloneMmPkg/Core/StandaloneMmCore.c index 74432320bfc7..ec53b8d8bec4 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.c +++ b/StandaloneMmPkg/Core/StandaloneMmCore.c @@ -100,7 +100,6 @@ BOOLEAN mInLegacyBoot = FALSE; // MM_CORE_MMI_HANDLERS mMmCoreMmiHandlers[] = { { MmFvDispatchHandler, &gMmFvDispatchGuid, NULL, TRUE }, - { MmDriverDispatchHandler, &gEfiEventDxeDispatchGuid, NULL, TRUE }, { MmReadyToLockHandler, &gEfiDxeMmReadyToLockProtocolGuid, NULL, TRUE }, { MmEndOfDxeHandler, &gEfiEndOfDxeEventGroupGuid, NULL, FALSE }, { MmLegacyBootHandler, &gEfiEventLegacyBootGuid, NULL, FALSE }, From patchwork Tue Mar 5 13:32:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 159660 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4975227jad; Tue, 5 Mar 2019 05:33:27 -0800 (PST) X-Google-Smtp-Source: APXvYqwSdcBwCBQHjdPULGcCwOT0R+F0lXxIh1yNHPtFw2dtezG1RXgNVfXJrjRz364bVUUU7LJ2 X-Received: by 2002:a63:20a:: with SMTP id 10mr1430275pgc.346.1551792807532; Tue, 05 Mar 2019 05:33:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551792807; cv=none; d=google.com; s=arc-20160816; b=P8paH5KFeEpD30srOMnC+XYNEqVY/B/q0XiMQ5a0rOIHaNCptOMDCs8bqrs9Uus2D2 C+ZVlDG1vaZEBv0PgwEIGwKI9DSfzXOReWS7YJZfOs0MBMUCG/qmGJL1gUdf0A3qWtae yBzLsE2UrQNaRGOW9fhddILtZg64vYy68oo3LrljUHQuLO2z5cMYVCZVQtIVCJBI8nKk Q+c7YwDxRTE1cTrYD693kkuYolN8hI2C7obRs8JLfZUpQ92UHPBI/rE1seVjf2fFmiQO PQhVigdr1GRIOyl/BfPXUVGjjr+Q9reYDB8DWrQ/XZmbd7YW9PhGwDeR6eUpWvSlkDj8 GHbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=t3TDzyLKH4mZFg+mgQIEBqcd6RZuADTQi2PhzXU/zxs=; b=EWDNlqyP0Kv26CtGc2NzhvlYfu100jm3uPN49BH29bso3oxPStSJO6b/V/fR7rQvGs WouaNMeX4Wj+u1D5hBQx6XhyhGWfeW8mX4p8qyA62GAc76lS2GDP/WgYF0+37W+IBx2v 2GvJn5Dx6PfV+veIvboQkPPK6Jij6E7+Bia8ErCs01fmth5l1hHxF2mBSKzjQ2vXmAXN IaHGZ8kAx9MXCJ99qZmNL6ao8S2QWFv7VD4LA1D4geeJb9z0OLvqpIUG3CkQunroLYCI N9HCYgxIF5Fv9+fVgTpQzpmeqAPJ2hgolF27aNLCr+Tp2dWYLMkkhDhE5dG/3JQKbc8J I1lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=T60RokXD; 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 z2si8226209pfl.179.2019.03.05.05.33.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:27 -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=T60RokXD; 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 7CEE4211D506E; Tue, 5 Mar 2019 05:33:10 -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=2a00:1450:4864:20::444; helo=mail-wr1-x444.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (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 3F076211D5051 for ; Tue, 5 Mar 2019 05:33:08 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id n2so9471365wrw.8 for ; Tue, 05 Mar 2019 05:33:08 -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 :mime-version:content-transfer-encoding; bh=0U8Xn18rCjtxSoCUCM8BxLk5E+iUxYvLGNfa0yD0XIo=; b=T60RokXD9wBfTG0VRD2Ufb5RVnOncsndoRICMJEBU0Ta92zt9K8Wt6aHDXx197Q2gZ l/RpHEEV7xuRAA+x875OHlBWHFnWubguSm4Mx4jnwknYK1xsN5Bo1UdaId4oRiMyCeI5 kxbK2sy6cCIHyKCU/pz/kSFXYugANpRx+0ju1FGQ/pLD7+9oGErkqJuTrpfLV9ZnGwIi g0vvaOX3KeJzNRSlyMJ5zpp49Aw992s+2uyiaOyhUL6IT6E1T9NMaJd2iZE39piC3b+f J/BpYHZX62REa5FjjgOYA34xq6y9eg1A1lkzX84NY1JUMcnyBeFmZo3hnLr5nVnfMytt BeOg== 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:mime-version:content-transfer-encoding; bh=0U8Xn18rCjtxSoCUCM8BxLk5E+iUxYvLGNfa0yD0XIo=; b=rZDeHl1nIhodvGr/HLLe9qwHCuoSuctCzLTyjA5WhIO/ZSmkngG/4nlvkeUdJEm3fB vElN6FwvMSDk+eJmCMLhF0Mhix0LMKDhO82s7TNFQcMyR2dOWW1rLD8R7VORjbZkn55z +He3UF8zZKOuTWfFp1x5xuMEWoskQbAAxHb6XD27mcqbTYrG+yMD8oSdrSA7xmZjfvIA 3kJqSZ0SZN8fOQqzWrrbX8nVKvOxPW1/gpZC5FPGUcy+6YPt21mVWpAhf5/dizZW1Bw+ 0hGDKTEe1mACQp4vjZxlQ6FsrjlKJiNPRM0bdVr94aH6DNaw9qNPGjLlhzpxGjKJkxUE ZE9g== X-Gm-Message-State: APjAAAULg7briUMiApvZSKSgbfG72VCgxn5KtbrhFxIbgvAfXYc15PNW a5ineV22HojoFU6vKZWlpe9UveRt+40= X-Received: by 2002:a05:6000:1110:: with SMTP id z16mr16642716wrw.28.1551792786086; Tue, 05 Mar 2019 05:33:06 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-18-114.w90-86.abo.wanadoo.fr. [90.86.221.114]) by smtp.gmail.com with ESMTPSA id i4sm8370097wrw.19.2019.03.05.05.33.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:05 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 5 Mar 2019 14:32:46 +0100 Message-Id: <20190305133248.4828-9-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190305133248.4828-1-ard.biesheuvel@linaro.org> References: <20190305133248.4828-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH 08/10] StandaloneMmPkg/Core: drop support for dispatching FVs into MM X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Remove the support that permits calls into the MM context to dispatch firmware volumes that are not part of the initial standalone MM firmware volume. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- StandaloneMmPkg/Core/StandaloneMmCore.h | 22 ---------- StandaloneMmPkg/Core/Dispatcher.c | 46 -------------------- StandaloneMmPkg/Core/StandaloneMmCore.c | 1 - 3 files changed, 69 deletions(-) -- 2.20.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: jiewen.yao@intel.com Reviewed-by: achin.gupta@arm.com diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.h b/StandaloneMmPkg/Core/StandaloneMmCore.h index 0d20bcaa6be5..74338dc9da0d 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.h +++ b/StandaloneMmPkg/Core/StandaloneMmCore.h @@ -635,28 +635,6 @@ MmDriverDispatchHandler ( @return Status Code -**/ -EFI_STATUS -EFIAPI -MmFvDispatchHandler ( - IN EFI_HANDLE DispatchHandle, - IN CONST VOID *Context, OPTIONAL - IN OUT VOID *CommBuffer, OPTIONAL - IN OUT UINTN *CommBufferSize OPTIONAL - ); - -/** - This function is the main entry point for an MM handler dispatch - or communicate-based callback. - - @param DispatchHandle The unique handle assigned to this handler by MmiHandlerRegister(). - @param Context Points to an optional handler context which was specified when the handler was registered. - @param CommBuffer A pointer to a collection of data in memory that will - be conveyed from a non-MM environment into an MM environment. - @param CommBufferSize The size of the CommBuffer. - - @return Status Code - **/ EFI_STATUS EFIAPI diff --git a/StandaloneMmPkg/Core/Dispatcher.c b/StandaloneMmPkg/Core/Dispatcher.c index bede4832cfb7..4b2f38f700a0 100644 --- a/StandaloneMmPkg/Core/Dispatcher.c +++ b/StandaloneMmPkg/Core/Dispatcher.c @@ -883,52 +883,6 @@ MmAddToDriverList ( return EFI_SUCCESS; } -/** - This function is the main entry point for an MM handler dispatch - or communicate-based callback. - - @param DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister(). - @param Context Points to an optional handler context which was specified when the handler was registered. - @param CommBuffer A pointer to a collection of data in memory that will - be conveyed from a non-MM environment into an MM environment. - @param CommBufferSize The size of the CommBuffer. - - @return Status Code - -**/ -EFI_STATUS -EFIAPI -MmFvDispatchHandler ( - IN EFI_HANDLE DispatchHandle, - IN CONST VOID *Context, OPTIONAL - IN OUT VOID *CommBuffer, OPTIONAL - IN OUT UINTN *CommBufferSize OPTIONAL - ) -{ - EFI_STATUS Status; - EFI_MM_COMMUNICATE_FV_DISPATCH_DATA *CommunicationFvDispatchData; - EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader; - - DEBUG ((DEBUG_INFO, "MmFvDispatchHandler\n")); - - CommunicationFvDispatchData = CommBuffer; - - DEBUG ((DEBUG_INFO, " Dispatch - 0x%016lx - 0x%016lx\n", CommunicationFvDispatchData->Address, - CommunicationFvDispatchData->Size)); - - FwVolHeader = (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)CommunicationFvDispatchData->Address; - - MmCoreFfsFindMmDriver (FwVolHeader); - - // - // Execute the MM Dispatcher on any newly discovered FVs and previously - // discovered MM drivers that have been discovered but not dispatched. - // - Status = MmDispatcher (); - - return Status; -} - /** Traverse the discovered list for any drivers that were discovered but not loaded because the dependency experessions evaluated to false. diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.c b/StandaloneMmPkg/Core/StandaloneMmCore.c index ec53b8d8bec4..766cdb5c848c 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.c +++ b/StandaloneMmPkg/Core/StandaloneMmCore.c @@ -99,7 +99,6 @@ BOOLEAN mInLegacyBoot = FALSE; // Table of MMI Handlers that are registered by the MM Core when it is initialized // MM_CORE_MMI_HANDLERS mMmCoreMmiHandlers[] = { - { MmFvDispatchHandler, &gMmFvDispatchGuid, NULL, TRUE }, { MmReadyToLockHandler, &gEfiDxeMmReadyToLockProtocolGuid, NULL, TRUE }, { MmEndOfDxeHandler, &gEfiEndOfDxeEventGroupGuid, NULL, FALSE }, { MmLegacyBootHandler, &gEfiEventLegacyBootGuid, NULL, FALSE }, From patchwork Tue Mar 5 13:32:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 159661 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4975292jad; Tue, 5 Mar 2019 05:33:31 -0800 (PST) X-Google-Smtp-Source: APXvYqw1xXFI+q50X9UrKtytp0Q3zTiEstJ7qfa+xCNgR0BQOnGNkWjMiN2vGlOXRp5YIOTyi9ni X-Received: by 2002:a63:b242:: with SMTP id t2mr1400851pgo.451.1551792811232; Tue, 05 Mar 2019 05:33:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551792811; cv=none; d=google.com; s=arc-20160816; b=pXpDWEIROtgHN9/fMcKKcv2JlYMzRglBP5yjY213wSz3yCmXij/xhAY9QUsCpvVRU4 t8w/IMPa4gVqGSSW9nQ/5aIHfQMpx6gvByI8p26niHgaPS/ukXp03H3lA1rU5z2a/ZNb 7UMR+OGzMDbSPtLkpljNEQkV4TRhapccdl07DjUS64wFWTjqD7fGXejhHphPk0M/WPqM x37aVD2qsAy3tIWtdOY8qJ4f8ocYVXtVm+QTX5BHXIqeMkYqzHKotbDXOw0tns8OzDPL 7fcRvccvU2eTKy6di9tuqXwKTBhdW/5yLFhxk0SOBz6LMRoKjOw8MngQhGEZTxG0QBkX 05xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=/jj3c63A06ZZxwflQzkja6F2zB1A6TQJgnd5zJ7PENU=; b=Lib77eEGQCxYXuQ5HRh0vjBM+8Hbl2uuDfGFbKlLdNxxXtLbw16YYy6umJtbrox6ZP SxmPyIl4VbnZCu99wWkBOTJt7omq48vclHGjdiYskziATgKTBvOllJbFqGz3a4Ei4izT Jxt20W7x5FjIiPBwbgknMH7w2ZYbHA9xIal0yuhioQTPjUyzOGRVy60fcmqkgHNrx5Ps EkSRlSYAX+zZ0AKgCPxTSZktghAsuzAJ1/PYDZlJf2xHASvxmyeEEAZ3uYxYEbdNfI8y XoQk5+erqQHotHn51DotVrJSaMtw4mlfPvdIjVpM+ee+YTdXMXA48mr8jUDEuuabqPgw Q1dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Dke9J6Mf; 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 x8si8128862plv.137.2019.03.05.05.33.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:31 -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=Dke9J6Mf; 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 A97F52194EB7B; Tue, 5 Mar 2019 05:33:10 -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=2a00:1450:4864:20::444; helo=mail-wr1-x444.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (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 EB0A32194EB7A for ; Tue, 5 Mar 2019 05:33:08 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id d17so9472914wre.10 for ; Tue, 05 Mar 2019 05:33:08 -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 :mime-version:content-transfer-encoding; bh=GKLlsu5nPr6TraiRDsSRJA4IJsJWGA53r/rKj+rdtQU=; b=Dke9J6Mf8yXiLmAwrfdf7u4sDcGfwHO903WrFrQinbqsyHt3T3i2lgA8B/+WFL7MXK 1pKVcfHW7z5t0SHnmVrBPutlNkscqMH0Nl67ZKsHEV8IJGOOqk637voqaHVOUzSh/REl aTbZPgtnE5S6jl0IcYBo34Zv/YobE5dwgP1TiGYnDkBainhP5y9AFc7E6NOLvX3esswE ZSGqoajBPgspVhxRBRcamSsfJpENubZ885H+6xXlbhYtS5ht2ODi3APfqYIniNjB4ljD mvHjGBx8PERY598v2OBN5xbMh1az1qYd08lrpPSMEkDxwWjUuCqaejOCPr9twrBg+xvl KAtA== 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:mime-version:content-transfer-encoding; bh=GKLlsu5nPr6TraiRDsSRJA4IJsJWGA53r/rKj+rdtQU=; b=t8GxPSPoTJMefYuqf6pJiQWhBSCpPGRv7Tt4GY20+76a71NcflHWBEYCMNe2wbLK5W l9Z2rfHEVk+YdQG2W8dhvyxmNGMto2yDgnCr4BtPhFX8Axts5sZSQFoJfO6kPMHpbFUh eM+cYxdmW+bwJzeLydpfU14W/173HQflMWjjHL8aHnRBS0yrw/9nRK1OVazL1PrXd3he kPpErG9EczDLu0+NhKYG6PO/umYtl5KnQWTT3d1AicTpd0tynpeoqenpwJwMFBaVoAKe vfV63WjG28N0MGXpcZhJKDpP5ZuuXJiME5dNIKomFOn2RZUs6wy0fJ21WfHoMACbzGeC X44Q== X-Gm-Message-State: APjAAAWjwwKzetnslcmxIyIwy3Ue/uIgn1aZ8/VpA+1iV4zQTudnxWGy Y+15+IA8BT5XC2drU3HOIUa5g3WuwFs= X-Received: by 2002:a05:6000:1287:: with SMTP id f7mr17243853wrx.203.1551792787222; Tue, 05 Mar 2019 05:33:07 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-18-114.w90-86.abo.wanadoo.fr. [90.86.221.114]) by smtp.gmail.com with ESMTPSA id i4sm8370097wrw.19.2019.03.05.05.33.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:06 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 5 Mar 2019 14:32:47 +0100 Message-Id: <20190305133248.4828-10-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190305133248.4828-1-ard.biesheuvel@linaro.org> References: <20190305133248.4828-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH 09/10] StandaloneMmPkg/Core: remove legacy boot support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Remove the support for booting 'legacy' (i.e., non-UEFI boot) OSes. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- StandaloneMmPkg/Core/StandaloneMmCore.h | 22 ---- StandaloneMmPkg/Core/StandaloneMmCore.c | 124 ++++++-------------- 2 files changed, 33 insertions(+), 113 deletions(-) -- 2.20.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Jiewen.yao@intel.com Reviewed-by: achin.gupta@arm.com diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.h b/StandaloneMmPkg/Core/StandaloneMmCore.h index 74338dc9da0d..5d336b3dbbf6 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.h +++ b/StandaloneMmPkg/Core/StandaloneMmCore.h @@ -635,28 +635,6 @@ MmDriverDispatchHandler ( @return Status Code -**/ -EFI_STATUS -EFIAPI -MmLegacyBootHandler ( - IN EFI_HANDLE DispatchHandle, - IN CONST VOID *Context, OPTIONAL - IN OUT VOID *CommBuffer, OPTIONAL - IN OUT UINTN *CommBufferSize OPTIONAL - ); - -/** - This function is the main entry point for an MM handler dispatch - or communicate-based callback. - - @param DispatchHandle The unique handle assigned to this handler by MmiHandlerRegister(). - @param Context Points to an optional handler context which was specified when the handler was registered. - @param CommBuffer A pointer to a collection of data in memory that will - be conveyed from a non-MM environment into an MM environment. - @param CommBufferSize The size of the CommBuffer. - - @return Status Code - **/ EFI_STATUS EFIAPI diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.c b/StandaloneMmPkg/Core/StandaloneMmCore.c index 766cdb5c848c..fb6b3055e9c6 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.c +++ b/StandaloneMmPkg/Core/StandaloneMmCore.c @@ -87,21 +87,12 @@ EFI_MM_SYSTEM_TABLE gMmCoreMmst = { MmiHandlerUnRegister }; -// -// Flag to determine if the platform has performed a legacy boot. -// If this flag is TRUE, then the runtime code and runtime data associated with the -// MM IPL are converted to free memory, so the MM Core must guarantee that is -// does not touch of the code/data associated with the MM IPL if this flag is TRUE. -// -BOOLEAN mInLegacyBoot = FALSE; - // // Table of MMI Handlers that are registered by the MM Core when it is initialized // MM_CORE_MMI_HANDLERS mMmCoreMmiHandlers[] = { { MmReadyToLockHandler, &gEfiDxeMmReadyToLockProtocolGuid, NULL, TRUE }, { MmEndOfDxeHandler, &gEfiEndOfDxeEventGroupGuid, NULL, FALSE }, - { MmLegacyBootHandler, &gEfiEventLegacyBootGuid, NULL, FALSE }, { MmExitBootServiceHandler,&gEfiEventExitBootServicesGuid, NULL, FALSE }, { MmReadyToBootHandler, &gEfiEventReadyToBootGuid, NULL, FALSE }, { NULL, NULL, NULL, FALSE }, @@ -142,47 +133,6 @@ MmEfiNotAvailableYetArg5 ( return EFI_NOT_AVAILABLE_YET; } -/** - Software MMI handler that is called when a Legacy Boot event is signaled. The MM - Core uses this signal to know that a Legacy Boot has been performed and that - gMmCorePrivate that is shared between the UEFI and MM execution environments can - not be accessed from MM anymore since that structure is considered free memory by - a legacy OS. - - @param DispatchHandle The unique handle assigned to this handler by MmiHandlerRegister(). - @param Context Points to an optional handler context which was specified when the handler was registered. - @param CommBuffer A pointer to a collection of data in memory that will - be conveyed from a non-MM environment into an MM environment. - @param CommBufferSize The size of the CommBuffer. - - @return Status Code - -**/ -EFI_STATUS -EFIAPI -MmLegacyBootHandler ( - IN EFI_HANDLE DispatchHandle, - IN CONST VOID *Context, OPTIONAL - IN OUT VOID *CommBuffer, OPTIONAL - IN OUT UINTN *CommBufferSize OPTIONAL - ) -{ - EFI_HANDLE MmHandle; - EFI_STATUS Status = EFI_SUCCESS; - - if (!mInLegacyBoot) { - MmHandle = NULL; - Status = MmInstallProtocolInterface ( - &MmHandle, - &gEfiEventLegacyBootGuid, - EFI_NATIVE_INTERFACE, - NULL - ); - } - mInLegacyBoot = TRUE; - return Status; -} - /** Software MMI handler that is called when a ExitBoot Service event is signaled. @@ -396,7 +346,6 @@ MmEntryPoint ( { EFI_STATUS Status; EFI_MM_COMMUNICATE_HEADER *CommunicateHeader; - BOOLEAN InLegacyBoot; DEBUG ((DEBUG_INFO, "MmEntryPoint ...\n")); @@ -413,44 +362,42 @@ MmEntryPoint ( // // If a legacy boot has occured, then make sure gMmCorePrivate is not accessed // - InLegacyBoot = mInLegacyBoot; - if (!InLegacyBoot) { - // - // TBD: Mark the InMm flag as TRUE - // - gMmCorePrivate->InMm = TRUE; + // + // TBD: Mark the InMm flag as TRUE + // + gMmCorePrivate->InMm = TRUE; + + // + // Check to see if this is a Synchronous MMI sent through the MM Communication + // Protocol or an Asynchronous MMI + // + if (gMmCorePrivate->CommunicationBuffer != 0) { // - // Check to see if this is a Synchronous MMI sent through the MM Communication - // Protocol or an Asynchronous MMI + // Synchronous MMI for MM Core or request from Communicate protocol // - if (gMmCorePrivate->CommunicationBuffer != 0) { + if (!MmIsBufferOutsideMmValid ((UINTN)gMmCorePrivate->CommunicationBuffer, gMmCorePrivate->BufferSize)) { + // + // If CommunicationBuffer is not in valid address scope, return EFI_INVALID_PARAMETER + // + gMmCorePrivate->CommunicationBuffer = 0; + gMmCorePrivate->ReturnStatus = EFI_INVALID_PARAMETER; + } else { + CommunicateHeader = (EFI_MM_COMMUNICATE_HEADER *)(UINTN)gMmCorePrivate->CommunicationBuffer; + gMmCorePrivate->BufferSize -= OFFSET_OF (EFI_MM_COMMUNICATE_HEADER, Data); + Status = MmiManage ( + &CommunicateHeader->HeaderGuid, + NULL, + CommunicateHeader->Data, + (UINTN *)&gMmCorePrivate->BufferSize + ); // - // Synchronous MMI for MM Core or request from Communicate protocol + // Update CommunicationBuffer, BufferSize and ReturnStatus + // Communicate service finished, reset the pointer to CommBuffer to NULL // - if (!MmIsBufferOutsideMmValid ((UINTN)gMmCorePrivate->CommunicationBuffer, gMmCorePrivate->BufferSize)) { - // - // If CommunicationBuffer is not in valid address scope, return EFI_INVALID_PARAMETER - // - gMmCorePrivate->CommunicationBuffer = 0; - gMmCorePrivate->ReturnStatus = EFI_INVALID_PARAMETER; - } else { - CommunicateHeader = (EFI_MM_COMMUNICATE_HEADER *)(UINTN)gMmCorePrivate->CommunicationBuffer; - gMmCorePrivate->BufferSize -= OFFSET_OF (EFI_MM_COMMUNICATE_HEADER, Data); - Status = MmiManage ( - &CommunicateHeader->HeaderGuid, - NULL, - CommunicateHeader->Data, - (UINTN *)&gMmCorePrivate->BufferSize - ); - // - // Update CommunicationBuffer, BufferSize and ReturnStatus - // Communicate service finished, reset the pointer to CommBuffer to NULL - // - gMmCorePrivate->BufferSize += OFFSET_OF (EFI_MM_COMMUNICATE_HEADER, Data); - gMmCorePrivate->CommunicationBuffer = 0; - gMmCorePrivate->ReturnStatus = (Status == EFI_SUCCESS) ? EFI_SUCCESS : EFI_NOT_FOUND; - } + gMmCorePrivate->BufferSize += OFFSET_OF (EFI_MM_COMMUNICATE_HEADER, Data); + gMmCorePrivate->CommunicationBuffer = 0; + gMmCorePrivate->ReturnStatus = (Status == EFI_SUCCESS) ? EFI_SUCCESS : EFI_NOT_FOUND; } } @@ -464,14 +411,9 @@ MmEntryPoint ( // // - // If a legacy boot has occured, then make sure gMmCorePrivate is not accessed + // Clear the InMm flag as we are going to leave MM // - if (!InLegacyBoot) { - // - // Clear the InMm flag as we are going to leave MM - // - gMmCorePrivate->InMm = FALSE; - } + gMmCorePrivate->InMm = FALSE; DEBUG ((DEBUG_INFO, "MmEntryPoint Done\n")); } From patchwork Tue Mar 5 13:32:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 159662 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4975363jad; Tue, 5 Mar 2019 05:33:35 -0800 (PST) X-Google-Smtp-Source: APXvYqwbE3iGNjlNUpVankNm68QnKCeB4GeNWxg0HFFw4e9D9YJEnxXdi9PfseqM2oVG2InzTWnL X-Received: by 2002:a63:e90f:: with SMTP id i15mr1429091pgh.430.1551792815465; Tue, 05 Mar 2019 05:33:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551792815; cv=none; d=google.com; s=arc-20160816; b=v+HypNtaU8MqGwmylYlDpHeWK5jsTUjHyFqUP0YmkuFqMfMysBiYgveAA6tBCADaMd HTRLnh55U3GLMZIqdjFw5yili6PH8kptX7MlDq3UgniCQQjHkTrmTnqgUmIBvePBIhCE IzqLKMlVxqi0RZFcC7gHm9BWGIPvk9sk0TIwrqID1mZReRqnjCvuIoni1MAHrLjbtbCR bEGYjwLbFKodTUgUHGwLotAKEFu/WXVlfXaVsstVcEhXoVwiTJV2Vd8Cc2UDhEY2CGID nOy4Tkq3AmY+f5e7UY5nIvxDcT21b7I5nr88EdUD6fpFhUFIudOPBnxA0X91AvjCcVsT suiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=QnZmDSIZnwpLsFwxuDTM4XS02i/AVi1p8+Z+RAG0xbE=; b=LVa70ZjRraSjCDWLcazja/5NYprf71OCkEsJ1ubgwMbIEWTUakbUHOp2XTKA+psUPN dN4Q2cVoU9WaW18aRVtHoSgylm1vCi1k4Ger580a4PmnIn+15lVAddAb8Ec2iwOKH2LB er2Z9Y7O2b3oavRc9XNYJn8BFpdyrL5tCWWNMVNzhCkhIiAfzz3MuZBDBlK3mFQ6vmBG MKkzg09xM4QirsJTmbU5CzAB91LNvnmLssNymnSRl8IJx3wxz2iA/SMy73X9tb2GN+DX t/TZFHHY7Fdx1ShsSShp9GkLxsWhaqfMXu0RQ+pm+Fz9Uzm5mHUVvNaj19siIK5ktT6K rV7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=vCsuPcrj; 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 a22si7921796pfn.155.2019.03.05.05.33.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:35 -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=vCsuPcrj; 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 DB24B211D5061; Tue, 5 Mar 2019 05:33:11 -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=2a00:1450:4864:20::343; helo=mail-wm1-x343.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (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 97E7F211D5070 for ; Tue, 5 Mar 2019 05:33:10 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id q187so2586919wme.5 for ; Tue, 05 Mar 2019 05:33:10 -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 :mime-version:content-transfer-encoding; bh=izJnbqx20UwVWwK2MOV2iHPnjnuq9uWru5WIPMCwKvg=; b=vCsuPcrjrqvm1A9OEllWgUFBNYCQ/dnX3nAnOYnxRLeN7tx2CPfMFvw5C15OrK2oyK 1XJfR9DvdjBRF4qN26MdODranaq+MRtRV9671QoVZKOl7lfX2bAfsbC83R8ZSZEifq23 yaNOQKb6Yzk5uJFMEJtitRaxut/SvhpYkTAK+UTWrli7UqfhBJP81hdTL7dx1LNsJW86 8OEN+w7FGUqYnoyxSqi3ZEy1vp0Pm4sUhHzEgXCbDoc2JLyUuJhn6vwDNA7S1c/NGJ1v N3VcqLAnv/ZuqRHZxnqytaQZ8pBuXvLLtc3oao0Gr92iIKLLPYM0izpHuctbY8jU6Htm pAeA== 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:mime-version:content-transfer-encoding; bh=izJnbqx20UwVWwK2MOV2iHPnjnuq9uWru5WIPMCwKvg=; b=Crcz1ZK4bDvZ97iel9I2cd57AbCGE54xHOH0Nd0w3kxVw8LYCykkUepiGzCID+/i8V Z/xrrneuu62+U18yDs4oYxR+j574oSrPelZRn3Z94z1CFZHS3kqPM/71IZ9mJ5RoLE4Y KlzDPPGoj/XVThjnU/6neJz93de9TiDPCUY0ZD8BurxMuIyFllkocYKZ0XcXOH6xe1t/ YN0TY65K7BzpPn71FolIhdpN9N+210+adamygSxWnFEd3Te8lkL2RGqlChygTy8l3HmL N/S0me2/G8RkPwZEJwv9oJ4qGw29/gQkuWlJAXpEK1DDPZhy/wFzK+HUf4EzrDykZPIh Lp2w== X-Gm-Message-State: APjAAAUTp+7NCskqVBRHTyHqex/tDDNqhCSRXBHxh3eViGJU6MSc7wr0 k1vTb+Q0G4IMvwg/VH74h09X6+Wpfkc= X-Received: by 2002:a1c:cf41:: with SMTP id f62mr2907316wmg.1.1551792788860; Tue, 05 Mar 2019 05:33:08 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-18-114.w90-86.abo.wanadoo.fr. [90.86.221.114]) by smtp.gmail.com with ESMTPSA id i4sm8370097wrw.19.2019.03.05.05.33.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:07 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 5 Mar 2019 14:32:48 +0100 Message-Id: <20190305133248.4828-11-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190305133248.4828-1-ard.biesheuvel@linaro.org> References: <20190305133248.4828-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH 10/10] ArmPkg/MmCommunicationDxe: signal architected PI events into MM context X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" PI defines a few architected events that have significance in the MM context as well as in the non-secure DXE context. So register notify handlers for these events, and relay them into the standalone MM world. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf | 5 +++ ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c | 47 +++++++++++++++++++- 2 files changed, 50 insertions(+), 2 deletions(-) -- 2.20.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Jiewen.yao@intel.com Reviewed-by: achin.gupta@arm.com diff --git a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf index 88beafa39c05..8bf269270f9d 100644 --- a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf +++ b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf @@ -48,6 +48,11 @@ [LibraryClasses] [Protocols] gEfiMmCommunicationProtocolGuid ## PRODUCES +[Guids] + gEfiEndOfDxeEventGroupGuid + gEfiEventExitBootServicesGuid + gEfiEventReadyToBootGuid + [Pcd.common] gArmTokenSpaceGuid.PcdMmBufferBase gArmTokenSpaceGuid.PcdMmBufferSize diff --git a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c index feb9fa9f4ead..3203cf801a19 100644 --- a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c +++ b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c @@ -265,6 +265,43 @@ GetMmCompatibility () return Status; } +STATIC EFI_GUID* CONST mGuidedEventGuid[] = { + &gEfiEndOfDxeEventGroupGuid, + &gEfiEventExitBootServicesGuid, + &gEfiEventReadyToBootGuid, +}; + +STATIC EFI_EVENT mGuidedEvent[ARRAY_SIZE (mGuidedEventGuid)]; + +/** + Event notification that is fired when GUIDed Event Group is signaled. + + @param Event The Event that is being processed, not used. + @param Context Event Context, not used. + +**/ +STATIC +VOID +EFIAPI +MmGuidedEventNotify ( + IN EFI_EVENT Event, + IN VOID *Context + ) +{ + EFI_MM_COMMUNICATE_HEADER Header; + UINTN Size; + + // + // Use Guid to initialize EFI_SMM_COMMUNICATE_HEADER structure + // + CopyGuid (&Header.HeaderGuid, Context); + Header.MessageLength = 1; + Header.Data[0] = 0; + + Size = sizeof (Header); + MmCommunicationCommunicate (&mMmCommunication, &Header, &Size); +} + /** The Entry Point for MM Communication @@ -287,6 +324,7 @@ MmCommunicationInitialize ( ) { EFI_STATUS Status; + UINTN Index; // Check if we can make the MM call Status = GetMmCompatibility (); @@ -351,8 +389,13 @@ MmCommunicationInitialize ( NULL, &mSetVirtualAddressMapEvent ); - if (Status == EFI_SUCCESS) { - return Status; + ASSERT_EFI_ERROR (Status); + + for (Index = 0; Index < ARRAY_SIZE (mGuidedEventGuid); Index++) { + Status = gBS->CreateEventEx (EVT_NOTIFY_SIGNAL, TPL_CALLBACK, + MmGuidedEventNotify, mGuidedEventGuid[Index], + mGuidedEventGuid[Index], &mGuidedEvent[Index]); + ASSERT_EFI_ERROR (Status); } gBS->UninstallProtocolInterface (