Subversion Repositories HelenOS

Compare Revisions

Regard whitespace Rev 2182 → Rev 2180

/branches/arm/kernel/arch/arm32/include/mm/page.h
36,10 → 36,7
#define KERN_arm32_PAGE_H_
 
#include <arch/mm/frame.h>
#include <mm/mm.h>
#include <arch/exception.h>
 
 
#define PAGE_WIDTH FRAME_WIDTH
#define PAGE_SIZE FRAME_SIZE
 
71,7 → 68,7
#define GET_PTL3_ADDRESS_ARCH(ptl2, i) (ptl2)
#define GET_FRAME_ADDRESS_ARCH(ptl3, i) ( (uintptr_t)(((pte_level1_t*)(ptl3))[(i)]).frame_base_addr << 12 ))
 
#define SET_PTL0_ADDRESS_ARCH(ptl0) ( set_ptl0_addr((pte_level0_t *)(ptl0)) )
#define SET_PTL0_ADDRESS_ARCH(ptl0) // TODO
#define SET_PTL1_ADDRESS_ARCH(ptl0, i, a) (((pte_level0_t *)(ptl0))[(i)].coarse_table_addr = (a)>>10)
#define SET_PTL2_ADDRESS_ARCH(ptl1, i, a)
#define SET_PTL3_ADDRESS_ARCH(ptl2, i, a)
95,17 → 92,9
 
#ifndef __ASM__
 
/** Set adress of paging level 0 table
* \param pt pointer to page table to set
*/
static inline void set_ptl0_addr( pte_level0_t* pt){
asm volatile ( "mrc p15, 0, %0, c2, c0, 0 \n"
:
: "r"(pt)
);
#include <mm/mm.h>
#include <arch/exception.h>
}
 
//TODO Comment: Page table structure as in other architectures
static inline int get_pt_level0_flags(pte_level0_t *pt, index_t i)
117,6 → 106,8
( 1 << PAGE_READ_SHIFT ) |
( 1 << PAGE_EXEC_SHIFT ) |
( 1 << PAGE_CACHEABLE )
// Alf Note: MayBe return WriteAble because level0 should use only kernel which can write
// Alf Note: MayBe return global flag if index i > 2048 (horni 2GB because kernel is mapped globaly)
);
 
}
132,6 → 123,7
( (p->access_permission_0 != pte_ap_user_no_kernel_rw) << PAGE_USER_SHIFT ) |
( 1 << PAGE_EXEC_SHIFT ) |
( p->bufferable << PAGE_CACHEABLE )
// Alf Note: MayBe return global flag if index i > 2048 (horni 2GB because kernel is mapped globaly)
);
163,7 → 155,7
if ( flags & PAGE_NOT_PRESENT ) {
p->descriptor_type = pte_descriptor_not_preset;
p->access_permission_3 = 1;
p->access_permission_3 = 1; // Ensure not all bits set to zero ... correct acess rights are stored in other 0-2 access permission entries
} else
{
p->descriptor_type = pte_descriptor_coarse_table;
/branches/arm/kernel/arch/arm32/include/mm/memory_init.h
37,7 → 37,7
 
#include <config.h>
 
size_t get_memory_size(void);
#define get_memory_size() CONFIG_MEMORY_SIZE /* TODO */
 
#endif