Changeset 673

Show
Ignore:
Timestamp:
01/31/10 13:16:46 (6 weeks ago)
Author:
blueswirl
Message:

sparc64: implement reset

Signed-off-by: Blue Swirl <blauwirbel@…>

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/openbios-devel/arch/sparc64/openbios.c

    r669 r673  
    9393} 
    9494 
     95/* Reset control register is defined in 17.2.7.3 of US IIi User Manual */ 
     96static void 
     97sparc64_reset_all(void) 
     98{ 
     99    unsigned long addr = 0x1fe0000f020ULL; 
     100    unsigned long val = 1 << 29; 
     101 
     102    asm("stxa %0, [%1] 0x15\n\t" 
     103        : : "r" (val), "r" (addr) : "memory"); 
     104} 
     105 
    95106static void cpu_generic_init(const struct cpudef *cpu, uint32_t clock_frequency) 
    96107{ 
     
    147158    fword("find-device"); 
    148159    bind_func("SUNW,set-trap-table", set_trap_table); 
     160 
     161    // Reset 
     162    bind_func("sparc64-reset-all", sparc64_reset_all); 
     163    push_str("' sparc64-reset-all to reset-all"); 
     164    fword("eval"); 
    149165} 
    150166