ia32
[Memory management]


Files

file  as.h
file  frame.h
file  memory_init.h
file  memory_init.h
file  page.h
file  tlb.h
file  as.c
file  as.c
file  frame.c
file  frame.c
file  memory_init.c
file  page.c
file  tlb.c
file  tlb.c

Defines

#define KERNEL_ADDRESS_SPACE_SHADOWED_ARCH   0
#define KERNEL_ADDRESS_SPACE_START_ARCH   ((unsigned long) 0x80000000)
#define KERNEL_ADDRESS_SPACE_END_ARCH   ((unsigned long) 0xffffffff)
#define USER_ADDRESS_SPACE_START_ARCH   ((unsigned long) 0x00000000)
#define USER_ADDRESS_SPACE_END_ARCH   ((unsigned long) 0x7fffffff)
#define USTACK_ADDRESS_ARCH   (USER_ADDRESS_SPACE_END_ARCH-(PAGE_SIZE-1))
#define as_install_arch(as)
#define FRAME_WIDTH   12
#define FRAME_SIZE   (1<<FRAME_WIDTH)
#define PAGE_WIDTH   FRAME_WIDTH
#define PAGE_SIZE   FRAME_SIZE
#define tlb_arch_init()
#define tlb_print()

Functions

void as_arch_init (void)
size_t get_memory_size (void)
void memory_print_map (void)
static void init_e820_memory (pfn_t minconf)
static int cmd_e820mem (cmd_arg_t *argv)
void frame_arch_init (void)
void page_arch_init (void)
__address hw_map (__address physaddr, size_t size)
void page_fault (int n, istate_t *istate)
void tlb_invalidate_all (void)
void tlb_invalidate_asid (asid_t asid)
void tlb_invalidate_pages (asid_t asid, __address page, count_t cnt)

Variables

size_t hardcoded_unmapped_ktext_size = 0
size_t hardcoded_unmapped_kdata_size = 0
__address last_frame = 0
static cmd_info_t e820_info
static char * e820names []
__u8 e820counter = 0xff
e820memmap_ e820table [MEMMAP_E820_MAX_RECORDS]
__u32 e801memorysize

Define Documentation

#define as_install_arch as   ) 
 

Definition at line 47 of file as.h.

Referenced by as_switch().

#define FRAME_SIZE   (1<<FRAME_WIDTH)
 

Definition at line 39 of file frame.h.

Referenced by anon_page_fault(), elf_frame_free(), elf_page_fault(), hw_map(), init_e820_memory(), page_arch_init(), phys_page_fault(), and sys_physmem_map().

#define FRAME_WIDTH   12
 

Definition at line 38 of file frame.h.

Referenced by ADDR2PFN(), frame_arch_init(), PFN2ADDR(), and SIZE2FRAMES().

#define KERNEL_ADDRESS_SPACE_END_ARCH   ((unsigned long) 0xffffffff)
 

Definition at line 41 of file as.h.

Referenced by hw_map().

#define KERNEL_ADDRESS_SPACE_SHADOWED_ARCH   0
 

Definition at line 38 of file as.h.

#define KERNEL_ADDRESS_SPACE_START_ARCH   ((unsigned long) 0x80000000)
 

Definition at line 40 of file as.h.

#define PAGE_SIZE   FRAME_SIZE
 

Definition at line 41 of file page.h.

Referenced by anon_page_fault(), anon_share(), as_area_create(), as_area_destroy(), as_area_resize(), as_area_share(), as_get_size(), badness(), check_area_conflicts(), comp_objects(), ddi_physmem_map(), elf_frame_free(), elf_page_fault(), elf_share(), find_area_and_lock(), hw_map(), klog_init(), load_segment(), main_bsp(), map_structure(), phys_page_fault(), pt_mapping_insert(), ptl0_create(), slab_space_alloc(), sys_futex_sleep_timeout(), sys_futex_wakeup(), sys_io(), sys_physmem_map(), task_run_program(), tlb_invalidate_pages(), used_space_insert(), and used_space_remove().

#define PAGE_WIDTH   FRAME_WIDTH
 

Definition at line 40 of file page.h.

Referenced by as_area_resize(), elf_frame_free(), and elf_page_fault().

#define tlb_arch_init void   ) 
 

Definition at line 38 of file tlb.h.

Referenced by tlb_init().

#define tlb_print void   ) 
 

Definition at line 39 of file tlb.h.

Referenced by cmd_tlb().

#define USER_ADDRESS_SPACE_END_ARCH   ((unsigned long) 0x7fffffff)
 

Definition at line 43 of file as.h.

#define USER_ADDRESS_SPACE_START_ARCH   ((unsigned long) 0x00000000)
 

Definition at line 42 of file as.h.

#define USTACK_ADDRESS_ARCH   (USER_ADDRESS_SPACE_END_ARCH-(PAGE_SIZE-1))
 

Definition at line 45 of file as.h.


Function Documentation

void as_arch_init void   ) 
 

Architecture dependent address space init.

Definition at line 40 of file as.c.

References as_operations, and as_pt_operations.

Referenced by as_init().

static int cmd_e820mem cmd_arg_t argv  )  [static]
 

Definition at line 91 of file frame.c.

References e820counter, e820names, e820table, MEMMAP_MEMORY_UNUSABLE, name, and printf().

Here is the call graph for this function:

void frame_arch_init void   ) 
 

