The BaseMemoryLib has switch to use BaseMemoryLibOptDxe at OPP, but the flash module is device attributes and have to be alignment accessed. so we change the flash related drivers to use generic BaseMemoryLib which is alignment access.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo heyi.guo@linaro.org --- Platforms/Hisilicon/D05/D05.dsc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Platforms/Hisilicon/D05/D05.dsc b/Platforms/Hisilicon/D05/D05.dsc index 6c4beef..7da2522 100644 --- a/Platforms/Hisilicon/D05/D05.dsc +++ b/Platforms/Hisilicon/D05/D05.dsc @@ -72,6 +72,7 @@ !ifdef $(FDT_ENABLE) #FDTUpdateLib FdtUpdateLib|OpenPlatformPkg/Platforms/Hisilicon/Binary/D05/Library/FdtUpdateLib/FdtUpdateLib.inf + !endif #$(FDT_ENABLE)
CpldIoLib|OpenPlatformPkg/Chips/Hisilicon/Library/CpldIoLib/CpldIoLib.inf @@ -494,6 +495,7 @@ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { <LibraryClasses> NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf } MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf @@ -608,7 +610,10 @@ OpenPlatformPkg/Chips/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf
!ifdef $(FDT_ENABLE) - OpenPlatformPkg/Chips/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.inf + OpenPlatformPkg/Chips/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.inf { + <LibraryClasses> + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf + } !endif #$(FDT_ENABLE)
#PCIe Support
The BaseMemoryLib has switch to use BaseMemoryLibOptDxe at OPP, but the flash module is device attributes and have to be alignment accessed. so we change the flash related drivers to use generic BaseMemoryLib which is alignment access.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo heyi.guo@linaro.org --- Platforms/Hisilicon/D03/D03.dsc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Platforms/Hisilicon/D03/D03.dsc b/Platforms/Hisilicon/D03/D03.dsc index 850b16b..34276b3 100644 --- a/Platforms/Hisilicon/D03/D03.dsc +++ b/Platforms/Hisilicon/D03/D03.dsc @@ -380,6 +380,7 @@ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { <LibraryClasses> NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf } MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf @@ -478,7 +479,10 @@ OpenPlatformPkg/Chips/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf
!ifdef $(FDT_ENABLE) - OpenPlatformPkg/Chips/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.inf + OpenPlatformPkg/Chips/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.inf { + <LibraryClasses> + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf + } !endif #$(FDT_ENABLE)
#PCIe Support
The BaseMemoryLib has switch to use BaseMemoryLibOptDxe at OPP, but the flash module is device attributes and have to be alignment accessed. so we change the flash related drivers to use generic BaseMemoryLib which is alignment access.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo heyi.guo@linaro.org --- Platforms/Hisilicon/D02/Pv660D02.dsc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Platforms/Hisilicon/D02/Pv660D02.dsc b/Platforms/Hisilicon/D02/Pv660D02.dsc index 1d89aa6..2f5fbe5 100644 --- a/Platforms/Hisilicon/D02/Pv660D02.dsc +++ b/Platforms/Hisilicon/D02/Pv660D02.dsc @@ -324,6 +324,7 @@ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { <LibraryClasses> NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf } MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf @@ -422,7 +423,10 @@ OpenPlatformPkg/Chips/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClassDxe.inf
!ifdef $(FDT_ENABLE) - OpenPlatformPkg/Chips/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.inf + OpenPlatformPkg/Chips/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.inf { + <LibraryClasses> + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf + } !endif #$(FDT_ENABLE)
#
On 21 November 2016 at 13:08, Heyi Guo heyi.guo@linaro.org wrote:
The BaseMemoryLib has switch to use BaseMemoryLibOptDxe at OPP, but the flash module is device attributes and have to be alignment accessed. so we change the flash related drivers to use generic BaseMemoryLib which is alignment access.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo heyi.guo@linaro.org
Platforms/Hisilicon/D05/D05.dsc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Platforms/Hisilicon/D05/D05.dsc b/Platforms/Hisilicon/D05/D05.dsc index 6c4beef..7da2522 100644 --- a/Platforms/Hisilicon/D05/D05.dsc +++ b/Platforms/Hisilicon/D05/D05.dsc @@ -72,6 +72,7 @@ !ifdef $(FDT_ENABLE) #FDTUpdateLib FdtUpdateLib|OpenPlatformPkg/Platforms/Hisilicon/Binary/D05/Library/FdtUpdateLib/FdtUpdateLib.inf
Unrelated whitespace change
!endif #$(FDT_ENABLE)
CpldIoLib|OpenPlatformPkg/Chips/Hisilicon/Library/CpldIoLib/CpldIoLib.inf @@ -494,6 +495,7 @@ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { <LibraryClasses> NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
} MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.infBaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
@@ -608,7 +610,10 @@ OpenPlatformPkg/Chips/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf
!ifdef $(FDT_ENABLE)
- OpenPlatformPkg/Chips/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.inf
- OpenPlatformPkg/Chips/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.inf {
<LibraryClasses>
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
Could you explain why this is necessary for this module as well?
Thanks, Ard.
Hi Ard,
在 11/21/2016 9:16 PM, Ard Biesheuvel 写道:
On 21 November 2016 at 13:08, Heyi Guo heyi.guo@linaro.org wrote:
The BaseMemoryLib has switch to use BaseMemoryLibOptDxe at OPP, but the flash module is device attributes and have to be alignment accessed. so we change the flash related drivers to use generic BaseMemoryLib which is alignment access.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo heyi.guo@linaro.org
Platforms/Hisilicon/D05/D05.dsc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Platforms/Hisilicon/D05/D05.dsc b/Platforms/Hisilicon/D05/D05.dsc index 6c4beef..7da2522 100644 --- a/Platforms/Hisilicon/D05/D05.dsc +++ b/Platforms/Hisilicon/D05/D05.dsc @@ -72,6 +72,7 @@ !ifdef $(FDT_ENABLE) #FDTUpdateLib FdtUpdateLib|OpenPlatformPkg/Platforms/Hisilicon/Binary/D05/Library/FdtUpdateLib/FdtUpdateLib.inf
Unrelated whitespace change
!endif #$(FDT_ENABLE)
CpldIoLib|OpenPlatformPkg/Chips/Hisilicon/Library/CpldIoLib/CpldIoLib.inf
@@ -494,6 +495,7 @@ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { <LibraryClasses> NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
} MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.infBaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
@@ -608,7 +610,10 @@ OpenPlatformPkg/Chips/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf
!ifdef $(FDT_ENABLE)
- OpenPlatformPkg/Chips/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.inf
- OpenPlatformPkg/Chips/Hisilicon/Drivers/UpdateFdtDxe/UpdateFdtDxe.inf {
<LibraryClasses>
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
Could you explain why this is necessary for this module as well?
The UpdateFdtDxe driver could also access the flash module, the macro 'FDT_ENABLE' is not defined default, so it's have no problem, but if we define the macro at LinaroPkg/platforms.config, there will occur exception.
Thanks, Ard.