Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2237 → Rev 2238

/branches/arm/kernel/arch/arm32/src/mm/tlb.c
1,5 → 1,5
/*
* Copyright (c) 2005 Jakub Jermar
* Copyright (c) 2007 Michal Kebrt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
41,8 → 41,7
/** Invalidate all entries in TLB. */
void tlb_invalidate_all(void)
{
asm volatile (
asm volatile (
"eor r1, r1\n"
"MCR p15, 0, r1, c8, c7, 0\n" // see ARM Architecture reference relE 3.7.7 p.528
62,7 → 61,7
/** Invalidate single entry in TLB
* @param page Virtual adress of the page
*/
static inline void invlpg(uintptr_t page)
static inline void invalidate_page(uintptr_t page)
{
asm volatile (
"MCR p15, 0, %0, c8, c7, 1"
83,7 → 82,7
unsigned int i;
 
for (i = 0; i < cnt; i++)
invlpg(page + i * PAGE_SIZE);
invalidate_page(page + i * PAGE_SIZE);
}
 
/** @}
/branches/arm/kernel/arch/arm32/src/mm/as.c
1,5 → 1,5
/*
* Copyright (c) 2005 Jakub Jermar
* Copyright (c) 2007 Pavel Jancik, Michal Kebrt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
/branches/arm/kernel/arch/arm32/src/mm/frame.c
1,5 → 1,5
/*
* Copyright (c) 2005 Jakub Jermar
* Copyright (c) 2007 Pavel Jancik, Michal Kebrt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
39,15 → 39,14
/** Create memory zones. */
void frame_arch_init(void)
{
aux_printf("frame_arch_init ... begin\n");
// all memory as one zone
aux_printf("frame_arch_init ... begin\n");
// all memory as one zone
zone_create(0, ADDR2PFN(config.memory_size), 11, 0);
/*
* Blacklist interrupt vector + Kernels from boot loader page table
*/
frame_mark_unavailable(0, 10);
aux_printf("frame_arch_init ... end\n");
 
aux_printf("frame_arch_init ... end\n");
}
 
/** @}
/branches/arm/kernel/arch/arm32/src/mm/memory_init.c
1,5 → 1,5
/*
* Copyright (c) 2005 Josef Cejka
* Copyright (c) 2007 Pavel Jancik
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
/branches/arm/kernel/arch/arm32/src/mm/page.c
1,5 → 1,5
/*
* Copyright (c) 2003-2004 Jakub Jermar
* Copyright (c) 2007 Pavel Jancik, Michal Kebrt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
41,21 → 41,19
 
void page_arch_init(void)
{
 
uintptr_t cur;
uintptr_t cur;
int flags;
 
page_mapping_operations = &pt_mapping_operations;
 
flags = PAGE_CACHEABLE;
const unsigned maxmem = ALIGN_DOWN(config.memory_size, FRAME_SIZE);
for (cur = 0; cur < maxmem; cur += FRAME_SIZE) {
// page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
const unsigned maxmem = ALIGN_DOWN(config.memory_size, FRAME_SIZE);
 
for (cur = 0; cur < maxmem; cur += FRAME_SIZE) {
//page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
}
//TODO set page fault routines
// no problem no ... kernel doesn't do page faults
}
 
/** Map device into kernel space. */