Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1792 → Rev 1793

/trunk/kernel/generic/src/mm/as.c
1521,13 → 1521,13
return (unative_t) -1;
}
 
/** Wrapper for as_area_resize. */
/** Wrapper for as_area_resize(). */
unative_t sys_as_area_resize(uintptr_t address, size_t size, int flags)
{
return (unative_t) as_area_resize(AS, address, size, 0);
}
 
/** Wrapper for as_area_destroy. */
/** Wrapper for as_area_destroy(). */
unative_t sys_as_area_destroy(uintptr_t address)
{
return (unative_t) as_area_destroy(AS, address);
/trunk/kernel/arch/sparc64/include/mm/frame.h
26,7 → 26,7
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup sparc64mm
/** @addtogroup sparc64mm
* @{
*/
/** @file
47,13 → 47,14
uintptr_t address;
struct {
unsigned : 23;
uint64_t pfn : 28; /**< Physical Frame Number. */
unsigned offset : 13; /**< Offset. */
uint64_t pfn : 28; /**< Physical Frame Number. */
unsigned offset : 13; /**< Offset. */
} __attribute__ ((packed));
};
 
typedef union frame_address frame_address_t;
 
extern uintptr_t last_frame;
extern void frame_arch_init(void);
 
#endif
61,6 → 62,5
 
#endif
 
/** @}
/** @}
*/
 
/trunk/kernel/arch/sparc64/src/mm/tlb.c
59,6 → 59,11
 
void tlb_arch_init(void)
{
/*
* TLBs are actually initialized by
* take_over_tlb_and_tt() early
* in start.S.
*/
}
 
/** Insert privileged mapping into DMMU TLB.
/trunk/kernel/arch/sparc64/src/mm/frame.c
35,9 → 35,13
#include <arch/mm/frame.h>
#include <mm/frame.h>
#include <arch/boot/boot.h>
#include <arch/types.h>
#include <config.h>
#include <align.h>
#include <macros.h>
 
uintptr_t last_frame = NULL;
 
/** Create memory zones according to information stored in bootinfo.
*
* Walk the bootinfo memory map and create frame zones according to it.
50,6 → 54,8
pfn_t confdata;
 
for (i = 0; i < bootinfo.memmap.count; i++) {
uintptr_t start = bootinfo.memmap.zones[i].start;
size_t size = bootinfo.memmap.zones[i].size;
 
/*
* The memmap is created by HelenOS boot loader.
56,12 → 62,12
* It already contains no holes.
*/
confdata = ADDR2PFN(bootinfo.memmap.zones[i].start);
confdata = ADDR2PFN(start);
if (confdata == 0)
confdata = 2;
zone_create(ADDR2PFN(bootinfo.memmap.zones[i].start),
SIZE2FRAMES(ALIGN_DOWN(bootinfo.memmap.zones[i].size, PAGE_SIZE)),
confdata, 0);
zone_create(ADDR2PFN(start), SIZE2FRAMES(ALIGN_DOWN(size, FRAME_SIZE)), confdata, 0);
last_frame = max(last_frame, start + ALIGN_UP(size, FRAME_SIZE));
}
 
}
/trunk/kernel/arch/sparc64/src/mm/page.c
26,7 → 26,7
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
/** @addtogroup sparc64mm
/** @addtogroup sparc64mm
* @{
*/
/** @file
36,8 → 36,10
#include <arch/mm/tlb.h>
#include <genarch/mm/page_ht.h>
#include <mm/frame.h>
#include <arch/mm/frame.h>
#include <bitops.h>
#include <debug.h>
#include <align.h>
 
void page_arch_init(void)
{
72,9 → 74,16
order = 0;
else
order = (fnzb32(size - 1) + 1) - FRAME_WIDTH;
 
/*
* Use virtual addresses that are beyond the limit of physical memory.
* Thus, the physical address space will not be wasted by holes created
* by frame_alloc().
*/
ASSERT(last_frame);
uintptr_t virtaddr = ALIGN_UP(last_frame, 1<<(order + FRAME_WIDTH));
last_frame = ALIGN_UP(virtaddr + size, 1<<(order + FRAME_WIDTH));
uintptr_t virtaddr = (uintptr_t) frame_alloc(order, FRAME_KA);
 
for (i = 0; i < sizemap[order].count; i++)
dtlb_insert_mapping(virtaddr + i*sizemap[order].increment,
physaddr + i*sizemap[order].increment,
83,6 → 92,5
return virtaddr;
}
 
/** @}
/** @}
*/
 
/trunk/kernel/arch/ia32/src/mm/frame.c
136,7 → 136,7
(hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size) >> FRAME_WIDTH);
#ifdef CONFIG_SIMICS_FIX
/* Don't know why, but this addresses help */
/* Don't know why, but these addresses help */
frame_mark_unavailable(0xd000 >> FRAME_WIDTH,3);
#endif
#endif