diff mbox series

[edk2,edk2-platforms,v1,1/6] Hisilicon/D0x: Fix invoke SetMemorySpaceAttributes error bug

Message ID 20180627070443.42886-2-ming.huang@linaro.org
State New
Headers show
Series Improve D0x platforms and bug fix | expand

Commit Message

Ming Huang June 27, 2018, 7:04 a.m. UTC
The edk2 commit bacfd6e let CpuDxe running latter. CpuDxe should run early.
CpuDxe is needed by gDS->SetMemorySpaceAttributes, and
gDS->SetMemorySpaceAttributes is invoked by several drivers.

Add several drives to APRIORI scope for implementing the ordering.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang <ming.huang@linaro.org>

Signed-off-by: Heyi Guo <heyi.guo@linaro.org>

---
 Platform/Hisilicon/D03/D03.fdf | 10 +++++++++-
 Platform/Hisilicon/D05/D05.fdf |  6 +++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

-- 
2.17.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Ard Biesheuvel June 27, 2018, 7:20 a.m. UTC | #1
On 27 June 2018 at 09:04, Ming Huang <ming.huang@linaro.org> wrote:
> The edk2 commit bacfd6e let CpuDxe running latter. CpuDxe should run early.

> CpuDxe is needed by gDS->SetMemorySpaceAttributes, and

> gDS->SetMemorySpaceAttributes is invoked by several drivers.

>

> Add several drives to APRIORI scope for implementing the ordering.

>


Please solve this by adding DEPEXes on gEfiCpuArchProtocolGuid to the
drivers in question.

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Ming Huang <ming.huang@linaro.org>

> Signed-off-by: Heyi Guo <heyi.guo@linaro.org>

> ---

>  Platform/Hisilicon/D03/D03.fdf | 10 +++++++++-

>  Platform/Hisilicon/D05/D05.fdf |  6 +++++-

>  2 files changed, 14 insertions(+), 2 deletions(-)

>

> diff --git a/Platform/Hisilicon/D03/D03.fdf b/Platform/Hisilicon/D03/D03.fdf

> index 1383aa1091..027b53a6cf 100644

> --- a/Platform/Hisilicon/D03/D03.fdf

> +++ b/Platform/Hisilicon/D03/D03.fdf

> @@ -146,6 +146,14 @@ READ_STATUS        = TRUE

>  READ_LOCK_CAP      = TRUE

>  READ_LOCK_STATUS   = TRUE

>

> +  APRIORI DXE {

> +    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf

> +    INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

> +    INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf

> +    INF Platform/Hisilicon/D05/Drivers/SFC/SfcDxeDriver.inf

> +    INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf

> +  }

> +

>    INF MdeModulePkg/Core/Dxe/DxeMain.inf

>    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf

>

> @@ -153,6 +161,7 @@ READ_LOCK_STATUS   = TRUE

>    #

>    # PI DXE Drivers producing Architectural Protocols (EFI Services)

>    #

> +  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

>    INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf

>    INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf

>

> @@ -186,7 +195,6 @@ READ_LOCK_STATUS   = TRUE

>

>    # Simple TextIn/TextOut for UEFI Terminal

>

> -  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

>    INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf

>

>    INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf

> diff --git a/Platform/Hisilicon/D05/D05.fdf b/Platform/Hisilicon/D05/D05.fdf

> index 4503776d63..37d9cc0c18 100644

> --- a/Platform/Hisilicon/D05/D05.fdf

> +++ b/Platform/Hisilicon/D05/D05.fdf

> @@ -148,6 +148,10 @@ READ_LOCK_STATUS   = TRUE

>

>    APRIORI DXE {

>      INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf

> +    INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

> +    INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf

> +    INF Platform/Hisilicon/D05/Drivers/SFC/SfcDxeDriver.inf

> +    INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf

>    }

>

>    INF MdeModulePkg/Core/Dxe/DxeMain.inf

> @@ -157,6 +161,7 @@ READ_LOCK_STATUS   = TRUE

>    #

>    # PI DXE Drivers producing Architectural Protocols (EFI Services)

>    #

> +  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

>    INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf

>    INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf

>

> @@ -190,7 +195,6 @@ READ_LOCK_STATUS   = TRUE

>

>    # Simple TextIn/TextOut for UEFI Terminal

>

> -  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

>    INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf

>

>    INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf

> --

> 2.17.0

>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Ming Huang July 3, 2018, 9:53 a.m. UTC | #2
在 27/06/2018 15:20, Ard Biesheuvel 写道:
> On 27 June 2018 at 09:04, Ming Huang <ming.huang@linaro.org> wrote:
>> The edk2 commit bacfd6e let CpuDxe running latter. CpuDxe should run early.
>> CpuDxe is needed by gDS->SetMemorySpaceAttributes, and
>> gDS->SetMemorySpaceAttributes is invoked by several drivers.
>>
>> Add several drives to APRIORI scope for implementing the ordering.
>>
> 
> Please solve this by adding DEPEXes on gEfiCpuArchProtocolGuid to the
> drivers in question.
> 

