un

A union where processor-specific system page information is kept.

The un union is where processor-specific system page information is kept. The purpose of the union is to serve as a demultiplexing point for the various CPU families. It is demultiplexed based on the value of the type member of the system page structure.

Currently supported CPU architectures include:

Processor Member type
ARM, 32-bit arm SYSPAGE_ARM
ARM, 64-bit aarch64 SYSPAGE_AARCH64
x86, 32-bit x86 SYSPAGE_X86
x86, 64-bit x86_64 SYSPAGE_X86_64

un.x86 and un.x86_64

These structures contain x86-specific information. Usually, startup library functions automatically fill in the information carried in these structure:

smpinfo
Contains info on how to manipulate the SMP control hardware; filled in by the library call init_smp().
gdt
Contains the Global Descriptor Table (GDT); filled in by the library.
idt
Contains the Interrupt Descriptor Table (IDT); filled in by the library.
pgdir
Contains pointers to the Page Directory Table(s); filled in by the library.
real_addr
The virtual address corresponding to the physical address range 0 through 0xFFFFF inclusive (the bottom 1 megabyte).

un.arm and un.aarch64

These structures contain ARM-specific information. Usually, startup library functions automatically fill in the information carried in these structure:

L1_vaddr
Virtual address of the MMU level 1 page table used to map the kernel.
L1_paddr
Physical address of the MMU level 1 page table used to map the kernel.
startup_base
Virtual address of a 1-1 virtual-physical mapping used to map the startup code that enables the MMU. This virtual mapping is removed when the kernel is initialized.
startup_size
Size of the mapping used for startup_base.
cpu
Structure containing ARM core-specific operations and data (see ARM cpu below).

ARM cpu

Currently the ARM cpu structure contains the following routines:

page_flush
Implements CPU-specific cache/TLB flushing when the memory manager unmaps or changes the access protections to a virtual memory mapping for a page. This routine is called for each page in a range being modified by the virtual memory manager.
page_flush_deferred
Performs any operations that can be deferred when the page_flush() kernel callout is used. For example on the SA-1110 processor, an Icache flush is deferred until all pages being operated on have been modified.