From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web10.652.1591637010405773495 for ; Mon, 08 Jun 2020 10:23:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=UmjLCZDv; spf=pass (domain: nuviainc.com, ip: 209.85.221.66, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f66.google.com with SMTP id q11so18307839wrp.3 for ; Mon, 08 Jun 2020 10:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vCZuEyL9uZCrLd6nxflPEOIA9tILQFzEAWP80CWiCBU=; b=UmjLCZDvTztPhasmLRCXWD8/Aluq39SO57GivEtP8UNRTIf5KOmdk8y1z81Ni3O64/ fHbyrkeanVZRQ0LWKh3cMKvmeT4qrcrRtzmQAfPh8g18zxexIabx8V7E/v+ZqucpO3nb DXGKKJEYJyQ8jdB//Ujc5cGry6xdG+QlarNdoFedtzBQ2j1xqDWpqiB5Mfkrzy1A4mTQ LrvigPd41MlyysRCfxP2vUDplDs3tbaRvE6+VUsFMbVbxuPhR6In1sPiycgoHhV6/K9I 1mTYrygajRS4hRK8DpDxr6VFLkRedMiIOeOtzDdgMOfMHKz9fLlJ8xD7kcgmwZizjbwu etcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vCZuEyL9uZCrLd6nxflPEOIA9tILQFzEAWP80CWiCBU=; b=R6sxKBommrBxrbVH7c/fwICgt3QE8f9uS/F9AC8oifRhj+GzsrGj0idcmYlH9X+LUZ l7wOn8JYKJazjeVdtEUoSCFHqqlTQEckncOXAW/uLGlcQBabsoYff341hHZNV7JrHwz0 xRCETxBLGBQvmlySn4sD6Vco3zWGUDt5iRxQrZ6csXnVmqPhBxhIvUL7O3nfWUvXLflY +lx9AZafyEYPk1MjLe+5E3OaPuL2onXhzl11KWY1yt2YVoXIg5Do+sXdPuvbBedi1LPm 2k9HGCrBv4Ix+/4gwFrIl/a7ENH2lP5C6hAUe/2ABGrIyOS/KS9Z4J1FBWBAmLW0mAVE aRXA== X-Gm-Message-State: AOAM5317su5tTEVNjsDwuBFJce1+g/nrNZtyiIS/FA4Lyytfy5u9D9+F QhSX+k+uDh86IxH6WwlRQFhpn+NNz8xQJ+IgqtmVN3aJDJ8ErdE0VFYfq4HvabcMlqGZ4UeIDlH 3YHh/kxmYEx8b7CaYzvVDc8x6R1ObO4W8kHbr26oKBiQ3l9J8mHh+TQ1OJLZXM00= X-Google-Smtp-Source: ABdhPJxKauIjxUrHYWpabXkjBy0Cs5IzeKOxnZQC0cgv0W9+HgBRzDN60Xh81xFXI3+wu9nhF54Ogg== X-Received: by 2002:adf:f245:: with SMTP id b5mr24047478wrp.303.1591637008663; Mon, 08 Jun 2020 10:23:28 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id z8sm391974wru.33.2020.06.08.10.23.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 10:23:28 -0700 (PDT) Date: Mon, 8 Jun 2020 18:23:26 +0100 From: "Leif Lindholm" To: devel@edk2.groups.io, huangming23@huawei.com Cc: jian.j.wang@intel.com, hao.a.wu@intel.com, liming.gao@intel.com, lidongzhan@huawei.com, songdongkuang@huawei.com, wanghuiqiang@huawei.com, qiuliangen@huawei.com, shenlimei@huawei.com Subject: Re: [edk2-devel] [PATCH edk2 v2 1/5] Silicon/Hisilicon: Change updating dsdt in ready to boot event Message-ID: <20200608172326.GW28566@vanye> References: <1590590038-19724-1-git-send-email-huangming23@huawei.com> <1590590038-19724-2-git-send-email-huangming23@huawei.com> MIME-Version: 1.0 In-Reply-To: <1590590038-19724-2-git-send-email-huangming23@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 27, 2020 at 22:33:54 +0800, Ming Huang wrote: > 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/Silicon/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 > > Copyright (c) 2014, Applied Micro Curcuit Corporation. 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 > > @@ -23,6 +23,38 @@ > #include > #include "EthMac.h" > > +EFI_EVENT mUpdateAcpiDsdtTableEvent; > + > +VOID > +EFIAPI > +UpdateAcpiDsdt ( > + IN EFI_EVENT Event, > + IN VOID *Context > + ) > +{ > + EFI_ACPI_TABLE_PROTOCOL *AcpiTableProtocol; > + EFI_STATUS Status; > + > + Status = gBS->LocateProtocol ( > + &gEfiAcpiTableProtocolGuid, > + NULL, > + (VOID**)&AcpiTableProtocol > + ); > + > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, " Unable to locate ACPI table protocol\n")); > + return; > + } > + > + Status = EthMacInit (); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, " UpdateAcpiDsdtTable Failed, Status = %r\n", Status)); > + } > + > + 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 = gBS->CreateEventEx ( > + EVT_NOTIFY_SIGNAL, > + TPL_CALLBACK, > + UpdateAcpiDsdt, > + NULL, > + &gEfiEventReadyToBootGuid, > + &mUpdateAcpiDsdtTableEvent > + ); > + > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "Create ReadyToBoot event for UpdateAcpiDsdt failed.\n")); > + } else { > + DEBUG ((DEBUG_INFO, "Create ReadyToBoot event for UpdateAcpiDsdt success.\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 > > [Depex] > - gEfiAcpiTableProtocolGuid AND gEfiAcpiSdtProtocolGuid AND gHisiBoardNicProtocolGuid AND gHisiInstalledAcpiProtocolGuid > + TRUE > > -- > 2.8.1 > > > >