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.456.1590514805803968571 for ; Tue, 26 May 2020 10:40:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=DSjm6s1r; spf=pass (domain: nuviainc.com, ip: 209.85.221.66, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f66.google.com with SMTP id j16so8826612wrb.7 for ; Tue, 26 May 2020 10:40:05 -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=L7M7I2XQxAhayLy4yWf/NM/6JiI5qBuHCG+fkmel8H8=; b=DSjm6s1rJljDSOlojOKBwi6k8KWaqGrgYDUbop2rQpsPtTNqbe3IYIRROSyro2Oel6 uqKdAY6EOBvzCzKOJrIefTh3XncRoPOoT3hkWcDa7/PQBpQEkFy/ZK000spKzP8y8tSh 5b0XHCeS1XvlxJHie66lz+S02fSRrJImglLHlzc8hMj6RWlW77jqlOgMmyuI2US3svy+ YO8BFMHcFLewecXQprezS1Cd6eVG9O0f3BEtP0uB96oqiysaBNMWLxVCXjbdRfZkuLot Md05hYAEq6l8KKAWL0mx9xsD4IB7oQc6SucEKUunfVChCLBJLJVssEGknl79A09AC+2B It6w== 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=L7M7I2XQxAhayLy4yWf/NM/6JiI5qBuHCG+fkmel8H8=; b=TtZ9phtxshj6hEM67MxVhbUc3H2fCq5vom2enguRjmQS2k8OOPLMhUJAdSBZNRXG7N w5yK8ySB6gJueFJuZJ/A0D+QyBrptKttHbjFWnzq1goOQpPsEHba7NR54CtjXVGDGDbz iHW1GeGRubIO7y0m6JfeHxlYzyfliX09duZoDMZLXw5UDOc/SCM7/GRFz2xzsscuLLxN qN97DiLYLua5mU/H0JiUUUavgY2SN8Z+Pp2KlyyILA+9w8vXzjM2aGBeLkXsHuRrXdvZ M+j8zXM1bQ4z4t3YYz5912umGpRXYKP55NLF9w4gpk/kAyAx0YG7CArxFZbOPMsEJ6pr Lktw== X-Gm-Message-State: AOAM5339zhuciM9JXcW2xc37HzyDjcsX8q0O6i+yyu5FDR6HjASzRGfw Pt9QQbqDfmFj96Ii1JmAk41/Ug== X-Google-Smtp-Source: ABdhPJx4iCpaqHdAqLKshGW5xUHDLWjI19AbDRRgkk8DfIHuZjBMSVqOA1s5xnWeya6MQQJ+WC/IFw== X-Received: by 2002:adf:ecc8:: with SMTP id s8mr19975914wro.279.1590514804371; Tue, 26 May 2020 10:40:04 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id f2sm562047wrg.17.2020.05.26.10.40.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 10:40:04 -0700 (PDT) Date: Tue, 26 May 2020 18:40:01 +0100 From: "Leif Lindholm" To: Ming Huang Cc: devel@edk2.groups.io, ard.biesheuvel@linaro.org, lidongzhan@huawei.com, songdongkuang@huawei.com, wanghuiqiang@huawei.com, qiuliangen@huawei.com Subject: Re: [RFC edk2-platforms v1 1/3] Silicon/Hisilicon: Change updating dsdt in ready to boot event Message-ID: <20200526174001.GN1923@vanye> References: <1590072184-16219-1-git-send-email-huangming23@huawei.com> <1590072184-16219-2-git-send-email-huangming23@huawei.com> MIME-Version: 1.0 In-Reply-To: <1590072184-16219-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 Please call your patches PATCH. RFC is when a potential solution is put up for discussion, not for changing platform code. On Thu, May 21, 2020 at 22:43:02 +0800, Ming Huang wrote: > The better time for updating dsdt is in ready to boot event, > so change the updating time. The commit message should explain *why* it is better. > > Signed-off-by: Ming Huang > --- > Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatform.c | 60 ++++++++++++++++++-- > 1 file changed, 56 insertions(+), 4 deletions(-) > > diff --git a/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatform.c b/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatform.c > index b888cb1..1ab55bc 100644 > --- a/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatform.c > +++ b/Silicon/Hisilicon/Drivers/AcpiPlatformDxe/AcpiPlatform.c > @@ -1,8 +1,8 @@ > /** @file > > - Copyright (c) 2014, Applied Micro Curcuit Corporation. All rights reserved.
> - Copyright (c) 2015, Hisilicon Limited. All rights reserved.
> - Copyright (c) 2015, Linaro Limited. All rights reserved.
> + Copyright (c) 2014 - 2020, Applied Micro Curcuit Corporation. All rights reserved.
> + Copyright (c) 2015 - 2020, Hisilicon Limited. All rights reserved.
> + Copyright (c) 2015 - 2020, Linaro Limited. All rights reserved.
Only the Hisilicon copyright should be updated (or a Huawei one added, given that this is the address used for submitting). / Leif > 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; > } > -- > 2.8.1 >