On Fri, Mar 18, 2016 at 05:17:42PM +0100, Jan Dąbroś wrote:
Hi Leif,
Thanks for your remarks.
2016-03-18 16:10 GMT+01:00 Leif Lindholm leif.lindholm@linaro.org:
Hi Marcin,
I have started looking at this.
First some high-level comments:
- It would be really helpful if you could put these patches in some public repo, so that I could cherry-pick them across (and avoid the issues of CR getting dropped in transmission).
I think it's possible, but we have to discuss it internally and will let you know.
Thanks.
- I get several build breakages due to "may be used uninitalized" type situations - both with GCC and CLANG.
- Could you manually enable -Wno-maybe-uninitialized (GCC) or -Wsometimes-uninitialized (CLANG) and clean up these instances? (Add to end of DEFINE GCC_AARCH64_CC_FLAGS line in EDK2 BaseTools/Conf/tools_def.template, then do a git clean -fx in edk2/Conf before rebuilding.)
I added the flags to tools_def.template, performed git clean and rebuild succeeded. Maybe it's a toolchain issue?
Sorry, that was me being confused - I meant -Wmaybe-initialized. But see below.
- Out of personal interest - which toolchain are you using that doesn't complain about this?
gcc-linaro-aarch64-none-elf-4.8-2014.04_linux/bin/aarch64-none-elf-
Ow, OK, you should really upgrade to something more recent. You can grab something more up to date from http://releases.linaro.org/components/toolchain/binaries/latest-5.2/aarch64-...
You can drop the extra build flag then.
- I see you have imported the old EDK ramdisk driver. I keep seeing new ports doing this, even though there is now a ramdisk driver in EDK2 - MdeModulePkg/Universal/Disk/RamDiskDxe. I understand from Heyi that there are differences, and potentially bits missing, but I would really like to see if we can get rid of these non-upstream bits. Could you discuss with Heyi.Guo@linaro.org (optimally with this list on cc) what is missing from RamDiskDxe?
Our main development was created on a Opp and EDK2 baseline from November 2015. For upstream purpose, we rebased onto newest master, however didn't notice that RamDiskDxe appeared in the tree in the meantime, so we will try this solution before submitting v2.
Lovely, thanks.
- Drivers/Spi/SpiDxe.inf is lacking an explicit dependency on IoLib, causing a build failure.
With our toolchain we do not see such issue. Can you please provide us with a build log?
Another indication that upgrading would be a good idea...
Building ... /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/Devices/MvSpiFlash.inf [AARCH64] "aarch64-linux-gnu-ld" -o /home/leif/work/git/edk2/Build/Armada7040_rz/RELEASE_GCC49/AARCH64/OpenPlatformPkg/Drivers/Spi/SpiDxe/DEBUG/SpiMasterDxe.dll --emit-relocs -nostdlib --gc-sections -u _ModuleEntryPoint -e _ModuleEntryPoint -Map /home/leif/work/git/edk2/Build/Armada7040_rz/RELEASE_GCC49/AARCH64/OpenPlatformPkg/Drivers/Spi/SpiDxe/DEBUG/SpiMasterDxe.map -z common-page-size=0x20 --start-group @/home/leif/work/git/edk2/Build/Armada7040_rz/RELEASE_GCC49/AARCH64/OpenPlatformPkg/Drivers/Spi/SpiDxe/OUTPUT/static_library_files.lst --end-group --script=/home/leif/work/git/edk2/BaseTools/Scripts/GccBase.lds --defsym=PECOFF_HEADER_SIZE=0x228 Building ... /home/leif/work/git/edk2/MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf [AARCH64] /home/leif/work/git/edk2/Build/Armada7040_rz/RELEASE_GCC49/AARCH64/OpenPlatformPkg/Drivers/Spi/SpiDxe/OUTPUT/SpiMasterDxe.lib(SpiDxe.obj): In function `SpiSetCs': /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:99: undefined reference to `MmioRead32' /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:102: undefined reference to `MmioWrite32' /home/leif/work/git/edk2/Build/Armada7040_rz/RELEASE_GCC49/AARCH64/OpenPlatformPkg/Drivers/Spi/SpiDxe/OUTPUT/SpiMasterDxe.lib(SpiDxe.obj): In function `SpiActivateCs': /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:114: undefined reference to `MmioRead32' /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:116: undefined reference to `MmioWrite32' /home/leif/work/git/edk2/Build/Armada7040_rz/RELEASE_GCC49/AARCH64/OpenPlatformPkg/Drivers/Spi/SpiDxe/OUTPUT/SpiMasterDxe.lib(SpiDxe.obj): In function `EfiSpiTransfer': /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:213: undefined reference to `MmioRead32' /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:215: undefined reference to `MmioWrite32' /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:222: undefined reference to `MmioWrite32' /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:225: undefined reference to `MmioRead32' /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:226: undefined reference to `MmioRead32' /home/leif/work/git/edk2/Build/Armada7040_rz/RELEASE_GCC49/AARCH64/OpenPlatformPkg/Drivers/Spi/SpiDxe/OUTPUT/SpiMasterDxe.lib(SpiDxe.obj): In function `SpiDeactivateCs': /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:127: undefined reference to `MmioRead32' /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:129: undefined reference to `MmioWrite32' /home/leif/work/git/edk2/Build/Armada7040_rz/RELEASE_GCC49/AARCH64/OpenPlatformPkg/Drivers/Spi/SpiDxe/OUTPUT/SpiMasterDxe.lib(SpiDxe.obj): In function `SpiSetupTransfer': /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:151: undefined reference to `MmioRead32' /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:153: undefined reference to `MmioWrite32' /home/leif/work/git/edk2/Build/Armada7040_rz/RELEASE_GCC49/AARCH64/OpenPlatformPkg/Drivers/Spi/SpiDxe/OUTPUT/SpiMasterDxe.lib(SpiDxe.obj): In function `SpiSetBaudRate': /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:81: undefined reference to `MmioRead32' /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:86: undefined reference to `MmioWrite32' /home/leif/work/git/edk2/Build/Armada7040_rz/RELEASE_GCC49/AARCH64/OpenPlatformPkg/Drivers/Spi/SpiDxe/OUTPUT/SpiMasterDxe.lib(SpiDxe.obj): In function `SpiSetupTransfer': /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:159: undefined reference to `MmioRead32' /home/leif/work/git/edk2/OpenPlatformPkg/Drivers/Spi/SpiDxe.c:177: undefined reference to `MmioWrite32' make: Nothing to be done for 'tbuild'. GNUmakefile:391: recipe for target '/home/leif/work/git/edk2/Build/Armada7040_rz/RELEASE_GCC49/AARCH64/OpenPlatformPkg/Drivers/Spi/SpiDxe/DEBUG/SpiMasterDxe.dll' failed make: *** [/home/leif/work/git/edk2/Build/Armada7040_rz/RELEASE_GCC49/AARCH64/OpenPlatformPkg/Drivers/Spi/SpiDxe/DEBUG/SpiMasterDxe.dll] Error 1
The fix is
diff --git a/Drivers/Spi/SpiDxe.inf b/Drivers/Spi/SpiDxe.inf index 8240cf1..c43f111 100644 --- a/Drivers/Spi/SpiDxe.inf +++ b/Drivers/Spi/SpiDxe.inf @@ -60,6 +60,7 @@ UefiLib DebugLib MemoryAllocationLib + IoLib
[FixedPcd] gMarvellTokenSpaceGuid.PcdSpiRegBase
Regards,
Leif