On Tue, Jan 17, 2017 at 09:15:46AM +0800, Haojian Zhuang wrote:
On 17 January 2017 at 00:12, Leif Lindholm leif.lindholm@linaro.org wrote:
On Mon, Jan 16, 2017 at 08:18:20PM +0800, Haojian Zhuang wrote:
Add the skeleton of HiKey platform with generic BDS. Support both 1GB and 2GB DDR RAM HiKey hardware.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang haojian.zhuang@linaro.org
Chips/Hisilicon/Hi6220/Hi6220.dec | 32 ++ Chips/Hisilicon/Hi6220/Include/Hi6220.h | 77 ++++ Platforms/Hisilicon/HiKey/HiKey.dec | 36 ++ Platforms/Hisilicon/HiKey/HiKey.dsc | 472 +++++++++++++++++++++ Platforms/Hisilicon/HiKey/HiKey.fdf | 350 +++++++++++++++ Platforms/Hisilicon/HiKey/Include/ArmPlatform.h | 26 ++ Platforms/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c | 159 +++++++ .../Hisilicon/HiKey/Library/HiKeyLib/HiKeyHelper.S | 49 +++ .../Hisilicon/HiKey/Library/HiKeyLib/HiKeyLib.inf | 51 +++ .../Hisilicon/HiKey/Library/HiKeyLib/HiKeyMem.c | 204 +++++++++ 10 files changed, 1456 insertions(+) create mode 100644 Chips/Hisilicon/Hi6220/Hi6220.dec create mode 100644 Chips/Hisilicon/Hi6220/Include/Hi6220.h create mode 100644 Platforms/Hisilicon/HiKey/HiKey.dec create mode 100644 Platforms/Hisilicon/HiKey/HiKey.dsc create mode 100644 Platforms/Hisilicon/HiKey/HiKey.fdf create mode 100644 Platforms/Hisilicon/HiKey/Include/ArmPlatform.h create mode 100644 Platforms/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c create mode 100644 Platforms/Hisilicon/HiKey/Library/HiKeyLib/HiKeyHelper.S create mode 100644 Platforms/Hisilicon/HiKey/Library/HiKeyLib/HiKeyLib.inf create mode 100644 Platforms/Hisilicon/HiKey/Library/HiKeyLib/HiKeyMem.c
+#define HIKEY_REGION_SIZE(x) (1U << (((x & HIKEY_REGION_SIZE_MASK) >> 8) + 24))
Need () around that x. (Yes, the code as exists will function fine, but any changes to it could cause very non-obvious errors.)
Well, this is the final thing that needs changing, so if you agree, I can fix that up before committing.
Yes, it's fine to help me to fix it. Thanks.
Thanks.
Now, I kicked off a build of both DEBUG and RELEASE before pushing, and that turned up a build issue with my toolchain due to compiler-generated memcpy() calls in PrePiExtractGuidedSectionLib.
Would you be OK with me also folding in the below snippet, taken from Chips/Hisilicon/Hisilicon.dsc.inc.
Regards,
Leif
diff --git a/Platforms/Hisilicon/HiKey/HiKey.dsc b/Platforms/Hisilicon/HiKey/HiKey.dsc index 6ee4aa5..685c6e3 100644 --- a/Platforms/Hisilicon/HiKey/HiKey.dsc +++ b/Platforms/Hisilicon/HiKey/HiKey.dsc @@ -117,6 +117,16 @@ IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
+ #^M + # It is not possible to prevent the ARM compiler for generic intrinsic functions.^M + # This library provides the instrinsic functions generate by a given compiler.^M + # And NULL mean link this library into all ARM images.^M + #^M + NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf^M +^M + # Add support for GCC stack protector^M + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf^M +^M [LibraryClasses.common.SEC] PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf