Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 367 → Rev 368

/SPARTAN/trunk/arch/ia64/Makefile.inc
32,4 → 32,5
arch/cpu/cpu.c \
arch/ivt.S \
arch/interrupt_handler.c \
arch/fmath.c
arch/fmath.c \
arch/mm/frame.c
/SPARTAN/trunk/arch/ia64/src/mm/frame.c
0,0 → 1,43
/*
* Copyright (C) 2005 Jakub Jermar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
#include <arch/mm/frame.h>
#include <mm/frame.h>
#include <config.h>
#include <panic.h>
 
void frame_arch_init(void)
{
zone_t *z;
z = zone_create(0, config.memory_size, 0);
if (!z) {
panic("Can't allocate zone (%dB).\n", config.memory_size);
}
zone_attach(z);
}
/SPARTAN/trunk/arch/ia64/src/dummy.s
40,7 → 40,6
.global cpu_priority_read
.global cpu_priority_restore
.global cpu_sleep
.global frame_arch_init
.global dummy
.global fpu_enable
.global fpu_disable
58,7 → 57,6
cpu_priority_read:
cpu_priority_restore:
cpu_sleep:
frame_arch_init:
fpu_init:
fpu_enable:
fpu_disable:
/SPARTAN/trunk/arch/ppc32/src/mm/frame.c
28,7 → 28,16
 
#include <arch/mm/frame.h>
#include <mm/frame.h>
#include <config.h>
#include <panic.h>
 
void frame_arch_init(void)
{
zone_t *z;
 
z = zone_create(0, config.memory_size & ~(FRAME_SIZE-1), 0);
if (!z) {
panic("Can't allocate zone (%dB).\n", config.memory_size & ~(FRAME_SIZE-1));
}
zone_attach(z);
}
/SPARTAN/trunk/arch/amd64/src/mm/page.c
52,7 → 52,7
/*
* PA2KA(identity) mapping for all frames.
*/
for (i = 0; i < frames; i++) {
for (i = 0; i < config.memory_size/FRAME_SIZE; i++) {
map_page_to_frame(PA2KA(i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE | PAGE_EXEC, KA2PA(dba));
}
 
/SPARTAN/trunk/arch/mips32/src/mm/frame.c
30,9 → 30,19
#include <mm/frame.h>
#include <arch/asm/boot.h>
#include <arch/mm/page.h>
#include <config.h>
#include <panic.h>
 
void frame_arch_init(void)
{
zone_t *z;
z = zone_create(0, config.memory_size, 0);
if (!z) {
panic("Can't allocate zone (%dB).\n", config.memory_size);
}
zone_attach(z);
 
/* Disable Everything until load address */
frame_region_not_free(0, KA2PA(KERNEL_LOAD_ADDRESS));
}
/SPARTAN/trunk/arch/ia32/src/smp/mps.c
187,8 → 187,6
fs_found:
printf("%P: MPS Floating Pointer Structure\n", fs);
 
frame_not_free((__address) fs);
 
if (fs->config_type == 0 && fs->configuration_table) {
if (fs->mpfib2 >> 7) {
printf("%s: PIC mode not supported\n", __FUNCTION__);
196,7 → 194,6
}
 
ct = (struct mps_ct *)PA2KA((__address)fs->configuration_table);
frame_not_free((__address) ct);
config.cpu_count = configure_via_ct();
}
else
/SPARTAN/trunk/arch/ia32/src/mm/frame.c
32,6 → 32,7
#include <config.h>
#include <arch/boot/boot.h>
#include <arch/boot/memmap.h>
#include <panic.h>
 
size_t hardcoded_unmapped_ktext_size = 0;
size_t hardcoded_unmapped_kdata_size = 0;
38,23 → 39,23
 
void frame_arch_init(void)
{
zone_t *z;
__u8 i;
if (config.cpu_active == 1) {
/* Reserve the NULL frame */
frame_not_free(0x0);
/* Reserve well-known memory regions */
frame_region_not_free(0xa0000,0xff000);
frame_region_not_free(0xfec00000,0xffffffff);
/* Reserve real mode bootstrap memory */
frame_region_not_free(BOOTSTRAP_OFFSET, BOOTSTRAP_OFFSET + hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size);
for (i=e820counter;i>0;i--) {
if (e820table[i-1].type!=MEMMAP_MEMORY_AVAILABLE) {
frame_region_not_free(e820table[i-1].base_address, e820table[i-1].base_address+e820table[i-1].size);
if (e820table[i-1].type==MEMMAP_MEMORY_AVAILABLE) {
z = zone_create(e820table[i-1].base_address, e820table[i-1].size & ~(FRAME_SIZE-1), 0);
if (!z) {
panic("Cannot allocate zone (%dB).\n", e820table[i-1].size & ~(FRAME_SIZE-1));
}
zone_attach(z);
}
}
frame_not_free(0);
 
/* Reserve real mode bootstrap memory */
frame_region_not_free(BOOTSTRAP_OFFSET, BOOTSTRAP_OFFSET + hardcoded_unmapped_ktext_size + hardcoded_unmapped_kdata_size);
}
}
/SPARTAN/trunk/arch/ia32/src/mm/page.c
55,7 → 55,7
/*
* PA2KA(identity) mapping for all frames.
*/
for (i = 0; i < frames; i++)
for (i = 0; i < config.memory_size/PAGE_SIZE; i++)
map_page_to_frame(PA2KA(i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE, KA2PA(dba));
 
trap_register(14, page_fault);