Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1789 → Rev 1790

/trunk/boot/arch/sparc64/loader/asm.S
98,9 → 98,11
mov %o1, %o0
 
jump_to_kernel:
set ofw_cif, %l0
jmp %o0 ! jump to kernel
ldx [%l0], %o4 ! pass OpenFirmware address in %o4
mov %o0, %l1
mov %o1, %o0
mov %o2, %o1
jmp %l1 ! jump to kernel
nop
 
.global ofw
ofw:
/trunk/boot/arch/sparc64/loader/main.c
80,15 → 80,17
 
printf("\nCopying components\n");
unsigned int top = 0;
bootinfo.cnt = 0;
bootinfo.taskmap.count = 0;
for (i = 0; i < COMPONENTS; i++) {
void * base = (void *) KERNEL_VIRTUAL_ADDRESS;
printf(" %s...", components[i].name);
top = ALIGN_UP(top, PAGE_SIZE);
memcpy(((void *) KERNEL_VIRTUAL_ADDRESS) + top, components[i].start, components[i].size);
memcpy(base + top, components[i].start, components[i].size);
if (i > 0) {
bootinfo.tasks[bootinfo.cnt].addr = ((void *) KERNEL_VIRTUAL_ADDRESS) + top;
bootinfo.tasks[bootinfo.cnt].size = components[i].size;
bootinfo.cnt++;
bootinfo.taskmap.tasks[bootinfo.taskmap.count].addr = base + top;
bootinfo.taskmap.tasks[bootinfo.taskmap.count].size = components[i].size;
bootinfo.taskmap.count++;
}
top += components[i].size;
printf("done.\n");
/trunk/boot/arch/sparc64/loader/main.h
30,17 → 30,22
#define BOOT_sparc64_MAIN_H_
 
#include <ofw.h>
#include <types.h>
 
#define TASKMAP_MAX_RECORDS 32
 
typedef struct {
void *addr;
unsigned int size;
uint32_t size;
} task_t;
 
typedef struct {
unsigned int cnt;
uint32_t count;
task_t tasks[TASKMAP_MAX_RECORDS];
} taskmap_t;
 
typedef struct {
taskmap_t taskmap;
memmap_t memmap;
screen_t screen;
keyboard_t keyboard;