On Dec 4, 2013, at 8:48 PM, Girish KS <girishks2...@gmail.com> wrote:

> Hello Olivier,
>                     Instead of replacing the 32 bit type with 64 bit
> data type. How about defining a type like give below and use it.
> (linux does it)
> 
> if target processor type is AARCH64 ( this parameter passed to build
> script) use this to include either of the definitions below
> typedef UINT64 phys_addr_t
> typedef UINT32 phys_addr_t
> 

Why not just define the type as EFI_PHYSICAL_ADDRESS? This is a 64-bit type in 
both places. This what is done commonly in the code today, as a 32-bit 
processor can use page table tricks to access more than 4 GB of memory. Not to 
mention PEI  can be IA32 and DXE X64 in some cases. 

Thanks,

Andrew Fish

> Other dependencies should also be modified. e.g Get_Pcd and others.
> Regards
> Girish K S
> 
> On Wed, Dec 4, 2013 at 7:20 PM, Olivier Martin <olivier.mar...@arm.com> wrote:
>> Important note, to make this support works you will need to ensure this PCD
>> is not present in your DSC file:
>> 
>> gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize|32
>> 
>> 
>> 
>> Otherwise, only the 32-bit address space will be accessible in UEFI.
>> 
>> 
>> 
>> 
>> 
>> From: Olivier Martin [mailto:olivier.mar...@arm.com]
>> Sent: 28 November 2013 22:00
>> 
>> 
>> To: edk2-devel@lists.sourceforge.net; linaro-uefi-internal
>> Cc: edk2-buildtools-de...@lists.sourceforge.net
>> Subject: [PATCH] Enabling DRAM above the 32bit address space on AArch64
>> 
>> 
>> 
>> Here is the patch to enable DRAM region located above the 32-bit address
>> space in UEFI.
>> 
>> This patch works fine on AArch64. It needs to be applied on SVN rev 14915
>> (2013-11-28 21:40:48).
>> 
>> 
>> 
>> This change has been validated on the FVP AArch64 model using 4GB
>> 
>> of DRAM at 0x8_0000_0000:
>> 
>> 
>> 
>> -  # System Memory (2GB)
>> 
>> -  gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000
>> 
>> -  gArmTokenSpaceGuid.PcdSystemMemorySize|0x80000000
>> 
>> +  # System Memory (4GB)
>> 
>> +  gArmTokenSpaceGuid.PcdSystemMemoryBase|0x800000000
>> 
>> +  gArmTokenSpaceGuid.PcdSystemMemorySize|0x100000000
>> 
>> 
>> 
>> EFI Shell and Linux kernel boot successfully on this use case.
>> 
>> 
>> 
>> This patch breaks the AArch32 builds. The compilers do not recognize the
>> format 0x800000000ULL (ie: the ‘ULL’).
>> 
>> To fix the AArch32 build you need to change
>> BaseTools/Conf/build_rule.template such as:
>> 
>> 
>> 
>> --- a/BaseTools/Conf/build_rule.template
>> 
>> +++ b/BaseTools/Conf/build_rule.template
>> 
>> @@ -166,7 +166,7 @@
>> 
>> 
>> 
>>     <Command.GCC, Command.RVCT>
>> 
>>         "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
>> 
>> -        Trim --source-code -o ${d_path}(+)${s_base}.iii
>> ${d_path}(+)${s_base}.i
>> 
>> +        Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii
>> ${d_path}(+)${s_base}.i
>> 
>>         # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing
>> issues
>> 
>>         "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iii
>> 
>> 
>> 
>> I will push this change in SVN repository when this change will be accepted
>> by the BaseTools team and rollback into the SVN EDK2.
>> 
>> 
>> 
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> 
>> Signed-off-by: Olivier Martin olivier.mar...@arm.com
>> 
>> 
>> 
>> Thanks,
>> 
>> Olivier
>> 
>> 
>> ------------------------------------------------------------------------------
>> Sponsored by Intel(R) XDK
>> Develop, test and display web and hybrid apps with a single code base.
>> Download it for free now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>> 
> 
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK 
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&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