ppc64
[Memory management]


Files

file  as.h
file  asid.h
file  frame.h
file  memory_init.h
file  page.h
file  tlb.h
file  as.c
file  frame.c
file  memory_init.c
file  page.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   (0x7fffffff-(PAGE_SIZE-1))
#define as_install_arch(as)
#define ASID_MAX_ARCH   3
#define asid_get()   (ASID_START+1)
#define asid_put(asid)
#define FRAME_WIDTH   12
#define FRAME_SIZE   (1 << FRAME_WIDTH)
#define PAGE_WIDTH   FRAME_WIDTH
#define PAGE_SIZE   FRAME_SIZE

Typedefs

typedef int asid_t

Functions

void as_arch_init (void)
size_t get_memory_size (void)
void memory_print_map (void)
void frame_arch_init (void)
static pte_tfind_mapping_and_check (as_t *as, bool lock, __address badvaddr, int access, istate_t *istate, int *pfrc)
static void pht_refill_fail (__address badvaddr, istate_t *istate)
static void pht_insert (const __address vaddr, const pfn_t pfn)
void pht_refill (bool data, istate_t *istate)
void pht_init (void)
void page_arch_init (void)
__address hw_map (__address physaddr, size_t size)
void tlb_arch_init (void)
void tlb_invalidate_all (void)
void tlb_invalidate_asid (asid_t asid)
void tlb_invalidate_pages (asid_t asid, __address page, count_t cnt)
void tlb_print (void)

Variables

__address last_frame = 0
static phte_t * phte

Define Documentation

#define as_install_arch as   ) 
 

Definition at line 47 of file as.h.

Referenced by as_switch().

#define asid_get void   )     (ASID_START+1)
 

Definition at line 42 of file asid.h.

Referenced by as_switch().

#define ASID_MAX_ARCH   3
 

Definition at line 40 of file asid.h.

#define asid_put asid   ) 
 

Definition at line 43 of file asid.h.

Referenced by as_destroy().

#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(), frame_arch_init(), hw_map(), 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(), 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(), 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 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   (0x7fffffff-(PAGE_SIZE-1))
 

Definition at line 45 of file as.h.


Typedef Documentation

typedef int asid_t
 

Definition at line 38 of file asid.h.


Function Documentation

void as_arch_init void   ) 
 

Architecture dependent address space init.

Definition at line 39 of file as.c.

References as_operations, and as_pt_operations.

Referenced by as_init().

static pte_t* find_mapping_and_check as_t as,
bool  lock,
__address  badvaddr,
int  access,
istate_t istate,
int *  pfrc
[static]
 

Try to find PTE for faulting address

Try to find PTE for faulting address. The as->lock must be held on entry to this function if lock is true.

Parameters:
as Address space.
lock Lock/unlock the address space.
badvaddr Faulting virtual address.
access Access mode that caused the fault.
istate Pointer to interrupted state.
pfrc Pointer to variable where as_page_fault() return code will be stored.
Returns:
PTE on success, NULL otherwise.

Definition at line 68 of file page.c.

References as_page_fault(), ASSERT, NULL, pte_t::p, page_mapping_find(), page_table_lock(), page_table_unlock(), panic, and printf().

Referenced by pht_refill().

Here is the call graph for this function:

void frame_arch_init void   ) 
 

Definition at line 44 of file frame.c.

References ADDR2PFN(), ALIGN_DOWN, ALIGN_UP, bootinfo, memmap_t::count, FRAME_SIZE, last_frame, bootinfo_t::memmap, memzone_t::size, SIZE2FRAMES(), memzone_t::start, zone_create(), and memmap_t::zones.

Referenced by frame_init().

Here is the call graph for this function:

size_t get_memory_size void   ) 
 

Definition at line 41 of file memory_init.c.

References bootinfo, bootinfo_t::memmap, and memmap_t::total.

Referenced by main_bsp().

__address hw_map __address  physaddr,
size_t  size
 

Definition at line 291 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 fb_init().

Here is the call graph for this function:

void memory_print_map void   ) 
 

Definition at line 47 of file memory_init.c.

References bootinfo, memmap_t::count, bootinfo_t::memmap, printf(), memzone_t::size, memzone_t::start, and memmap_t::zones.

Referenced by arch_pre_smp_init().

Here is the call graph for this function:

void page_arch_init void   ) 
 

Definition at line 258 of file page.c.

References AS_KERNEL, ASSERT, config_t::base, config, config_t::cpu_active, frame_alloc, FRAME_KA, FRAME_PANIC, FRAME_SIZE, config_t::kernel_size, last_frame, PAGE_CACHEABLE, PAGE_GLOBAL, page_mapping_insert(), PFN2ADDR(), pht_init(), phte, and pt_mapping_operations.

Referenced by page_init().

Here is the call graph for this function:

void pht_init void   ) 
 

Definition at line 252 of file page.c.

References memsetb(), and phte.

Referenced by before_thread_runs_arch(), and page_arch_init().

Here is the call graph for this function:

static void pht_insert const __address  vaddr,
const pfn_t  pfn
[static]
 

Definition at line 130 of file page.c.

References phte.

Referenced by pht_refill().

void pht_refill bool  data,
istate_t istate
 

Process Instruction/Data Storage Interrupt

Parameters:
data True if Data Storage Interrupt.
istate Interrupted register context.

Definition at line 196 of file page.c.

References pte_t::a, AS, AS_KERNEL, find_mapping_and_check(), NULL, page_table_lock(), page_table_unlock(), panic, istate::pc, PF_ACCESS_READ, pte_t::pfn, pht_insert(), and pht_refill_fail().

Here is the call graph for this function:

static void pht_refill_fail __address  badvaddr,
istate_t istate
[static]
 

Definition at line 115 of file page.c.

References get_symtab_entry(), istate::lr, panic, and istate::pc.

Referenced by pht_refill().

Here is the call graph for this function:

void tlb_arch_init void   ) 
 

Initialize Page Hash Table.

Setup the Page Hash Table with no entries.

Definition at line 43 of file tlb.c.

References tlb_invalidate_all().

Referenced by tlb_init().

Here is the call graph for this function:

void tlb_invalidate_all void   ) 
 

Definition at line 49 of file tlb.c.

Referenced by before_thread_runs_arch(), tlb_arch_init(), tlb_invalidate_asid(), tlb_invalidate_pages(), 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 62 of file tlb.c.

References tlb_invalidate_all().

Referenced by asid_get(), and 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 73 of file tlb.c.

References tlb_invalidate_all().

Referenced by tlb_shootdown_ipi_recv().

Here is the call graph for this function:

void tlb_print void   ) 
 

Print contents of Page Hash Table.

Definition at line 81 of file tlb.c.

Referenced by cmd_tlb().


Variable Documentation

__address last_frame = 0
 

Definition at line 42 of file frame.c.

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

phte_t* phte [static]
 

Definition at line 50 of file page.c.

Referenced by page_arch_init(), pht_init(), and pht_insert().


Generated on Sun Jun 18 17:34:51 2006 for HelenOS Kernel (ppc64) by  doxygen 1.4.6