Is there a way to set how much memory an armv8 box will get when running in the model?
I'll really like to avoid setting up swap :-)
Thanks!
Interesting question.
I think on model side it is controlled by 'bp.dram_size' parameter (set it with -C option):
[kamensky@kamensky-w530 fastmodels]$ ./FVP_Base_AEMv8A-AEMv8A/models/Linux64_GCC-4.1/FVP_Base_AEMv8A-AEMv8A --list-params | grep dram_size bp.dram_size=0x4 # (int , init-time) default = '0x4' : Size of main memory in gigabytes (2, 4 or 8) : [0x2..0x8]
However when I tried it, it did not have any effect, and even if list-params help claims that default is 4Gb, my Linux kernel sees only 2Gb.
I think the next issue is some setting in uefi loader: uefi creates memory regions list that is passed to the kernel. I see in uefi:
./ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
# System Memory (2GB) gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000 gArmTokenSpaceGuid.PcdSystemMemorySize|0x80000000
and I cannot set it much bigger because PcdSystemMemorySize is defined as UINT32 in ./ArmPkg/ArmPkg.dec like this:
# System Memory (DRAM): These PCDs define the region of in-built system memory # Some platforms can get DRAM extensions, these additional regions will be declared # to UEFI by ArmPLatformPlib gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT32|0x00000029 gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT32|0x0000002A
At this point I don't see where/how to change ArmPLatformPlib get more memory available to Linux.
Thanks, Victor
On 6 February 2014 13:35, Tom Gall tom.gall@linaro.org wrote:
Is there a way to set how much memory an armv8 box will get when running in the model?
I'll really like to avoid setting up swap :-)
Thanks!
-- Regards, Tom
"Where's the kaboom!? There was supposed to be an earth-shattering kaboom!" Marvin Martian Tech Lead, Graphics Working Group | Linaro.org │ Open source software for ARM SoCs w) tom.gall att linaro.org h) tom_gall att mac.com
linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Thanks Victor!
This doesn't bode well.
I'm trying to debug a Chrome on armv8 build. Chrome loaded into gdb with symbols is well over 1 Gig of memory. With everything else running (as in my X env) things die pretty early due to lack of RAM to allocate.
Given this is all in the sim, I just don't see adding swap storage as a viable option.
What would life be if we didn't have to face fun little things like this ? :-)
On Thu, Feb 6, 2014 at 5:57 PM, Victor Kamensky victor.kamensky@linaro.org wrote:
Interesting question.
I think on model side it is controlled by 'bp.dram_size' parameter (set it with -C option):
[kamensky@kamensky-w530 fastmodels]$ ./FVP_Base_AEMv8A-AEMv8A/models/Linux64_GCC-4.1/FVP_Base_AEMv8A-AEMv8A --list-params | grep dram_size bp.dram_size=0x4 # (int , init-time) default = '0x4' : Size of main memory in gigabytes (2, 4 or 8) : [0x2..0x8]
However when I tried it, it did not have any effect, and even if list-params help claims that default is 4Gb, my Linux kernel sees only 2Gb.
I think the next issue is some setting in uefi loader: uefi creates memory regions list that is passed to the kernel. I see in uefi:
./ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
# System Memory (2GB) gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000 gArmTokenSpaceGuid.PcdSystemMemorySize|0x80000000
and I cannot set it much bigger because PcdSystemMemorySize is defined as UINT32 in ./ArmPkg/ArmPkg.dec like this:
# System Memory (DRAM): These PCDs define the region of in-built system memory # Some platforms can get DRAM extensions, these additional regions will be declared # to UEFI by ArmPLatformPlib gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT32|0x00000029 gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT32|0x0000002A
At this point I don't see where/how to change ArmPLatformPlib get more memory available to Linux.
Thanks, Victor
On 6 February 2014 13:35, Tom Gall tom.gall@linaro.org wrote:
Is there a way to set how much memory an armv8 box will get when running in the model?
I'll really like to avoid setting up swap :-)
Thanks!
-- Regards, Tom
"Where's the kaboom!? There was supposed to be an earth-shattering kaboom!" Marvin Martian Tech Lead, Graphics Working Group | Linaro.org │ Open source software for ARM SoCs w) tom.gall att linaro.org h) tom_gall att mac.com
linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
On 7 February 2014 02:19, Tom Gall tom.gall@linaro.org wrote:
Thanks Victor!
This doesn't bode well.
I'm trying to debug a Chrome on armv8 build. Chrome loaded into gdb with symbols is well over 1 Gig of memory. With everything else running (as in my X env) things die pretty early due to lack of RAM to allocate.
Given this is all in the sim, I just don't see adding swap storage as a viable option.
What would life be if we didn't have to face fun little things like this ? :-)
On Thu, Feb 6, 2014 at 5:57 PM, Victor Kamensky victor.kamensky@linaro.org wrote:
Interesting question.
I think on model side it is controlled by 'bp.dram_size' parameter (set it with -C option):
[kamensky@kamensky-w530 fastmodels]$ ./FVP_Base_AEMv8A-AEMv8A/models/Linux64_GCC-4.1/FVP_Base_AEMv8A-AEMv8A --list-params | grep dram_size bp.dram_size=0x4 # (int , init-time) default = '0x4' : Size of main memory in gigabytes (2, 4 or 8) : [0x2..0x8]
However when I tried it, it did not have any effect, and even if list-params help claims that default is 4Gb, my Linux kernel sees only 2Gb.
I think the next issue is some setting in uefi loader: uefi creates memory regions list that is passed to the kernel. I see in uefi:
./ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
# System Memory (2GB) gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000 gArmTokenSpaceGuid.PcdSystemMemorySize|0x80000000
and I cannot set it much bigger because PcdSystemMemorySize is defined as UINT32 in ./ArmPkg/ArmPkg.dec like this:
# System Memory (DRAM): These PCDs define the region of in-built system memory # Some platforms can get DRAM extensions, these additional regions will be declared # to UEFI by ArmPLatformPlib gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT32|0x00000029 gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT32|0x0000002A
Seems you're using an old tree. The latest upstream code has:
c357fd6a (Olivier Martin 2014-01-10 11:27:31 +0000 117) gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT64|0x00000029 c357fd6a (Olivier Martin 2014-01-10 11:27:31 +0000 118) gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT64|0x0000002A
And Linaro's UEFI tree has:
673251fe (Leif Lindholm 2014-01-20 17:18:16 +0000 117) gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT64|0x00000029 673251fe (Leif Lindholm 2014-01-20 17:18:16 +0000 118) gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT64|0x0000002A
At this point I don't see where/how to change ArmPLatformPlib get more memory available to Linux.
Thanks, Victor
On 6 February 2014 13:35, Tom Gall tom.gall@linaro.org wrote:
Is there a way to set how much memory an armv8 box will get when running in the model?
I'll really like to avoid setting up swap :-)
Thanks!
-- Regards, Tom
"Where's the kaboom!? There was supposed to be an earth-shattering kaboom!" Marvin Martian Tech Lead, Graphics Working Group | Linaro.org │ Open source software for ARM SoCs w) tom.gall att linaro.org h) tom_gall att mac.com
linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
-- Regards, Tom
"Where's the kaboom!? There was supposed to be an earth-shattering kaboom!" Marvin Martian Tech Lead, Graphics Working Group | Linaro.org │ Open source software for ARM SoCs w) tom.gall att linaro.org h) tom_gall att mac.com
linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
On 7 February 2014 02:04, Ryan Harkin ryan.harkin@linaro.org wrote:
On 7 February 2014 02:19, Tom Gall tom.gall@linaro.org wrote:
Thanks Victor!
This doesn't bode well.
I'm trying to debug a Chrome on armv8 build. Chrome loaded into gdb with symbols is well over 1 Gig of memory. With everything else running (as in my X env) things die pretty early due to lack of RAM to allocate.
Given this is all in the sim, I just don't see adding swap storage as a viable option.
What would life be if we didn't have to face fun little things like this ? :-)
On Thu, Feb 6, 2014 at 5:57 PM, Victor Kamensky victor.kamensky@linaro.org wrote:
Interesting question.
I think on model side it is controlled by 'bp.dram_size' parameter (set it with -C option):
[kamensky@kamensky-w530 fastmodels]$ ./FVP_Base_AEMv8A-AEMv8A/models/Linux64_GCC-4.1/FVP_Base_AEMv8A-AEMv8A --list-params | grep dram_size bp.dram_size=0x4 # (int , init-time) default = '0x4' : Size of main memory in gigabytes (2, 4 or 8) : [0x2..0x8]
However when I tried it, it did not have any effect, and even if list-params help claims that default is 4Gb, my Linux kernel sees only 2Gb.
I think the next issue is some setting in uefi loader: uefi creates memory regions list that is passed to the kernel. I see in uefi:
./ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
# System Memory (2GB) gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000 gArmTokenSpaceGuid.PcdSystemMemorySize|0x80000000
and I cannot set it much bigger because PcdSystemMemorySize is defined as UINT32 in ./ArmPkg/ArmPkg.dec like this:
# System Memory (DRAM): These PCDs define the region of in-built system memory # Some platforms can get DRAM extensions, these additional regions will be declared # to UEFI by ArmPLatformPlib gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT32|0x00000029 gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT32|0x0000002A
Seems you're using an old tree. The latest upstream code has:
Yes, you are right. I had old tree. Pulled latest linaro uefi tree now I can specify gArmTokenSpaceGuid.PcdSystemMemorySize as 0x100000000 and build does not complain. However it does not work. Uefi does not come up in this case. I am not sure what is wrong, either logic in uefi code or memory map conflict, .. or it could be even issue in loaders before uefi. Do you know at what place and how uefi fvp platform code can tell uefi that it has more RAM?
It goes back to Tom's question how to make Linux under aarch64 fvp to see more than 2G of RAM? Did anyone get it working before?
Thanks, Victor
c357fd6a (Olivier Martin 2014-01-10 11:27:31 +0000 117) gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT64|0x00000029 c357fd6a (Olivier Martin 2014-01-10 11:27:31 +0000 118) gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT64|0x0000002A
And Linaro's UEFI tree has:
673251fe (Leif Lindholm 2014-01-20 17:18:16 +0000 117) gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT64|0x00000029 673251fe (Leif Lindholm 2014-01-20 17:18:16 +0000 118) gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT64|0x0000002A
At this point I don't see where/how to change ArmPLatformPlib get more memory available to Linux.
Thanks, Victor
On 6 February 2014 13:35, Tom Gall tom.gall@linaro.org wrote:
Is there a way to set how much memory an armv8 box will get when running in the model?
I'll really like to avoid setting up swap :-)
Thanks!
-- Regards, Tom
"Where's the kaboom!? There was supposed to be an earth-shattering kaboom!" Marvin Martian Tech Lead, Graphics Working Group | Linaro.org │ Open source software for ARM SoCs w) tom.gall att linaro.org h) tom_gall att mac.com
linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
-- Regards, Tom
"Where's the kaboom!? There was supposed to be an earth-shattering kaboom!" Marvin Martian Tech Lead, Graphics Working Group | Linaro.org │ Open source software for ARM SoCs w) tom.gall att linaro.org h) tom_gall att mac.com
linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Hi Tom,
I still don't know how to increase dram size available to Linux under aarch64 fvp but I think I have another suggestion that may help to your specific problem. Please see inline.
On 6 February 2014 18:19, Tom Gall tom.gall@linaro.org wrote:
Thanks Victor!
This doesn't bode well.
I'm trying to debug a Chrome on armv8 build. Chrome loaded into gdb with symbols is well over 1 Gig of memory. With everything else running (as in my X env) things die pretty early due to lack of RAM to allocate.
I think you can use remote cross gdb based debugging in this situation. Just run gdbserver on target attached to Chrome and run aarch64-linux-gnu-gdb on host.
Here is quick recap of steps if you did not do it before, ignore otherwise.
On target start gdbserver like this: x) make sure that model network is configured and enabled, so you can reach it from host x) to start new process: gdbserver localhost:3333 <procname and args> x) to attach to already running process gdbserver localhost:3333 --attach <pid>
On host: x) Make sure that you have copy of target rootfs that has debugging symbol information (all debuginfo) x) start aarch64-linux-gnu-gdb x) set sysroot in gdb point to target rootfs copy set sysroot /host/path/target_rootfs x) load executable symbols with file /host/path/to/executable x) connect to remote target target remote <ip_address_of_vfp>:3333
after that usual debugging ...
Note 3333 is arbitrary tcp port number I picked, use any other if you wish.
It will also have side effect that it will be quicker because all gdb related activity will be done on host and fvp just runs target executables only.
I came from embedded world we do remote cross debugging all the time, sometimes in situation where debuginfo of single executable is bigger than 2G and target memory is only 512Mb ....
Thanks, Victor
Given this is all in the sim, I just don't see adding swap storage as a viable option.
What would life be if we didn't have to face fun little things like this ? :-)
On Thu, Feb 6, 2014 at 5:57 PM, Victor Kamensky victor.kamensky@linaro.org wrote:
Interesting question.
I think on model side it is controlled by 'bp.dram_size' parameter (set it with -C option):
[kamensky@kamensky-w530 fastmodels]$ ./FVP_Base_AEMv8A-AEMv8A/models/Linux64_GCC-4.1/FVP_Base_AEMv8A-AEMv8A --list-params | grep dram_size bp.dram_size=0x4 # (int , init-time) default = '0x4' : Size of main memory in gigabytes (2, 4 or 8) : [0x2..0x8]
However when I tried it, it did not have any effect, and even if list-params help claims that default is 4Gb, my Linux kernel sees only 2Gb.
I think the next issue is some setting in uefi loader: uefi creates memory regions list that is passed to the kernel. I see in uefi:
./ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
# System Memory (2GB) gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000 gArmTokenSpaceGuid.PcdSystemMemorySize|0x80000000
and I cannot set it much bigger because PcdSystemMemorySize is defined as UINT32 in ./ArmPkg/ArmPkg.dec like this:
# System Memory (DRAM): These PCDs define the region of in-built system memory # Some platforms can get DRAM extensions, these additional regions will be declared # to UEFI by ArmPLatformPlib gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT32|0x00000029 gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT32|0x0000002A
At this point I don't see where/how to change ArmPLatformPlib get more memory available to Linux.
Thanks, Victor
On 6 February 2014 13:35, Tom Gall tom.gall@linaro.org wrote:
Is there a way to set how much memory an armv8 box will get when running in the model?
I'll really like to avoid setting up swap :-)
Thanks!
-- Regards, Tom
"Where's the kaboom!? There was supposed to be an earth-shattering kaboom!" Marvin Martian Tech Lead, Graphics Working Group | Linaro.org │ Open source software for ARM SoCs w) tom.gall att linaro.org h) tom_gall att mac.com
linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
-- Regards, Tom
"Where's the kaboom!? There was supposed to be an earth-shattering kaboom!" Marvin Martian Tech Lead, Graphics Working Group | Linaro.org │ Open source software for ARM SoCs w) tom.gall att linaro.org h) tom_gall att mac.com
Tom Gall tom.gall@linaro.org writes:
Thanks Victor!
This doesn't bode well.
I'm trying to debug a Chrome on armv8 build. Chrome loaded into gdb with symbols is well over 1 Gig of memory. With everything else running (as in my X env) things die pretty early due to lack of RAM to allocate.
Is this Chrome build available anywhere? It occurs to me I should give it a run through the current QEMU aarch64-linux-user code and see how far it gets. The user space emulation is working pretty well (I've built GCC and run most of it's aarch64 tests) but it can always do with more testing.
I have successfully used QEMU's gdb stub to debug stuff using the multiarch-gdb.
<snip>
Cheers,
-- Alex Bennée QEMU/KVM Hacker for Linaro