From d994392b29cdb629304b8e0dcefb5bd9dec870b9 Mon Sep 17 00:00:00 2001 From: Kanoj Sarcar Date: Tue, 13 Jun 2000 17:29:12 +0000 Subject: Support to put the lowlevel exception handlers in node local memory. --- arch/mips64/config.in | 1 + arch/mips64/defconfig | 1 + arch/mips64/defconfig-ip27 | 1 + arch/mips64/sgi-ip27/ip27-init.c | 25 +++++++++++++++++++++++++ 4 files changed, 28 insertions(+) (limited to 'arch') diff --git a/arch/mips64/config.in b/arch/mips64/config.in index 098aef1b4..7d5d33442 100644 --- a/arch/mips64/config.in +++ b/arch/mips64/config.in @@ -19,6 +19,7 @@ if [ "$CONFIG_SGI_IP27" = "y" ]; then bool ' Discontiguous Memory Support' CONFIG_DISCONTIGMEM bool ' Mapped kernel support' CONFIG_MAPPED_KERNEL bool ' Kernel text replication support' CONFIG_REPLICATE_KTEXT + bool ' Exception handler replication support' CONFIG_REPLICATE_EXHANDLERS bool ' Multi-Processing support (Experimental)' CONFIG_SMP #bool ' IP27 XXL' CONFIG_SGI_SN0_XXL fi diff --git a/arch/mips64/defconfig b/arch/mips64/defconfig index 9866393fa..042baa4b5 100644 --- a/arch/mips64/defconfig +++ b/arch/mips64/defconfig @@ -16,6 +16,7 @@ CONFIG_SGI_IP27=y # CONFIG_DISCONTIGMEM is not set # CONFIG_MAPPED_KERNEL is not set # CONFIG_REPLICATE_KTEXT is not set +# CONFIG_REPLICATE_EXHANDLERS is not set # CONFIG_SMP is not set CONFIG_BOOT_ELF64=y CONFIG_ARC64=y diff --git a/arch/mips64/defconfig-ip27 b/arch/mips64/defconfig-ip27 index 9866393fa..042baa4b5 100644 --- a/arch/mips64/defconfig-ip27 +++ b/arch/mips64/defconfig-ip27 @@ -16,6 +16,7 @@ CONFIG_SGI_IP27=y # CONFIG_DISCONTIGMEM is not set # CONFIG_MAPPED_KERNEL is not set # CONFIG_REPLICATE_KTEXT is not set +# CONFIG_REPLICATE_EXHANDLERS is not set # CONFIG_SMP is not set CONFIG_BOOT_ELF64=y CONFIG_ARC64=y diff --git a/arch/mips64/sgi-ip27/ip27-init.c b/arch/mips64/sgi-ip27/ip27-init.c index a2bf48c75..83df50dba 100644 --- a/arch/mips64/sgi-ip27/ip27-init.c +++ b/arch/mips64/sgi-ip27/ip27-init.c @@ -221,7 +221,11 @@ void mlreset (void) * thinks it is a node 0 address. */ REMOTE_HUB_S(nasid, PI_REGION_PRESENT, (region_mask | 1)); +#ifdef CONFIG_REPLICATE_EXHANDLERS + REMOTE_HUB_S(nasid, PI_CALIAS_SIZE, PI_CALIAS_SIZE_8K); +#else REMOTE_HUB_S(nasid, PI_CALIAS_SIZE, PI_CALIAS_SIZE_0); +#endif #ifdef LATER /* @@ -301,6 +305,27 @@ void per_hub_init(cnodeid_t cnode) if (!done) { hub_rtc_init(cnode); pcibr_setup(cnode); +#ifdef CONFIG_REPLICATE_EXHANDLERS + /* + * If this is not a headless node initialization, + * copy over the caliased exception handlers. + */ + if (get_compact_nodeid() == cnode) { + extern char except_vec0, except_vec1_r10k; + extern char except_vec2_generic, except_vec3_generic; + + memcpy((void *)(KSEG0 + 0x100), &except_vec2_generic, + 0x80); + memcpy((void *)(KSEG0 + 0x180), &except_vec3_generic, + 0x80); + memcpy((void *)KSEG0, &except_vec0, 0x80); + memcpy((void *)KSEG0 + 0x080, &except_vec1_r10k, 0x80); + memcpy((void *)(KSEG0 + 0x100), (void *) KSEG0, 0x80); + memcpy((void *)(KSEG0 + 0x180), &except_vec3_generic, + 0x100); + flush_cache_all(); + } +#endif } } -- cgit v1.2.3