/branches/sparc/kernel/arch/sparc64/src/sun4v/sparc64.c |
---|
56,13 → 56,6 |
/** Perform sparc64 specific initialization before main_bsp() is called. */ |
void arch_pre_main(void) |
{ |
/* |
* Initialize Niagara input/output driver. |
* This will be moved to arch_post_mm_init when the memory management |
* is finished for sun4v. |
*/ |
niagara_init(); |
/* Copy init task info. */ |
init.cnt = bootinfo.taskmap.count; |
71,13 → 64,10 |
for (i = 0; i < bootinfo.taskmap.count; i++) { |
init.tasks[i].addr = (uintptr_t) bootinfo.taskmap.tasks[i].addr; |
init.tasks[i].size = bootinfo.taskmap.tasks[i].size; |
printf("Task %d starts at %x and its size id %d.\n", i, init.tasks[i].addr, init.tasks[i].size); |
} |
/* Copy boot allocations info. */ |
ballocs.base = bootinfo.ballocs.base; |
ballocs.size = bootinfo.ballocs.size; |
ofw_tree_init(bootinfo.ofw_root); |
// md_init(); |
} |
/** Perform sparc64 specific initialization before mm is initialized. */ |
96,9 → 86,12 |
* But we only create 128 buckets. |
*/ |
irq_init(1 << 11, 128); |
} |
standalone_sparc64_console_init(); |
} |
/* |
* Initialize Niagara input/output driver. |
*/ |
niagara_init(); |
} |
void arch_post_cpu_init(void) |
/branches/sparc/kernel/arch/sparc64/src/sun4v/start.S |
---|
31,9 → 31,10 |
#include <arch/stack.h> |
#include <arch/sun4v/regdef.h> |
#include <arch/sun4v/hypercall.h> |
#include <arch/mm/pagesize.h> |
#include <arch/mm/sun4v/tte.h> |
#include <arch/mm/sun4v/mmu.h> |
#include <arch/mm/tlb.h> |
#include <arch/mm/sun4v/tlb.h> |
.register %g2, #scratch |
.register %g3, #scratch |
44,13 → 45,6 |
#define PHYSMEM_ADDR_SIZE 56 |
/* |
* SILO for an unknown reason loads the image to MAPPING_OFFSET + 0x4000 bytes |
* from the start of the physical memory. We pretend that the physical memory |
* starts MAPPING_OFFSET bytes further than it actually does. |
*/ |
#define MAPPING_OFFSET 0x400000 |
/* |
* Flags set in the TTE data entry mapping the kernel. |
*/ |
#ifdef CONFIG_VIRT_IDX_DCACHE |
118,10 → 112,6 |
! l5 <= physmem_base[(PHYSMEM_ADDR_SIZE - 1):13] |
sllx %l5, 13 + (63 - (PHYSMEM_ADDR_SIZE - 1)), %l5 |
srlx %l5, 63 - (PHYSMEM_ADDR_SIZE - 1), %l5 |
! pretend the physical memory starts further |
set MAPPING_OFFSET, %g2 |
add %l5, %g2, %l5 |
/* |
* Setup basic runtime environment. |