Increasing HugeTLB from 256MB to 512MB with Yocto SDK2.0

0

As part of my project requirement, I am trying to increase the HugeTLB page from default 256mb to 512mb. Since there was no pre-built 512mb page in the Kernel. I have allocated 2 hugpages of size 256mb in the u-BOOT. Below are my u-boot config.

########################################################################
bootm_size=0x80000000
ramboot=setenv bootargs root=/dev/ram rw console=ttyS1,115200 
ramdisk_size=600000 default_hugepagesz=256m hugepagesz=256m hugepages=2; 
run tftp_linux;bootm 1000000 4000000 e00000
#########################################################################

I have noticed that two pages of 256mb are allocated in the kernel.

HugeTLB registered 64 MB page size, pre-allocated 0 pages
HugeTLB registered 4 MB page size, pre-allocated 0 pages
HugeTLB registered 16 MB page size, pre-allocated 0 pages
HugeTLB registered 256 MB page size, pre-allocated 2 pages
HugeTLB registered 1 GB page size, pre-allocated 0 pages

On Target:
HugePages_Total: 2
HugePages_Free: 2
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 262144 kB

I have modified the libdspboot.c and lg_shm.h files to take 512mb instead of 256mb.

 Libdspboot.c:
 #define MB_256 0x10000000 --> #define MB_512 0x20000000

 lg_shm.h:
 #define HUGE_PAGE_256M 0x10000000 --> #define HUGE_PAGE_512M 0x20000000

And replaced occurrence of these two macros in all the files.

When I trying to execute the IPC Demo application with modified IPC library, DSP is not coming up.

===B4860QDS DSP boot Application (3.1.0) ===
SYSTEM MAP
DSP PrivArea: Addr=80000000 Size=7ff00000
Shared CtrlArea: Addr=fff00000 Size=100000
DSP Core0 M2: Addr=0 Size=0
DSP Core1 M2: Addr=0 Size=0
DSP M3: Addr=c40000000 Size=8000
PA CCSRBAR: Addr =ffe000000 Size=1000000
DSP CCSRBAR: Addr =ffe000000 Size=1000000
PA Shared Area: Addr=50000000 Size=1f000000
DSP Shared Area: Addr=6f000000 Size=1000000
DSP L2 cache Cluster_2 already enabled
Loading Dsp image ipc_demo_b4860_dbg.bin

Copy Part 80000000 84

Copy Part 80028000 2c8a0

Copy Part f7f00000 13b0

Copy Part f7f0b000 1000

Copy Part f7f0c000 1000
intvec_addr =80044000 in L1 Binary
Before StarCore release ========
LCC_BSTRH=0x0
LCC_BSTRL=0xbffff000
LCC_BSTAR=0x8110000b
GCR_CDCER0=0x0
GCR_CHMER0=0x0
DCFG_BRR=0xf
After StarCore release ========
LCC_BSTRH=0x0
LCC_BSTRL=0x80044000
LCC_BSTAR=0x8110000c
GCR_CDCER0=0x3f0
GCR_CHMER0=0x3f00
DCFG_BRR=0x1f
BSTRL,BSTAR,CDCERO,CHMERO n DCFG_BRR set now
sleep 1, waiting for hw sem
sleep 1, waiting for hw sem
sleep 1, waiting for hw sem
sleep 1, waiting for hw sem
sleep 1, waiting for hw sem


 $ cat /proc/meminfo | grep Huge
 HugePages_Total: 2
 HugePages_Free: 1
 HugePages_Rsvd: 1
 HugePages_Surp: 0
 Hugepagesize: 262144 kB

 $ipcs -m
 ------ Shared Memory Segments --------
 key shmid owner perms bytes nattch status
 0x00000002 0 root 600 536870912 0

Is there anything else I need to modify to boot the DSP with increase the shared memory?

linux
ipc
yocto
huge-pages
asked on Stack Overflow May 24, 2019 by shivakumar • edited May 24, 2019 by shivakumar

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0