Interesting, I was just fixing logic that was already there.  If it is really 
desired to follow https://www.kernel.org/doc/Documentation/arm64/booting.txt 
BdsLinuxLoader.c should be simplified greatly.

I think what my code will do is effectively move the system memory base to the 
lowest available memory address after PcdSystemMemoryBase.  It looks like the 
Linux will ignore any memory regions below where the kernel is.  If memory at 
low addresses is reserved by UEFI from use by the OS for whatever reason, the 
PcdSystemMemoryBase is not the base of memory that the OS would see.  I assume 
this must have been the intent of the original developer of BdsLinuxLoader.c.

Garrett Kirkendall   [Description: Description: Description: purple]
SMTS Firmware Engineer | AMD Technology & Engineering
7171 Southwest Parkway, Austin, TX 78735 USA
[Description: Description: Description: image004]   
facebook<https://www.facebook.com/AMD>  |  amd.com<http://www.amd.com/>

From: Olivier Martin [mailto:olivier.mar...@arm.com]
Sent: Monday, February 24, 2014 10:50 AM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] [PATCH] ArmPkg/Library/BdsLib: Fix Linux kernel load when 
1st call to BdsLoadImage fails.

Garrett,
I pushed your fix about 'adding EfiReservedMemoryType regions to FDT'.

But there is a misinterpretation of the Linux Booting protocol into the other 
part of your patch. The Linux Boot protocol says:

"The image must be placed at the specified offset (currently 0x80000)
from the start of the system RAM and called there. The start of the
system RAM must be aligned to 2MB."
Source: https://www.kernel.org/doc/Documentation/arm64/booting.txt

Your patch tries to load Linux kernel on any 2MB boundary if it fails at 
'SystemMemoryBase + 0x80000' - which is wrong.
If it fails at 'SystemMemoryBase + 0x80000' then it should just abort Linux 
loading.

Thanks,
Olivier

From: Kirkendall, Garrett [mailto:garrett.kirkend...@amd.com]
Sent: 17 February 2014 17:04
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: [edk2] [PATCH] ArmPkg/Library/BdsLib: Fix Linux kernel load when 1st 
call to BdsLoadImage fails.

Dear ArmPkg maintainers,

Please consider the attached patch that handles loading the Linux kernel when 
the first call to BdsLoadImage fails.  Also, it makes sure that the PSCI 
disabled processor holding pen can be allocated when loading the kernel image.

Garrett Kirkendall   [Description: Description: Description: purple]
SMTS Firmware Engineer | AMD Technology & Engineering
7171 Southwest Parkway, Austin, TX 78735 USA
[Description: Description: Description: image004]   
facebook<https://www.facebook.com/AMD>  |  amd.com<http://www.amd.com/>

<<inline: image005.png>>

<<inline: image006.png>>

<<inline: image002.png>>

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to