/branches/sparc/kernel/arch/sparc64/include/sun4v/md.h |
---|
File deleted |
/branches/sparc/kernel/arch/sparc64/include/sun4v/hypercall.h |
---|
117,9 → 117,6 |
#ifndef __ASM__ |
#include <typedefs.h> |
#include <arch/types.h> |
/* |
* Macros to be used from the C-language code; __hypercall_fastN performs |
* a fast hypervisor API call taking exactly N arguments. |
/branches/sparc/kernel/arch/sparc64/include/cpu.h |
---|
40,6 → 40,7 |
#include <arch/types.h> |
#include <typedefs.h> |
#include <arch/register.h> |
#include <arch/sun4u/regdef.h> |
typedef struct { |
uint32_t mid; /**< Processor ID as read from |
/branches/sparc/kernel/arch/sparc64/src/cpu/sun4v/cpu.c |
---|
40,8 → 40,6 |
#include <arch/drivers/tick.h> |
#include <print.h> |
#include <arch/cpu_node.h> |
#include <arch/sun4v/md.h> |
#include <arch/sun4v/hypercall.h> |
/** Perform sparc64 specific initialization of the processor structure for the |
* current processor. |
48,34 → 46,12 |
*/ |
void cpu_arch_init(void) |
{ |
uint64_t myid; |
__hypercall_fast_ret1(0, 0, 0, 0, 0, CPU_MYID, &myid); |
md_node_t node = md_get_root(); |
/* walk through MD, find the current CPU node & its clock-frequency */ |
while (true) { |
if (!md_next_node(&node, "cpu")) { |
panic("Could not determine CPU frequency."); |
} |
uint64_t id = 0; |
md_get_integer_property(node, "id", &id); |
if (id == myid) { |
uint64_t clock_frequency = 0; |
md_get_integer_property(node, "clock-frequency", |
&clock_frequency); |
CPU->arch.clock_frequency = clock_frequency; |
break; |
} |
} |
// TODO: detect the real frequency as soon as MD walkthrough is implemented |
CPU->arch.clock_frequency = 5000; |
tick_init(); |
} |
/** |
* Implemented as an empty function as accessing the VER register is |
/** Implemented as an empty function as accessing the VER register is |
* a hyperprivileged operation on sun4v. |
*/ |
void cpu_identify(void) |
/branches/sparc/kernel/arch/sparc64/src/sun4v/md.c |
---|
File deleted |
/branches/sparc/kernel/arch/sparc64/src/sun4v/sparc64.c |
---|
44,7 → 44,6 |
#include <arch/asm.h> |
#include <arch/mm/page.h> |
#include <arch/stack.h> |
#include <arch/sun4v/md.h> |
#include <genarch/ofw/ofw_tree.h> |
#include <userspace.h> |
#include <ddi/irq.h> |
68,7 → 67,7 |
printf("Task %d starts at %x and its size id %d.\n", i, init.tasks[i].addr, init.tasks[i].size); |
} |
md_init(); |
// md_init(); |
} |
/** Perform sparc64 specific initialization before mm is initialized. */ |
/branches/sparc/kernel/arch/sparc64/Makefile.inc |
---|
140,8 → 140,7 |
# sun4v-specific sources |
ifeq ($(USARCH),sun4v) |
ARCH_SOURCES += \ |
arch/$(ARCH)/src/drivers/niagara.c \ |
arch/$(ARCH)/src/sun4v/md.c |
arch/$(ARCH)/src/drivers/niagara.c |
endif |
ifeq ($(CONFIG_SMP),y) |