Definition at line 111 of file frame.c.

References ADDR2PFN(), AP_BOOT_OFFSET, cmd_initialize(), cmd_register(), config, config_t::cpu_active, e820_info, frame_mark_unavailable(), FRAME_WIDTH, hardcoded_unmapped_kdata_size, hardcoded_unmapped_ktext_size, init_e820_memory(), and max.

Referenced by frame_init().

Here is the call graph for this function:

size_t get_memory_size void   ) 
 

Definition at line 44 of file memory_init.c.

References e801memorysize.

Referenced by main_bsp().

__address hw_map __address  physaddr,
size_t  size
 

Definition at line 81 of file page.c.

References ADDR2PFN(), ALIGN_UP, AS_KERNEL, FRAME_SIZE, KERNEL_ADDRESS_SPACE_END_ARCH, last_frame, page_mapping_insert(), PAGE_NOT_CACHEABLE, PAGE_SIZE, panic, and PFN2ADDR().

Referenced by ega_init(), and fb_init().

Here is the call graph for this function:

static void init_e820_memory pfn_t  minconf  )  [static]
 

Definition at line 56 of file frame.c.

References ADDR2PFN(), ALIGN_DOWN, ALIGN_UP, e820counter, e820table, FRAME_SIZE, last_frame, MEMMAP_MEMORY_AVAILABLE, SIZE2FRAMES(), and zone_create().

Referenced by frame_arch_init().

Here is the call graph for this function:

void memory_print_map void   ) 
 

Definition at line 49 of file memory_init.c.

References e820memmap_::base_address, e820counter, e820table, MEMMAP_MEMORY_ACPI, MEMMAP_MEMORY_AVAILABLE, MEMMAP_MEMORY_NVS, MEMMAP_MEMORY_RESERVED, MEMMAP_MEMORY_UNUSABLE, printf(), e820memmap_::size, and e820memmap_::type.

Referenced by arch_pre_smp_init().

Here is the call graph for this function:

void page_arch_init void   ) 
 

Definition at line 52 of file page.c.

References AS_KERNEL, config_t::base, config, config_t::cpu_active, exc_register(), FRAME_SIZE, config_t::kernel_size, last_frame, PAGE_CACHEABLE, page_fault(), PAGE_GLOBAL, page_mapping_insert(), and pt_mapping_operations.

Referenced by page_init().

Here is the call graph for this function:

void page_fault int  n,
istate_t istate
 

Definition at line 96 of file page.c.

References as_page_fault(), istate::error_word, fault_if_from_uspace, panic, PF_ACCESS_READ, PF_ACCESS_WRITE, PRINT_INFO_ERRCODE(), and printf().

Referenced by as_page_fault(), and page_arch_init().

Here is the call graph for this function:

void tlb_invalidate_all void   ) 
 

Invalidate all entries in TLB.

Definition at line 42 of file tlb.c.

Referenced by tlb_invalidate_asid(), and tlb_shootdown_ipi_recv().

void tlb_invalidate_asid asid_t  asid  ) 
 

Invalidate all entries in TLB that belong to specified address space.

Parameters:
asid This parameter is ignored as the architecture doesn't support it.

Definition at line 51 of file tlb.c.

References tlb_invalidate_all().

Referenced by tlb_shootdown_ipi_recv().

Here is the call graph for this function:

void tlb_invalidate_pages asid_t  asid,
__address  page,
count_t  cnt
 

Invalidate TLB entries for specified page range belonging to specified address space.

Parameters:
asid This parameter is ignored as the architecture doesn't support it.
page Address of the first page whose entry is to be invalidated.
cnt Number of entries to invalidate.

Definition at line 62 of file tlb.c.

References invlpg(), and PAGE_SIZE.

Referenced by tlb_shootdown_ipi_recv().

Here is the call graph for this function:


Variable Documentation

__u32 e801memorysize
 

Size of available memory in KB.

Definition at line 42 of file memory_init.c.

Referenced by get_memory_size().

cmd_info_t e820_info [static]
 

Initial value:

 {
        .name = "e820list",
        .description = "List e820 memory.",
        .func = cmd_e820mem,
        .argc = 0
}

Definition at line 80 of file frame.c.

Referenced by frame_arch_init().

__u8 e820counter = 0xff
 

Definition at line 40 of file memory_init.c.

Referenced by cmd_e820mem(), init_e820_memory(), and memory_print_map().

char* e820names[] [static]
 

Initial value:

 { "invalid", "available", "reserved",
                             "acpi", "nvs", "unusable" }

Definition at line 87 of file frame.c.

Referenced by cmd_e820mem().

struct e820memmap_ e820table[MEMMAP_E820_MAX_RECORDS]
 

Definition at line 41 of file memory_init.c.

Referenced by cmd_e820mem(), init_e820_memory(), and memory_print_map().

size_t hardcoded_unmapped_kdata_size = 0
 

Definition at line 52 of file frame.c.

Referenced by frame_arch_init().

size_t hardcoded_unmapped_ktext_size = 0
 

Definition at line 51 of file frame.c.

Referenced by frame_arch_init().

__address last_frame = 0
 

Definition at line 54 of file frame.c.

Referenced by hw_map(), init_e820_memory(), and page_arch_init().


Generated on Sun Jun 18 16:47:17 2006 for HelenOS Kernel (ia32) by  doxygen 1.4.6