Barrelfish
Macros | Variables
offsets.h File Reference

ARMv8 address-space sizes and offsets. More...

Macros

#define VADDR_SPACE_SIZE_BITS   48
 
#define PADDR_SPACE_SIZE_BITS   48
 
#define START_KERNEL_PHYS   0x80000000
 
#define KERNEL_OFFSET   0xffff000000000000ULL
 
#define PADDR_SPACE_LIMIT   (GEN_ADDR(49) - 1)
 
#define ARMV8_INIT_SPACE_LIMIT   (32 * 1024 * 1024)
 
#define ARMV8_INIT_VBASE   (2 * 1024 * 1024)
 
#define MEMORY_OFFSET   (KERNEL_OFFSET)
 
#define PHYS_MEMORY_START   0x0
 
#define KERNEL_STACK_SIZE   0x4000
 
#define KERNEL_IMAGE_SIZE
 

Variables

uint8_t kernel_first_byte
 
uint8_t kernel_text_final_byte
 
uint8_t kernel_final_byte
 
uintptr_t kernel_stack
 The kernel stack. More...
 

Detailed Description

ARMv8 address-space sizes and offsets.

Macro Definition Documentation

#define ARMV8_INIT_SPACE_LIMIT   (32 * 1024 * 1024)

Static address space limit for the init user-space domain. The static space is used to map in code and static data of the init module, as well as all loaded multiboot modules. init can freely allocate dynamic memory as soon as it is running. This is 32 MBytes right now.

You should make this constant a multiple of #BASE_PAGE_SIZE * #PTABLE_SIZE or you'll restrict init's static address space unneccessarily. init's lowest segment should also be based at these multiples or it restricts itself.

#define ARMV8_INIT_VBASE   (2 * 1024 * 1024)

Base address of init address space in virtual memory. init should start at 4 MByte. The kernel maps in important structures at 2 MByte. This address should be page-table size aligned (i.e. with 4 KByte pages, a page table maps 2 MBytes. Thus, align it to multiples of 2 MBytes).

#define KERNEL_IMAGE_SIZE
Value:
(size_t)(&kernel_final_byte - \
uint8_t kernel_final_byte
uint8_t kernel_first_byte

The size of the whole kernel image.

#define KERNEL_OFFSET   0xffff000000000000ULL

Kernel offset - virtual base of the kernel's address space: the region mapped by TTBR1.

#define KERNEL_STACK_SIZE   0x4000

Kernel stack size – 16KB

#define MEMORY_OFFSET   (KERNEL_OFFSET)

The absolute base address of mapped physical memory, within the kernel's virtual address space.

#define PADDR_SPACE_LIMIT   (GEN_ADDR(49) - 1)

Maximum physical address space mappable by the kernel. Adjust this for a bigger physical address space.

#define PADDR_SPACE_SIZE_BITS   48

Absolute size of physical address space. Depends on value in ID_AA64MMFR0_EL1 (ARMv8-A TRM, D4-1733) current options are 4G, 64G, 1T, 4T, 16T, 256T set to 256T for now

#define PHYS_MEMORY_START   0x0

Absolute start of RAM in physical memory. XXX - this isn't statically known.

#define START_KERNEL_PHYS   0x80000000

Start address of kernel image in physical memory. Most ARM platforms have the first physical window starting at 2GB.

#define VADDR_SPACE_SIZE_BITS   48

Absolute size of virtual address space. This is 48-bit on AArch64. TODO: might be implementation-specific

Variable Documentation

uint8_t kernel_final_byte

Symbol: End of kernel image. This symbol points to the end address of the kernel image.

uint8_t kernel_first_byte

Symbol: Start of kernel image. This symbol points to the start address of the kernel image.

uintptr_t kernel_stack

The kernel stack.

Declared in boot.S.

uint8_t kernel_text_final_byte

Symbol: End of kernel image. This symbol points to the end address of the kernel image.