From patchwork Tue Apr 16 15:16:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Huang X-Patchwork-Id: 162348 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4344629jan; Tue, 16 Apr 2019 08:18:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgilLOZMCBvLDZo24CHK5VJF/DfB2MMr9ukCDdE/ecnkvu4GOAY34VaJ5bhMNkgNxgytjg X-Received: by 2002:ac8:f74:: with SMTP id l49mr27140812qtk.117.1555427903302; Tue, 16 Apr 2019 08:18:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555427903; cv=none; d=google.com; s=arc-20160816; b=Qk7McWaujVJKA7dEtBbaKt1OorRJ+U40wM0luzk5n7NBHw2MSc09ZDSeo4mvOCpnp5 wr2xwrf2WhcAk56DsNchJr1537FH/nHLeeprMHHRVRwLMLVQlQormAqUfncXFHqnWLVB IFIPenMhs/LMP0WnDUgZDMpoz1zZKMBE/x6veOt9/xk+rx/Zi+e/0PEfmjq2/xGSZ9sJ PB/CPyz7nVCNSTYybgNH67w/kUhgxcHrJQGswjfE4uRkPBlc3wX887+/enEJiI8s0q5z RqEHxBX42gxst8YIBI4y9z0/48/FPTZrjiUqi/vq+TMw9sgChulElOR6MF2jT2b/AM7D 3U2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:delivered-to; bh=OXHeotyuBD5PAbDjAloMqLgjuh6cdfDgfrlsNvNTGI8=; b=MZmiTM3uC3th38v/wukL6Vhkupj7o1Nonw1nm6+IOASnO3trVneiyBCpPj1fpCRIih vhPI9vKBZ51UwksmXD87zB/mXl0NmS2J6EQcVJzCwkLjfSqm+UygOJheCZpSABDb07V+ obY7iArZyfq0XhlLTN4e/7ASn04DtW3w4doINO4HTFdCBvul8L26Cmz0ZCW6Wvhnt3XF G7+spke4e/JszGGCkrn/RqVwGX4oF7zRDh8OYcOxOYqcdnrqXfctmDd1FYWLPGJWOczv LzclOgfke+VR1DBrrwOCC4aNtz3MgJP8j3fi4LmYtNQN6HNqdJ/UMApBfsXGM7qSKrg/ H0mg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.158.76.221 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (ec2-54-158-76-221.compute-1.amazonaws.com. [54.158.76.221]) by mx.google.com with ESMTPS id l37si435935qtf.327.2019.04.16.08.18.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Apr 2019 08:18:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.158.76.221 as permitted sender) client-ip=54.158.76.221; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.158.76.221 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from lists.linaro.org (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 8348561891; Tue, 16 Apr 2019 15:18:21 +0000 (UTC) Received: by lists.linaro.org (Postfix, from userid 109) id 6B862618AE; Tue, 16 Apr 2019 15:18:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ip-10-150-125-211.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.2 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 9771761896; Tue, 16 Apr 2019 15:18:15 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: from lists.linaro.org (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 9F55961724 for ; Tue, 16 Apr 2019 15:18:06 +0000 (UTC) Received: by lists.linaro.org (Postfix, from userid 109) id 9041A618AE; Tue, 16 Apr 2019 15:18:06 +0000 (UTC) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by lists.linaro.org (Postfix) with ESMTPS id 42BFF61892 for ; Tue, 16 Apr 2019 15:18:01 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id cv12so10514215plb.9 for ; Tue, 16 Apr 2019 08:18:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Rpf6mYVwmXoS00cYEc9+c4JONje3P7KCZmDon4F16jk=; b=YBRh3WcxDue28IjlRIzDFhqOG1RwfoGvE6r1TLgpgagQO1QgOaJIuTJeFAl9VR53NY tisHnqR5hW6KSO5Cdi7ysHsNmQxNIKnJtDuBKzIbWKAcVZ4VQ77fkHWCc2xnuPh3d3Pv FhW0ouela23aaKWA9Yhb0Y14s0E+ZVUZ29btSHKuUwKLcaL8cVLdT5jGq/0Wf0hVs4C8 TPqaNS8wabFKEYrF1OQEre9U648eUZ8z4fbxIcMjcJwU3uStMC5wtwFhYJeJu74WvWdP eC5hL9r5qPpRCP6vKnRW/dR4DQt7/pbFDVspLcb/pkN6h5UNuydBTEXDxw4J4NB7QmV1 QZag== X-Gm-Message-State: APjAAAXPwNNcnKJgeQ+0He549bYJIMpOYpSU0GpdB9A5YEydjToU5NvF eUr7YxQrT4fXCxydKH7XmGHKtwii X-Received: by 2002:a17:902:8a4:: with SMTP id 33mr83913070pll.7.1555427880482; Tue, 16 Apr 2019 08:18:00 -0700 (PDT) Received: from localhost.localdomain ([114.119.4.74]) by smtp.gmail.com with ESMTPSA id n5sm60566728pgp.80.2019.04.16.08.17.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Apr 2019 08:17:59 -0700 (PDT) From: Ming Huang To: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org Date: Tue, 16 Apr 2019 23:16:45 +0800 Message-Id: <20190416151645.33624-2-ming.huang@linaro.org> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20190416151645.33624-1-ming.huang@linaro.org> References: <20190416151645.33624-1-ming.huang@linaro.org> X-Virus-Scanned: ClamAV using ClamSMTP Cc: huangming23@huawei.com, john.garry@huawei.com, xiaojun2@hisilicon.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, zhangfeng56@huawei.com, michael.d.kinney@intel.com, lersek@redhat.com, wanghuiqiang@huawei.com Subject: [Linaro-uefi] [PATCH edk2-platforms v1 1/1] Hisilicon/Silicon: Add dependence for AcpiPlatformDxe X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "For discussions about Linaro-related UEFI development. Not a substitute for edk2-devel." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" X-Virus-Scanned: ClamAV using ClamSMTP As AcpiPlatformDxe/AcpiPlatformDxe intend to update some fields of DSDT of ACPI, it should be ran after HisiAcpiPlatformDxe which will install ACPI tables, so add dependenc to insure the order. This order break by commit 253809c906f7: "Hisilicon/D06: Add Hi1620OemConfigUiLib". This patch also fix issue: https://bugs.linaro.org/show_bug.cgi?id=435 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ming Huang Reviewed-by: Leif Lindholm --- Silicon/Hisilicon/HisiPkg.dec | 1 + Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf | 2 +- Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf | 1 + Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatform.c | 12 +++++++++++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Silicon/Hisilicon/HisiPkg.dec b/Silicon/Hisilicon/HisiPkg.dec index 404a3ae4af9d..30b2226b0461 100644 --- a/Silicon/Hisilicon/HisiPkg.dec +++ b/Silicon/Hisilicon/HisiPkg.dec @@ -39,6 +39,7 @@ [Protocols] gPlatformSasProtocolGuid = {0x40e9829f, 0x3a2c, 0x479a, {0x9a, 0x93, 0x45, 0x7d, 0x13, 0x50, 0x96, 0x5d}} gHisiPlatformSasProtocolGuid = {0x20e9829f, 0x3a2c, 0x479a, {0x9a, 0x93, 0x45, 0x7d, 0x13, 0x50, 0x96, 0x6d}} gHisiSnpPlatformProtocolGuid = {0x81321f27, 0xff58, 0x4a1d, {0x99, 0x97, 0xd, 0xcc, 0xfa, 0x82, 0xf4, 0x6f}} + gHisiInstalledAcpiProtocolGuid = {0x31505f6a, 0xe496, 0x4c7e, {0xba, 0xbb, 0x71, 0x7b, 0xe2, 0xc4, 0xb4, 0x59}} [Guids] gHisiTokenSpaceGuid = {0xc8bc553e, 0x12bf, 0x11e6, {0x97, 0x4f, 0x87, 0xf7, 0x7c, 0xfd, 0x52, 0x1d}} diff --git a/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf b/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf index 5209f318014c..171583bee01f 100644 --- a/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf +++ b/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf @@ -68,5 +68,5 @@ [FixedPcd] gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision [Depex] - gEfiAcpiTableProtocolGuid AND gEfiAcpiSdtProtocolGuid AND gHisiBoardNicProtocolGuid + gEfiAcpiTableProtocolGuid AND gEfiAcpiSdtProtocolGuid AND gHisiBoardNicProtocolGuid AND gHisiInstalledAcpiProtocolGuid diff --git a/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf b/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf index 3d133aff8533..f166d7672be1 100644 --- a/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf +++ b/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf @@ -48,6 +48,7 @@ [LibraryClasses] [Protocols] gEfiAcpiTableProtocolGuid ## CONSUMES + gHisiInstalledAcpiProtocolGuid ## CONSUMES [Guids] gHisiEfiMemoryMapGuid diff --git a/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatform.c b/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatform.c index c8b56e1bd1dd..a26060ef4c86 100644 --- a/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatform.c +++ b/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatform.c @@ -264,6 +264,16 @@ AcpiPlatformEntryPoint ( } } - return EFI_SUCCESS; + Status = gBS->InstallProtocolInterface ( + &ImageHandle, + &gHisiInstalledAcpiProtocolGuid, + EFI_NATIVE_INTERFACE, + NULL + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Install protocol %r\n", Status)); + } + + return Status; }