If solve this by adding depexes, there are many drivers which should add
depexes.

CpuDxe depend on ArmGicDxe
SfcDxeDriver and RealTimeClockRuntimeDxe depend on CpuDxe
VariableRuntimeDxe depend on SfcDxeDriver
and many other drivers depend on VariableRuntimeDxe
Should I add depexes to these drivers? Especially,RealTimeClockRuntimeDxe
is in edk2/EmbeddedPkg. Why does other platforms do not have this problem?

Thanks.

>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Ming Huang <ming.huang@linaro.org>
>> Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
>> ---
>>  Platform/Hisilicon/D03/D03.fdf | 10 +++++++++-
>>  Platform/Hisilicon/D05/D05.fdf |  6 +++++-
>>  2 files changed, 14 insertions(+), 2 deletions(-)
>>
>> diff --git a/Platform/Hisilicon/D03/D03.fdf b/Platform/Hisilicon/D03/D03.fdf
>> index 1383aa1091..027b53a6cf 100644
>> --- a/Platform/Hisilicon/D03/D03.fdf
>> +++ b/Platform/Hisilicon/D03/D03.fdf
>> @@ -146,6 +146,14 @@ READ_STATUS        = TRUE
>>  READ_LOCK_CAP      = TRUE
>>  READ_LOCK_STATUS   = TRUE
>>
>> +  APRIORI DXE {
>> +    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>> +    INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
>> +    INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
>> +    INF Platform/Hisilicon/D05/Drivers/SFC/SfcDxeDriver.inf
>> +    INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
>> +  }
>> +
>>    INF MdeModulePkg/Core/Dxe/DxeMain.inf
>>    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>>
>> @@ -153,6 +161,7 @@ READ_LOCK_STATUS   = TRUE
>>    #
>>    # PI DXE Drivers producing Architectural Protocols (EFI Services)
>>    #
>> +  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
>>    INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
>>    INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
>>
>> @@ -186,7 +195,6 @@ READ_LOCK_STATUS   = TRUE
>>
>>    # Simple TextIn/TextOut for UEFI Terminal
>>
>> -  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
>>    INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
>>
>>    INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
>> diff --git a/Platform/Hisilicon/D05/D05.fdf b/Platform/Hisilicon/D05/D05.fdf
>> index 4503776d63..37d9cc0c18 100644
>> --- a/Platform/Hisilicon/D05/D05.fdf
>> +++ b/Platform/Hisilicon/D05/D05.fdf
>> @@ -148,6 +148,10 @@ READ_LOCK_STATUS   = TRUE
>>
>>    APRIORI DXE {
>>      INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>> +    INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
>> +    INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
>> +    INF Platform/Hisilicon/D05/Drivers/SFC/SfcDxeDriver.inf
>> +    INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
>>    }
>>
>>    INF MdeModulePkg/Core/Dxe/DxeMain.inf
>> @@ -157,6 +161,7 @@ READ_LOCK_STATUS   = TRUE
>>    #
>>    # PI DXE Drivers producing Architectural Protocols (EFI Services)
>>    #
>> +  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
>>    INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
>>    INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
>>
>> @@ -190,7 +195,6 @@ READ_LOCK_STATUS   = TRUE
>>
>>    # Simple TextIn/TextOut for UEFI Terminal
>>
>> -  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
>>    INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
>>
>>    INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
>> --
>> 2.17.0
>>
Ming Huang July 4, 2018, 6:46 a.m. UTC | #3
在 27/06/2018 15:20, Ard Biesheuvel 写道:
> On 27 June 2018 at 09:04, Ming Huang <ming.huang@linaro.org> wrote:
>> The edk2 commit bacfd6e let CpuDxe running latter. CpuDxe should run early.
>> CpuDxe is needed by gDS->SetMemorySpaceAttributes, and
>> gDS->SetMemorySpaceAttributes is invoked by several drivers.
>>
>> Add several drives to APRIORI scope for implementing the ordering.
>>
> 
> Please solve this by adding DEPEXes on gEfiCpuArchProtocolGuid to the
> drivers in question.
> 

Sorry, I made some mistakes about depandence in previous email.
This issue can solve by adding Depex on gEfiCpuArchProtocolGuid to
RealTimeClockLib and SFCDriver(flash driver).

Thanks.

