diff options
author | Richard Henderson <rth@twiddle.net> | 2011-04-27 09:43:00 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2011-04-27 09:43:00 -0700 |
commit | ea0e38f6bc1e458b34b11b40c1092036db34f548 (patch) | |
tree | 78a8757d7a5d6bc16cce2c63beb652b78dd520a6 /init.c | |
parent | 331e6b4c75dd8095a29ed2991e32a862dc40074b (diff) | |
download | qemu-palcode-ea0e38f6bc1e458b34b11b40c1092036db34f548.zip qemu-palcode-ea0e38f6bc1e458b34b11b40c1092036db34f548.tar.gz qemu-palcode-ea0e38f6bc1e458b34b11b40c1092036db34f548.tar.bz2 |
Re-org for Clipper system.
Diffstat (limited to 'init.c')
-rw-r--r-- | init.c | 28 |
1 files changed, 22 insertions, 6 deletions
@@ -3,6 +3,7 @@ #include "hwrpb.h" #include "osf.h" #include "uart.h" +#include SYSTEM_H #define PAGE_SHIFT 13 #define PAGE_SIZE (1ul << PAGE_SHIFT) @@ -141,6 +142,7 @@ static void init_hwrpb (unsigned long memsize) { unsigned long pal_pages; + unsigned long cpu_type; hwrpb.hwrpb.phys_addr = PA(&hwrpb); @@ -167,14 +169,15 @@ init_hwrpb (unsigned long memsize) ((int *)hwrpb.hwrpb.ssn)[2] = ( 'U' << 0); /* For now, hard-code emulation of sx164. */ - hwrpb.hwrpb.cpuid = PCA56_CPU; + cpu_type = init_cpuid(); + hwrpb.hwrpb.cpuid = cpu_type; hwrpb.hwrpb.pagesize = PAGE_SIZE; hwrpb.hwrpb.pa_bits = 40; hwrpb.hwrpb.max_asn = 127; - hwrpb.hwrpb.sys_type = ST_DEC_EB164; - hwrpb.hwrpb.sys_variation = 15 << 10; - hwrpb.hwrpb.sys_revision = 0; - hwrpb.processor.type = PCA56_CPU; + hwrpb.hwrpb.sys_type = SYS_TYPE; + hwrpb.hwrpb.sys_variation = SYS_VARIATION; + hwrpb.hwrpb.sys_revision = SYS_REVISION; + hwrpb.processor.type = cpu_type; hwrpb.hwrpb.intr_freq = HZ * 4096; hwrpb.hwrpb.cycle_freq = 250000000; /* QEMU architects 250MHz. */ @@ -220,7 +223,7 @@ do_hello(void) } void -do_start(unsigned long memsize, void (*kernel_entry)(void)) +do_start(unsigned long memsize, void (*kernel_entry)(void), long cpus) { last_alloc = _end; @@ -242,3 +245,16 @@ do_start(unsigned long memsize, void (*kernel_entry)(void)) } __builtin_unreachable (); } + +void +do_start_wait(void) +{ + while (1) + { + // WtInt with interrupts off. Rely on the fact that QEMU will + // un-halt the CPU when an interrupt arrives. + asm("lda $16,-1\n\tcall_pal 0x3e" : : : "$0", "$16"); + + // FIXME do something with the IPI. + } +} |