https://bugs.linaro.org/show_bug.cgi?id=4345
Code can also be found in github: https://github.com/hisilicon/OpenPlatformPkg.git branch: d05-mac-issue
Ming Huang (1): Hisilicon/Silicon: Add dependence for AcpiPlatformDxe
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(-)
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 ming.huang@linaro.org --- 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; }
On Tue, Apr 16, 2019 at 11:16:45PM +0800, Ming Huang wrote:
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 ming.huang@linaro.org
Reviewed-by: Leif Lindholm leif.lindholm@linaro.org Pushed as 155d96478b.
(Also cherry-picked into Linaro 19.03 firmware release.)
Thanks!
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;
} -- 2.9.5