diff mbox series

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

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

Commit Message

Ming Huang July 4, 2018, 7:51 a.m. UTC
The edk2 commit bacfd6e let CpuDxe running latter.
CpuDxe is needed by gDS->SetMemorySpaceAttributes, and
gDS->SetMemorySpaceAttributes is invoked by some drivers.

This issue can solve by adding Depex on gEfiCpuArchProtocolGuid
to RealTimeClockLib.

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                                                   | 4 ++++
 Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf | 2 ++
 2 files changed, 6 insertions(+)

-- 
2.17.0

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

Comments

Ard Biesheuvel July 11, 2018, 2:19 p.m. UTC | #1
On 4 July 2018 at 09:51, Ming Huang <ming.huang@linaro.org> wrote:
> The edk2 commit bacfd6e let CpuDxe running latter.

> CpuDxe is needed by gDS->SetMemorySpaceAttributes, and

> gDS->SetMemorySpaceAttributes is invoked by some drivers.

>

> This issue can solve by adding Depex on gEfiCpuArchProtocolGuid

> to RealTimeClockLib.

>


If this is the case, why do we still need the APRIORI DXE section?

> 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                                                   | 4 ++++

>  Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf | 2 ++

>  2 files changed, 6 insertions(+)

>

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

> index 1383aa1091..73e2b7e958 100644

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

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

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

>  READ_LOCK_CAP      = TRUE

>  READ_LOCK_STATUS   = TRUE

>

> +  APRIORI DXE {

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

> +  }

> +

>    INF MdeModulePkg/Core/Dxe/DxeMain.inf

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

>

> diff --git a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf

> index 319c35c724..ae7116dc31 100644

> --- a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf

> +++ b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf

> @@ -46,3 +46,5 @@

>

>  [Pcd]

>

> +[Depex]

> +  gEfiCpuArchProtocolGuid

> --

> 2.17.0

>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Ming Huang July 12, 2018, 8:50 a.m. UTC | #2
在 11/07/2018 22:19, Ard Biesheuvel 写道:
> On 4 July 2018 at 09:51, Ming Huang <ming.huang@linaro.org> wrote:
>> The edk2 commit bacfd6e let CpuDxe running latter.
>> CpuDxe is needed by gDS->SetMemorySpaceAttributes, and
>> gDS->SetMemorySpaceAttributes is invoked by some drivers.
>>
>> This issue can solve by adding Depex on gEfiCpuArchProtocolGuid
>> to RealTimeClockLib.
>>
> 
> If this is the case, why do we still need the APRIORI DXE section?
> 

This APRIORI DXE will be removed in V3.

The new PciHostBridge which is developed by Heyi.Guo will add in V3.

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                                                   | 4 ++++
>>  Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf | 2 ++
>>  2 files changed, 6 insertions(+)
>>
>> diff --git a/Platform/Hisilicon/D03/D03.fdf b/Platform/Hisilicon/D03/D03.fdf
>> index 1383aa1091..73e2b7e958 100644
>> --- a/Platform/Hisilicon/D03/D03.fdf
>> +++ b/Platform/Hisilicon/D03/D03.fdf
>> @@ -146,6 +146,10 @@ READ_STATUS        = TRUE
>>  READ_LOCK_CAP      = TRUE
>>  READ_LOCK_STATUS   = TRUE
>>
>> +  APRIORI DXE {
>> +    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>> +  }
>> +
>>    INF MdeModulePkg/Core/Dxe/DxeMain.inf
>>    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>>
>> diff --git a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
>> index 319c35c724..ae7116dc31 100644
>> --- a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
>> +++ b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
>> @@ -46,3 +46,5 @@
>>
>>  [Pcd]
>>
>> +[Depex]
>> +  gEfiCpuArchProtocolGuid
>> --
>> 2.17.0
>>
Ard Biesheuvel July 13, 2018, 6:46 a.m. UTC | #3
On 12 July 2018 at 10:50, Ming <ming.huang@linaro.org> wrote:
>
>
> 在 11/07/2018 22:19, Ard Biesheuvel 写道:
>> On 4 July 2018 at 09:51, Ming Huang <ming.huang@linaro.org> wrote:
>>> The edk2 commit bacfd6e let CpuDxe running latter.
>>> CpuDxe is needed by gDS->SetMemorySpaceAttributes, and
>>> gDS->SetMemorySpaceAttributes is invoked by some drivers.
>>>
>>> This issue can solve by adding Depex on gEfiCpuArchProtocolGuid
>>> to RealTimeClockLib.
>>>
>>
>> If this is the case, why do we still need the APRIORI DXE section?
>>
>
> This APRIORI DXE will be removed in V3.
>
> The new PciHostBridge which is developed by Heyi.Guo will add in V3.
>

