Re: [U-Boot] how to get u-boot code with arm64: core support

Hi, experts: I have tried to boot uefi bootloader with FVP model,it is ok! ./Foundation_v8 --cores=4 --no-secure-memory --visualization --gicv3 --data="./bl1.bin"@0x0 --data="./uefi.fd"@0x8000000
BL1-->BL2-->...>uefi.fd
But booting uboot.bin, it still failed.
Best wishes,

-----Original Message----- From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces@lists.denx.de] On Behalf Of TigerLiu@viatech.com.cn Sent: Tuesday, January 14, 2014 4:13 PM To: fenghua@phytium.com.cn Cc: trini@ti.com; u-boot@lists.denx.de; Wood Scott-B07421 Subject: Re: [U-Boot] how to get u-boot code with arm64: core support
Hi, experts: I have tried to boot uefi bootloader with FVP model,it is ok! ./Foundation_v8 --cores=4 --no-secure-memory --visualization --gicv3 --data="./bl1.bin"@0x0 --data="./uefi.fd"@0x8000000
Which ARMv8 foundation model version you are using. I one I have doesn't support GiCv3. UEFI supports both GiCv3 and v2 whereas I believe uboot is only tested for GiCv2.
BL1-->BL2-->...>uefi.fd
But booting uboot.bin, it still failed.
Best wishes, _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Hi, sharma:
Which ARMv8 foundation model version you are using. I one I have
doesn't support
GiCv3. UEFI supports both GiCv3 and v2 whereas I believe uboot is only
tested >for GiCv2.
I download FVP from ARM Ltd website: http://www.arm.com/products/tools/models/fast-models/foundation-model.ph p how to identify this FVP's version number?
I tried to run : ./Foundation_v8 --cores=4 --no-secure-memory --visualization --data="./bl1.bin"@0x0 --data="./u-boot.bin"@0x8000000
Not use " --gicv3 " parameter, it still failed to jump to u-boot.bin
Best wishes,

-----Original Message----- From: TigerLiu@viatech.com.cn [mailto:TigerLiu@viatech.com.cn] Sent: Tuesday, January 14, 2014 4:40 PM To: Sharma Bhupesh-B45370; fenghua@phytium.com.cn Cc: trini@ti.com; u-boot@lists.denx.de; Wood Scott-B07421 Subject: Re: Re: [U-Boot] how to get u-boot code with arm64: core support
Hi, sharma:
./Foundation_v8 --cores=4 --no-secure-memory --visualization
--data="./bl1.bin"@0x0 --data="./u-boot.bin"@0x8000000
Is the TEXT_BASE right?
Can you try this command: ./Foundation_v8 --image ./u-boot --cores=4 --no-secure-memory
Regards, Bhupesh

Hi,Sharma:
Can you try this command: ./Foundation_v8 --image ./u-boot --cores=4 --no-secure-memory
Error: terminal_1: Listening for serial connection on port 5000 terminal_2: Listening for serial connection on port 5001 terminal_0: Listening for serial connection on port 5002 terminal_3: Listening for serial connection on port 5003 ERROR: an unexpected exception error has occurred inside the model terminate called after throwing an instance of 'ObjectLoaderError' what(): ./u-boot.bin: error while loading 'AXYS 'in'-file' file: fgets: Success ./run.sh: line 3: 25702 Aborted ./Foundation_v8 --image ./u-boot.bin --cores=4 --no-secure-memory
So, maybe current FVP's version is newer!

Not the u-boot.bin, only u-boot:
./Foundation_v8 --image ./u-boot --cores=4 --no-secure-memory
Regards, Bhupesh
-----Original Message----- From: TigerLiu@viatech.com.cn [mailto:TigerLiu@viatech.com.cn] Sent: Tuesday, January 14, 2014 4:52 PM To: Sharma Bhupesh-B45370; fenghua@phytium.com.cn Cc: trini@ti.com; u-boot@lists.denx.de; Wood Scott-B07421 Subject: Re: Re: [U-Boot] how to get u-boot code with arm64: core support
Hi,Sharma:
Can you try this command: ./Foundation_v8 --image ./u-boot --cores=4 --no-secure-memory
Error: terminal_1: Listening for serial connection on port 5000 terminal_2: Listening for serial connection on port 5001 terminal_0: Listening for serial connection on port 5002 terminal_3: Listening for serial connection on port 5003 ERROR: an unexpected exception error has occurred inside the model terminate called after throwing an instance of 'ObjectLoaderError' what(): ./u-boot.bin: error while loading 'AXYS 'in'-file' file: fgets: Success ./run.sh: line 3: 25702 Aborted ./Foundation_v8 --image ./u-boot.bin --cores=4 --no-secure-memory
So, maybe current FVP's version is newer!

Hi, sharma:
Not the u-boot.bin, only u-boot: ./Foundation_v8 --image ./u-boot --cores=4 --no-secure-memory
FVP model print: Simulation is started
Then not run further.
Based on arm open source firmware doc, should use Foundation_v8 as below format: ./Foundation_v8 \ --cores=4 \ --no-secure-memory \ --visualization \ --gicv3 \ --data="<path to bl1.bin>"@0x0 \ --data="<path to UEFI binary>"@0x8000000 \
After compiled u-boot source code, there are 3 u-boot bin files: u-boot : 1.4MB u-boot.bin : 205KB u-boot.elf : 270KB
So, we should use u-boot? Not u-boot.bin?
Best wishes,

On Tue, 2014-01-14 at 05:23 -0600, Sharma Bhupesh-B45370 wrote:
Not the u-boot.bin, only u-boot:
./Foundation_v8 --image ./u-boot --cores=4 --no-secure-memory
You need to use u-boot.elf, not the unrelocated u-boot.
-Scott

-----Original Messages----- From: TigerLiu@viatech.com.cn Sent Time: 2014-01-15 08:45:16 (Wednesday) To: scottwood@freescale.com, bhupesh.sharma@freescale.com Cc: fenghua@phytium.com.cn, trini@ti.com, u-boot@lists.denx.de Subject: Re: [U-Boot] how to get u-boot code with arm64: core support
Hi, Scott:
You need to use u-boot.elf, not the unrelocated u-boot.
Thanks a lot! After changing to u-boot.elf, it could be run in FVP model.
Best wishes,
I make some supplement. Foundation Model use elf header to determine the entry point, so only support loading elf(or axf) images. Another way, gcc for aarch64 use rela relocation type and no initial value encoded in rela table. Thus, the file 'u-boot' contains wrong relocation information. Scott provided a few patches to deal with this problem. A tool named relocate-rela is provided to fix this problem and u-boot.elf is generated with correct relocation.
So, only u-boot.elf could be used with Foundation model. Currently only gicv2 is supported. I will upload a gicv3 patch in these days.
Best wishes,
participants (4)
-
bhupesh.sharma@freescale.com
-
FengHua
-
Scott Wood
-
TigerLiu@viatech.com.cn