Not able to understand this kernel function and android kernel command line

cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to understand this kernel function and android kernel command line

Jump to solution
382 Views
mrigendra_chaub
Contributor III

I want to understand what happens in these two functions in linux kernel 4.9.17

smp_tlb.c

void flush_tlb_kernel_range(unsigned long start, unsigned long end)
{
if (tlb_ops_need_broadcast()) {
struct tlb_args ta;
ta.ta_start = start;
ta.ta_end = end;
on_each_cpu(ipi_flush_tlb_kernel_range, &ta, 1);
} else
local_flush_tlb_kernel_range(start, end);//becomes v7wbi_flush_kern_tlb_range(start, end);

broadcast_tlb_a15_erratum();
}

tlb_v7.S

/*
* v7wbi_flush_kern_tlb_range(start,end)
*
* Invalidate a range of kernel TLB entries
*
* - start - start address (may not be aligned)
* - end - end address (exclusive, may not be aligned)
*/
ENTRY(v7wbi_flush_kern_tlb_range)
dsb ish
mov r0, r0, lsr #PAGE_SHIFT @ align address
mov r1, r1, lsr #PAGE_SHIFT
mov r0, r0, lsl #PAGE_SHIFT
mov r1, r1, lsl #PAGE_SHIFT
1:
#ifdef CONFIG_ARM_ERRATA_720789
ALT_SMP(mcr p15, 0, r0, c8, c3, 3) @ TLB invalidate U MVA all ASID (shareable)
#else
ALT_SMP(mcr p15, 0, r0, c8, c3, 1) @ TLB invalidate U MVA (shareable)
#endif
ALT_UP(mcr p15, 0, r0, c8, c7, 1) @ TLB invalidate U MVA
add r0, r0, #PAGE_SZ
cmp r0, r1
blo 1b
dsb ish
isb
ret lr
ENDPROC(v7wbi_flush_kern_tlb_range)

Because I do not have a debugger and my kernel stops after calling local_flush_tlb_kernel_range(start, end); and I do not know how to debug inside this assembly file.

Also I just copied this from sabresd kernel command line for android

Kernel command line: console=ttymxc0,115200 init=/init earlyprintk video=mxcfb0:dev=ldb,fbpix=RGB32,bpp=32 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off vmalloc=128M androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale cma=448M galcore.contiguousSize=33554432 buildvariant=userdebug androidboot.serialno=110f91d4ea9ac958 androidboot.soc_type=imx6qp androidboot.storage_type=sd gpt

Can anyone tell what these variables means to kernel

vmalloc=128M
cma=448M
galcore.contiguousSize=33554432

How should I change these, on what basis? How can I cross check that these are correct command line options i want?

Here in the command line it wants 448MiB of contiguous area, for vmalloc 128M. But isn't it the vmalloc area itself needs to be contiguous, then why two seperate variables?

Any help or direction will be very helpful.

0 Kudos
1 Solution
186 Views
jimmychan
NXP TechSupport
NXP TechSupport

The meaning of parameters can be found in Android User's Guide.

View solution in original post

0 Kudos
3 Replies
186 Views
jimmychan
NXP TechSupport
NXP TechSupport

Which BSP are you using?

0 Kudos
186 Views
mrigendra_chaub
Contributor III

Its nxp's android O source for imx6 devices.

0 Kudos
187 Views
jimmychan
NXP TechSupport
NXP TechSupport

The meaning of parameters can be found in Android User's Guide.

View solution in original post

0 Kudos