/branches/sparc/kernel/arch/sparc64/src/sun4v/asm.S |
---|
40,6 → 40,7 |
*/ |
.global switch_to_userspace |
switch_to_userspace: |
wrpr PSTATE_PRIV_BIT, %pstate |
save %o1, -STACK_WINDOW_SAVE_AREA_SIZE, %sp |
flushw |
wrpr %g0, 0, %cleanwin ! avoid information leak |
/branches/sparc/kernel/arch/sparc64/src/sun4v/md.c |
---|
145,6 → 145,32 |
} |
/** |
* Returns the value of the string property of the given node. |
* |
* @param |
*/ |
bool md_get_string_property(md_node_t node, const char *key, |
const char **result) |
{ |
md_header_t *md_header = (md_header_t *) mach_desc; |
element_idx_t idx = node; |
while (get_element(idx)->tag != NODE_END) { |
idx++; |
md_element_t *element = get_element(idx); |
if (element->tag == PROP_DATA && |
strcmp(key, get_element_name(idx)) == 0) { |
*result = (char *) mach_desc + sizeof(md_header_t) + |
md_header->node_blk_sz + md_header->name_blk_sz + |
element->d.y.data_offset; |
return true; |
} |
} |
return false; |
} |
/** |
* Moves the child oterator to the next child (following sibling of the node |
* the oterator currently points to). |
* |
/branches/sparc/kernel/arch/sparc64/src/sun4v/start.S |
---|
131,6 → 131,7 |
wrpr %g0, 0, %tl ! TL = 0, primary context |
! register is used |
wrpr %g0, 0, %gl |
wrpr %g0, PSTATE_PRIV_BIT, %pstate ! disable interrupts and disable |
! 32-bit address masking |
296,6 → 297,25 |
ba 0b |
nop |
.align 8 |
.global temp_cpu_mondo_handler |
temp_cpu_mondo_handler: |
set 0x3c, %o0 |
set 0x15, %o5 |
ta 0x80 |
mov 0, %o0 |
setx before_ap_boots, %g1, %o1 |
setx 0x80400000, %g1, %o2 |
add %o1, %o2, %o1 |
__HYPERCALL_FAST(MMU_ENABLE) |
before_ap_boots: |
setx 0x80400000, %g0, %o0 |
ba kernel_image_start |
nop |
.section K_DATA_START, "aw", @progbits |
#define INITIAL_STACK_SIZE 1024 |