Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 794 → Rev 793

/kernel/trunk/generic/src/main/kinit.c
144,7 → 144,7
* Create the first user task.
*/
if (config.init_addr % FRAME_SIZE)
if (KA2PA(config.init_addr) % FRAME_SIZE)
panic("config.init_addr is not frame aligned");
as = as_create(0);
161,10 → 161,7
* Create the text as_area and initialize its mapping.
*/
frame = config.init_addr;
if (IS_KA(frame))
frame = KA2PA(frame);
 
frame = KA2PA(config.init_addr);
frames = config.init_size / FRAME_SIZE;
if (config.init_size % FRAME_SIZE > 0)
frames++;
/kernel/trunk/arch/mips32/src/mips32.c
95,10 → 95,6
debugger_init();
arc_print_memory_map();
arc_print_devices();
 
/* Setup usermode...*/
config.init_addr = 0x20000000;
config.init_size = FRAME_SIZE;
}
 
void arch_post_mm_init(void)
113,14 → 109,6
{
}
 
/* Stack pointer saved when entering user mode */
/* TODO: How do we do it on SMP system???? */
 
/* Why the hell moves the linker the variable 64K away in assembler
* when not in .text section ????????
*/
__address supervisor_sp __attribute__ ((section (".text")));
 
void userspace(void)
{
/* EXL=1, UM=1, IE=1 */
134,6 → 122,10
;
}
 
/* Stack pointer saved when entering user mode */
/* TODO: How do we do it on SMP system???? */
__address supervisor_sp;
 
void before_thread_runs_arch(void)
{
supervisor_sp = (__address) &THREAD->kstack[THREAD_STACK_SIZE-SP_DELTA];
/kernel/trunk/arch/mips32/src/exception.c
40,7 → 40,6
#include <func.h>
#include <console/kconsole.h>
#include <arch/debugger.h>
#include <syscall/syscall.h>
 
static char * exctable[] = {
"Interrupt","TLB Modified","TLB Invalid","TLB Invalid Store",
135,22 → 134,7
exc_dispatch(i+INT_OFFSET, pstate);
}
 
#include <debug.h>
/** Handle syscall userspace call */
static void syscall_exception(int n, void *data)
{
struct exception_regdump *pstate = (struct exception_regdump *)data;
if (pstate->a3 < SYSCALL_END)
pstate->v0 = syscall_table[pstate->a3](pstate->a0,
pstate->a1,
pstate->a2);
else
panic("Undefined syscall %d", pstate->a3);
pstate->epc += 4;
}
 
 
void exception(struct exception_regdump *pstate)
{
int cause;
206,5 → 190,4
#ifdef CONFIG_FPU_LAZY
exc_register(EXC_CpU, "cpunus", cpuns_exception);
#endif
exc_register(EXC_Sys, "syscall", syscall_exception);
}
/kernel/trunk/arch/mips32/include/asm/regname.h
62,8 → 62,8
#define s8 30
#define ra 31
 
#define rindex 0
#define rrandom 1
#define index 0
#define random 1
#define entrylo0 2
#define entrylo1 3
#define context 4
76,12 → 76,12
#define status 12
#define cause 13
#define epc 14
#define rconfig 16
#define config 16
#define lladdr 17
#define watchlo 18
#define watchhi 19
#define xcontext 20
#define rdebug 23
#define debug 23
#define depc 24
#define eepc 30
 
/kernel/trunk/contrib/conf/msim.conf
7,7 → 7,7
add rwm firstmem 0x0 128k load "/dev/zero"
add rwm mainmem 0x00100000 16M load "kernel.bin"
add rom startmem 0x1fc00000 1k load "load.bin"
add rwm init 0x20000000 1M load "init
add rwm init 0x00110000 64k load "init"
 
add dprinter printer 0x10000000
add dkeyboard keyboard 0x10000000 2
/kernel/trunk/contrib/conf/spmips.conf
21,8 → 21,7
(0x180003fd, tty0, 0, 5, 1),
(0x180003fe, tty0, 0, 6, 1),
(0x180003ff, tty0, 0, 7, 1),
(0x1c000000, hfs0, 0, 0, 16),
(0x20000000, initmem0, 0, 0, 0x20000))
(0x1c000000, hfs0, 0, 0, 16))
}
 
OBJECT cbus-space TYPE memory-space {
37,16 → 36,6
queue: cpu0
size: 0x08000000
}
 
OBJECT initmem0 TYPE ram {
image: initmem0-image
}
OBJECT initmem0-image TYPE image {
queue: cpu0
size: 0x20000
files: (("../../../uspace/init/init", "ro", 0,0))
}
 
OBJECT rom0 TYPE rom {
image: rom0-image
}