Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 206 → Rev 207

/SPARTAN/trunk/include/context.h
38,9 → 38,11
(c)->sp = ((__address) (stack)) + (size) - SP_DELTA;
#endif /* context_set */
 
#ifndef context_map_stack
#define context_map_stack(stack, size)
#endif /* context_map_stack */
 
extern int context_save(context_t *c);
extern void context_restore(context_t *c) __attribute__ ((noreturn));
 
 
 
#endif
/SPARTAN/trunk/src/main/main.c
118,6 → 118,7
 
context_save(&ctx);
context_set(&ctx, FADDR(main_bsp_separated_stack), config.base + kernel_size, CONFIG_STACK_SIZE);
context_map_stack(config.base + kernel_size, CONFIG_STACK_SIZE);
context_restore(&ctx);
/* not reached */
}
133,7 → 134,7
vm_t *m;
task_t *k;
thread_t *t;
 
the_initialize(THE);
 
arch_pre_mm_init();
/SPARTAN/trunk/arch/ppc/include/ppc.h
File deleted
/SPARTAN/trunk/arch/ppc/include/context.h
30,9 → 30,17
#define __ppc_CONTEXT_H__
 
#include <arch/types.h>
#include <arch/drivers/ofw.h>
 
#define SP_DELTA 4
#define SP_DELTA 8
 
#ifdef context_map_stack
#undef context_map_stack
#endif
 
#define context_map_stack(stack, size) \
ofw_claim((void *) stack, size, 0);
 
struct context {
__u32 r0;
__u32 sp;
/SPARTAN/trunk/arch/ppc/include/drivers/ofw.h
57,6 → 57,7
extern void ofw_putchar(const char ch);
extern phandle ofw_find_device(const char *name);
extern int ofw_get_property(const phandle device, const char *name, void *buf, const int buflen);
extern void *ofw_claim(const void *addr, const int size, const int align);
extern void putchar(const char ch);
 
#endif
/SPARTAN/trunk/arch/ppc/Makefile.inc
16,7 → 16,6
 
arch_sources= \
arch/context.S \
arch/ppc.c \
arch/debug/panic.s \
arch/fpu_context.c \
arch/dummy.s \
/SPARTAN/trunk/arch/ppc/src/ppc.c
File deleted
/SPARTAN/trunk/arch/ppc/src/drivers/ofw.c
92,6 → 92,11
return ofw_call("getprop", 4, 1, device, name, buf, buflen);
}
 
void *ofw_claim(const void *addr, const int size, const int align)
{
return (void *) ofw_call("claim", 3, 1, addr, size, align);
}
 
void putchar(const char ch)
{
ofw_putchar(ch);
/SPARTAN/trunk/arch/ppc/src/start.S
33,7 → 33,9
.global kernel_image_start
 
kernel_image_start:
bl early_init
lis r4, ofw@ha
addi r4, r4, ofw@l
stw r5, 0(r4)
lis r3, _hardcoded_ktext_size@ha
addi r3, r3, _hardcoded_ktext_size@l
53,4 → 55,6
addi r4, r4, hardcoded_load_address@l
stw r3, 0(r4)
bl ofw_init
b main_bsp