Linux ARM memory layout
Linux ARM memory layout
./arch/arm/mm/init.c
high_memory = __va((max_low << PAGE_SHIFT) - 1) + 1;
arch/arm/include/asm/pgtable.h
#define VMALLOC_OFFSET (8*1024*1024)
arch/arm/include/asm/pgtable.h
#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
arch/arm/mach-ARCH/include/mach/vmalloc.h (platform dependent)
#define VMALLOC_END (PAGE_OFFSET + 0x20000000)
arch/arm/include/asm/memory.h
#define PAGE_OFFSET UL(CONFIG_PAGE_OFFSET)
.config
arch/arm/include/asm/pgtable.h
#define VMALLOC_OFFSET (8*1024*1024)
arch/arm/include/asm/pgtable.h
#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
arch/arm/mach-ARCH/include/mach/vmalloc.h (platform dependent)
#define VMALLOC_END (PAGE_OFFSET + 0x20000000)
arch/arm/include/asm/memory.h
#define PAGE_OFFSET UL(CONFIG_PAGE_OFFSET)
.config
CONFIG_PAGE_OFFSET=0xC0000000
VMALLOC_START = high_memory + VMALLOC_OFFSET = CONFIG_PAGE_OFFSET+ram_size + VMALLOC_OFFSET
VMALLOC_END = CONFIG_PAGE_OFFSET + 0x20000000
→ available VMALLOC size = 0x20000000 - VMALLOC_OFFSET - ram_size = 512M -8M -ram_size
VMALLOC_START = high_memory + VMALLOC_OFFSET = CONFIG_PAGE_OFFSET+ram_size + VMALLOC_OFFSET
VMALLOC_END = CONFIG_PAGE_OFFSET + 0x20000000
→ available VMALLOC size = 0x20000000 - VMALLOC_OFFSET - ram_size = 512M -8M -ram_size
留言
張貼留言