OK, so should I wait for the v3 series then?


>>> 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                                                   | 4 ++++
>>>  Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf | 2 ++
>>>  2 files changed, 6 insertions(+)
>>>
>>> diff --git a/Platform/Hisilicon/D03/D03.fdf b/Platform/Hisilicon/D03/D03.fdf
>>> index 1383aa1091..73e2b7e958 100644
>>> --- a/Platform/Hisilicon/D03/D03.fdf
>>> +++ b/Platform/Hisilicon/D03/D03.fdf
>>> @@ -146,6 +146,10 @@ READ_STATUS        = TRUE
>>>  READ_LOCK_CAP      = TRUE
>>>  READ_LOCK_STATUS   = TRUE
>>>
>>> +  APRIORI DXE {
>>> +    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>>> +  }
>>> +
>>>    INF MdeModulePkg/Core/Dxe/DxeMain.inf
>>>    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>>>
>>> diff --git a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
>>> index 319c35c724..ae7116dc31 100644
>>> --- a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
>>> +++ b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
>>> @@ -46,3 +46,5 @@
>>>
>>>  [Pcd]
>>>
>>> +[Depex]
>>> +  gEfiCpuArchProtocolGuid
>>> --
>>> 2.17.0
>>>
Ming Huang July 13, 2018, 7:23 a.m. UTC | #4
在 13/07/2018 14:46, Ard Biesheuvel 写道:
> On 12 July 2018 at 10:50, Ming <ming.huang@linaro.org> wrote:
>>
>>
>> 在 11/07/2018 22:19, Ard Biesheuvel 写道:
>>> On 4 July 2018 at 09:51, Ming Huang <ming.huang@linaro.org> wrote:
>>>> The edk2 commit bacfd6e let CpuDxe running latter.
>>>> CpuDxe is needed by gDS->SetMemorySpaceAttributes, and
>>>> gDS->SetMemorySpaceAttributes is invoked by some drivers.
>>>>
>>>> This issue can solve by adding Depex on gEfiCpuArchProtocolGuid
>>>> to RealTimeClockLib.
>>>>
>>>
>>> If this is the case, why do we still need the APRIORI DXE section?
>>>
>>
>> This APRIORI DXE will be removed in V3.
>>
>> The new PciHostBridge which is developed by Heyi.Guo will add in V3.
>>
> 
> OK, so should I wait for the v3 series then?
> 
> 

Heyi.Guo suggest that the new PciHostBridge patch set upstream in addition patch set
for clarity.
This patch set v3 will send soon.

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                                                   | 4 ++++
>>>>  Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf | 2 ++
>>>>  2 files changed, 6 insertions(+)
>>>>
>>>> diff --git a/Platform/Hisilicon/D03/D03.fdf b/Platform/Hisilicon/D03/D03.fdf
>>>> index 1383aa1091..73e2b7e958 100644
>>>> --- a/Platform/Hisilicon/D03/D03.fdf
>>>> +++ b/Platform/Hisilicon/D03/D03.fdf
>>>> @@ -146,6 +146,10 @@ READ_STATUS        = TRUE
>>>>  READ_LOCK_CAP      = TRUE
>>>>  READ_LOCK_STATUS   = TRUE
>>>>
>>>> +  APRIORI DXE {
>>>> +    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>>>> +  }
>>>> +
>>>>    INF MdeModulePkg/Core/Dxe/DxeMain.inf
>>>>    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>>>>
>>>> diff --git a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
>>>> index 319c35c724..ae7116dc31 100644
>>>> --- a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
>>>> +++ b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
>>>> @@ -46,3 +46,5 @@
>>>>
>>>>  [Pcd]
>>>>
>>>> +[Depex]
>>>> +  gEfiCpuArchProtocolGuid
>>>> --
>>>> 2.17.0
>>>>
diff mbox series

Patch

diff --git a/Platform/Hisilicon/D03/D03.fdf b/Platform/Hisilicon/D03/D03.fdf
index 1383aa1091..73e2b7e958 100644
--- a/Platform/Hisilicon/D03/D03.fdf
+++ b/Platform/Hisilicon/D03/D03.fdf
@@ -146,6 +146,10 @@  READ_STATUS        = TRUE
 READ_LOCK_CAP      = TRUE
 READ_LOCK_STATUS   = TRUE
 
+  APRIORI DXE {
+    INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
+  }
+
   INF MdeModulePkg/Core/Dxe/DxeMain.inf
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
 
diff --git a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
index 319c35c724..ae7116dc31 100644
--- a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
+++ b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.inf
@@ -46,3 +46,5 @@ 
 
 [Pcd]
 
+[Depex]
+  gEfiCpuArchProtocolGuid