From nobody Mon Feb 9 12:43:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+60968+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60968+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1591709401; cv=none; d=zohomail.com; s=zohoarc; b=I99d01u8huMgLQFKX2xoRUjBrDf1UdHw9uaWZ35fQw69glQ4O6iwB7oGgXTzGQuLcU/LEdX8i3GNVmE2LTtOg3fi0LQwCRgaxpk+yf18ULyNqYKoPTJ6tIpoSO4Fs1v6ReVPoCbB5LWiUXG5N9bHWDGJbUXU1aqNLAVFS4Tq5Vg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591709401; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=X3NVmrSfyeNO9karii3jXP22qWUhurTw4tzXue5wl2Y=; b=QllF4Wx4NOQ1vL6SeMHZkuosYvS0txhSOATOcRYup5SRxBCvcvDBxLr7WpHbz7xlsMgbUHD3x4Hd+Y4NNlowBU/AAOHyM2/FmJGTaFrCuvUqSy7iugIxLLLysyU3UhvnAHTd1rJTofrwVjtOy4HXQOpglb5IfFYUK3FWJqYAgOU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60968+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1591709401056785.3292771910468; Tue, 9 Jun 2020 06:30:01 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fcaWYY1788612xTZtrFzLBcF; Tue, 09 Jun 2020 06:30:00 -0700 X-Received: from huawei.com (huawei.com [45.249.212.35]) by mx.groups.io with SMTP id smtpd.web11.7148.1591709399927201458 for ; Tue, 09 Jun 2020 06:30:00 -0700 X-Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 062A37E92A2B87368A37; Tue, 9 Jun 2020 21:29:58 +0800 (CST) X-Received: from HGH1000039998.huawei.com (10.184.68.188) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Tue, 9 Jun 2020 21:29:51 +0800 From: "Ming Huang" To: , , CC: , , , , , , Subject: [edk2-devel] [PATCH edk2-platforms v3 1/4] Silicon/Hisilicon: Change updating dsdt in ready to boot event Date: Tue, 9 Jun 2020 21:27:22 +0800 Message-ID: <1591709245-44527-2-git-send-email-huangming23@huawei.com> In-Reply-To: <1591709245-44527-1-git-send-email-huangming23@huawei.com> References: <1591709245-44527-1-git-send-email-huangming23@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.184.68.188] X-CFilter-Loop: Reflected Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,huangming23@huawei.com X-Gm-Message-State: 0gKT9ZJiY0suO3tEgioGRImZx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1591709400; bh=nsNhTiZRXrUfSH8HtZrH8PDrWPmZE8HR4SEWJVC87A8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=ijhsWKi3ZDkguO7Qi2u110XK3XYew9FzG6foRGQwAPtet2Rp/pKqMcqpetM4aBfeLEA OFVR3risyispn7ppLGQGk6sJSlbK9tRD8QkWaMYGU9+bfcTMX7oebnc0VExBHF1R/cKzz JzUWslHMxnEwm5IDmmQjT68ZJ885kyCR3f8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The dsdt need be updated before boot to OS, so change the updating to ready to boot event and can remove the needless dependence. Signed-off-by: Ming Huang Reviewed-by: Leif Lindholm --- Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatform.c | 56 +++++++= ++++++++++++- Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf | 4 +- 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatform.c b/Sil= icon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatform.c index b888cb1..c45a0bb 100644 --- a/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatform.c +++ b/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatform.c @@ -1,7 +1,7 @@ /** @file =20 Copyright (c) 2014, Applied Micro Curcuit Corporation. All rights reserv= ed.
- Copyright (c) 2015, Hisilicon Limited. All rights reserved.
+ Copyright (c) 2015 - 2020, Hisilicon Limited. All rights reserved.
Copyright (c) 2015, Linaro Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -23,6 +23,38 @@ #include #include "EthMac.h" =20 +EFI_EVENT mUpdateAcpiDsdtTableEvent; + +VOID +EFIAPI +UpdateAcpiDsdt ( + IN EFI_EVENT Event, + IN VOID *Context + ) +{ + EFI_ACPI_TABLE_PROTOCOL *AcpiTableProtocol; + EFI_STATUS Status; + + Status =3D gBS->LocateProtocol ( + &gEfiAcpiTableProtocolGuid, + NULL, + (VOID**)&AcpiTableProtocol + ); + + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, " Unable to locate ACPI table protocol\n")); + return; + } + + Status =3D EthMacInit (); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, " UpdateAcpiDsdtTable Failed, Status =3D %r\n", S= tatus)); + } + + gBS->CloseEvent (Event); + return; +} + EFI_STATUS EFIAPI AcpiPlatformEntryPoint ( @@ -30,5 +62,25 @@ AcpiPlatformEntryPoint ( IN EFI_SYSTEM_TABLE *SystemTable ) { - return EthMacInit(); + EFI_STATUS Status; + + // + // Register notify function + // + Status =3D gBS->CreateEventEx ( + EVT_NOTIFY_SIGNAL, + TPL_CALLBACK, + UpdateAcpiDsdt, + NULL, + &gEfiEventReadyToBootGuid, + &mUpdateAcpiDsdtTableEvent + ); + + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Create ReadyToBoot event for UpdateAcpiDsdt fail= ed.\n")); + } else { + DEBUG ((DEBUG_INFO, "Create ReadyToBoot event for UpdateAcpiDsdt succe= ss.\n")); + } + + return Status; } diff --git a/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf = b/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf index 53da731..866ff75 100644 --- a/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf +++ b/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatformDxe.inf @@ -1,7 +1,7 @@ ## @file # # Copyright (c) 2014, Applied Micro Curcuit Corp. All rights reserved.
-# Copyright (c) 2015, Hisilicon Limited. All rights reserved.
+# Copyright (c) 2015 - 2020, Hisilicon Limited. All rights reserved.
# Copyright (c) 2015, Linaro Limited. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -62,5 +62,5 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision =20 [Depex] - gEfiAcpiTableProtocolGuid AND gEfiAcpiSdtProtocolGuid AND gHisiBoardNicP= rotocolGuid AND gHisiInstalledAcpiProtocolGuid + TRUE =20 --=20 2.8.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#60968): https://edk2.groups.io/g/devel/message/60968 Mute This Topic: https://groups.io/mt/74773826/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-