>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Ming Huang <ming.huang@linaro.org>
>> Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
>> ---
>>  Platform/Hisilicon/D03/D03.fdf | 10 +++++++++-
>>  Platform/Hisilicon/D05/D05.fdf |  6 +++++-
>>  2 files changed, 14 insertions(+), 2 deletions(-)
>>
>> diff --git a/Platform/Hisilicon/D03/D03.fdf b/Platform/Hisilicon/D03/D03.fdf
>> index 1383aa1091..027b53a6cf 100644
>> --- a/Platform/Hisilicon/D03/D03.fdf
>> +++ b/Platform/Hisilicon/D03/D03.fdf
>> @@ -146,6 +146,14 @@ READ_STATUS        = TRUE
>>  READ_LOCK_CAP      = TRUE
>>  READ_LOCK_STATUS   = TRUE
>>
>> +  APRIORI DXE {
>> +    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>> +    INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
>> +    INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
>> +    INF Platform/Hisilicon/D05/Drivers/SFC/SfcDxeDriver.inf
>> +    INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
>> +  }
>> +
>>    INF MdeModulePkg/Core/Dxe/DxeMain.inf
>>    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>>
>> @@ -153,6 +161,7 @@ READ_LOCK_STATUS   = TRUE
>>    #
>>    # PI DXE Drivers producing Architectural Protocols (EFI Services)
>>    #
>> +  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
>>    INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
>>    INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
>>
>> @@ -186,7 +195,6 @@ READ_LOCK_STATUS   = TRUE
>>
>>    # Simple TextIn/TextOut for UEFI Terminal
>>
>> -  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
>>    INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
>>
>>    INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
>> diff --git a/Platform/Hisilicon/D05/D05.fdf b/Platform/Hisilicon/D05/D05.fdf
>> index 4503776d63..37d9cc0c18 100644
>> --- a/Platform/Hisilicon/D05/D05.fdf
>> +++ b/Platform/Hisilicon/D05/D05.fdf
>> @@ -148,6 +148,10 @@ READ_LOCK_STATUS   = TRUE
>>
>>    APRIORI DXE {
>>      INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>> +    INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
>> +    INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
>> +    INF Platform/Hisilicon/D05/Drivers/SFC/SfcDxeDriver.inf
>> +    INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
>>    }
>>
>>    INF MdeModulePkg/Core/Dxe/DxeMain.inf
>> @@ -157,6 +161,7 @@ READ_LOCK_STATUS   = TRUE
>>    #
>>    # PI DXE Drivers producing Architectural Protocols (EFI Services)
>>    #
>> +  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
>>    INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
>>    INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
>>
>> @@ -190,7 +195,6 @@ READ_LOCK_STATUS   = TRUE
>>
>>    # Simple TextIn/TextOut for UEFI Terminal
>>
>> -  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
>>    INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
>>
>>    INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
>> --
>> 2.17.0
>>
diff mbox series

Patch

diff --git a/Platform/Hisilicon/D03/D03.fdf b/Platform/Hisilicon/D03/D03.fdf
index 1383aa1091..027b53a6cf 100644
--- a/Platform/Hisilicon/D03/D03.fdf
+++ b/Platform/Hisilicon/D03/D03.fdf
@@ -146,6 +146,14 @@  READ_STATUS        = TRUE
 READ_LOCK_CAP      = TRUE
 READ_LOCK_STATUS   = TRUE
 
+  APRIORI DXE {
+    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
+    INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
+    INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
+    INF Platform/Hisilicon/D05/Drivers/SFC/SfcDxeDriver.inf
+    INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
+  }
+
   INF MdeModulePkg/Core/Dxe/DxeMain.inf
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
 
@@ -153,6 +161,7 @@  READ_LOCK_STATUS   = TRUE
   #
   # PI DXE Drivers producing Architectural Protocols (EFI Services)
   #
+  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
   INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
   INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
 
@@ -186,7 +195,6 @@  READ_LOCK_STATUS   = TRUE
 
   # Simple TextIn/TextOut for UEFI Terminal
 
-  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
   INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
 
   INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
diff --git a/Platform/Hisilicon/D05/D05.fdf b/Platform/Hisilicon/D05/D05.fdf
index 4503776d63..37d9cc0c18 100644
--- a/Platform/Hisilicon/D05/D05.fdf
+++ b/Platform/Hisilicon/D05/D05.fdf
@@ -148,6 +148,10 @@  READ_LOCK_STATUS   = TRUE
 
   APRIORI DXE {
     INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
+    INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
+    INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
+    INF Platform/Hisilicon/D05/Drivers/SFC/SfcDxeDriver.inf
+    INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
   }
 
   INF MdeModulePkg/Core/Dxe/DxeMain.inf
@@ -157,6 +161,7 @@  READ_LOCK_STATUS   = TRUE
   #
   # PI DXE Drivers producing Architectural Protocols (EFI Services)
   #
+  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
   INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
   INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
 
@@ -190,7 +195,6 @@  READ_LOCK_STATUS   = TRUE
 
   # Simple TextIn/TextOut for UEFI Terminal
 
-  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
   INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
 
   INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf