在 2020/5/27 1:40, Leif Lindholm 写道:
> Please call your patches PATCH. RFC is when a potential solution
> is put up for discussion, not for changing platform code.
Modify it in v2.
>
> 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.
Modify it in v2.
>
>>
>> Signed-off-by: Ming Huang <huangmin...@huawei.com>
>> ---
>> 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.<BR>
>> - Copyright (c) 2015, Hisilicon Limited. All rights reserved.<BR>
>> - Copyright (c) 2015, Linaro Limited. All rights reserved.<BR>
>> + Copyright (c) 2014 - 2020, Applied Micro Curcuit Corporation. All rights
>> reserved.<BR>
>> + Copyright (c) 2015 - 2020, Hisilicon Limited. All rights reserved.<BR>
>> + Copyright (c) 2015 - 2020, Linaro Limited. All rights reserved.<BR>
>
> Only the Hisilicon copyright should be updated (or a Huawei one added,
> given that this is the address used for submitting).
Ok, just modify Hisilicon copyright in v2.
Thanks,
Ming
>
> /
> Leif
>
>> SPDX-License-Identifier: BSD-2-Clause-Patent
>>
>> **/
>> @@ -23,6 +23,38 @@
>> #include <IndustryStandard/AcpiAml.h>
>> #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
>>
>
> .
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#60352): https://edk2.groups.io/g/devel/message/60352
Mute This Topic: https://groups.io/mt/74377144/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-