diff options
| author | Patrick Williams <iawillia@us.ibm.com> | 2012-08-29 09:47:03 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-09-06 08:29:24 -0500 |
| commit | 8fc9c877be31195fcd7ca4f9c28c78acf61b0937 (patch) | |
| tree | a17d854157ea8fe2e7a637a9b5c44704bf79201b /src | |
| parent | 1c6e1a4cddde411b6219b9e881039ffbda0deb4f (diff) | |
| download | blackbird-hostboot-8fc9c877be31195fcd7ca4f9c28c78acf61b0937.tar.gz blackbird-hostboot-8fc9c877be31195fcd7ca4f9c28c78acf61b0937.zip | |
Allow processors on logical nodes != 0.
Created per-node arrays of CPU objects rather than a single array
for the entire system. These are created dynamically as CPUs are
enabled.
Also disabled support for P7 due to the PIR layout being different
and hence would have needed two different sets of assembly code.
We have been running exclusively on the P8 Mambo model for a while.
RTC: 42815
Change-Id: Ib92de8a7c07c2e700a3b7f0c03c64d484b447ca2
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1630
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/include/kernel/cpu.H | 52 | ||||
| -rw-r--r-- | src/include/kernel/cpumgr.H | 84 | ||||
| -rw-r--r-- | src/include/sys/misc.h | 50 | ||||
| -rw-r--r-- | src/kernel/basesegment.C | 46 | ||||
| -rw-r--r-- | src/kernel/cpuid.C | 50 | ||||
| -rw-r--r-- | src/kernel/cpumgr.C | 98 | ||||
| -rw-r--r-- | src/kernel/exception.C | 47 | ||||
| -rw-r--r-- | src/kernel/misc.C | 52 | ||||
| -rw-r--r-- | src/kernel/start.S | 27 | ||||
| -rw-r--r-- | src/lib/syscall_misc.C | 50 | ||||
| -rw-r--r-- | src/lib/syscall_mmio.C | 48 | ||||
| -rw-r--r-- | src/usr/intr/intrrp.H | 50 |
12 files changed, 334 insertions, 320 deletions
diff --git a/src/include/kernel/cpu.H b/src/include/kernel/cpu.H index 2efa89df2..21e4dae74 100644 --- a/src/include/kernel/cpu.H +++ b/src/include/kernel/cpu.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/kernel/cpu.H $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2010-2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/kernel/cpu.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2010,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ /** @file cpu.H * @brief Defines kernel information and functions about CPUs. * @@ -34,8 +33,9 @@ #include <builtins.h> #include <sys/sync.h> -// Thread ID support only, Power8 (8 threads). -#define KERNEL_MAX_SUPPORTED_CPUS (8 * 16 * 8) // Sockets, cores, threads. +// See BookIV PIR definition. +#define KERNEL_MAX_SUPPORTED_NODES 8 +#define KERNEL_MAX_SUPPORTED_CPUS_PER_NODE (8 * 16 * 8) // Chip, core, thread. class Scheduler; @@ -101,7 +101,7 @@ struct cpu_t ALWAYS_INLINE inline cpuid_t getCpuId() { - return getPIR() & (KERNEL_MAX_SUPPORTED_CPUS - 1); + return getPIR(); } #endif diff --git a/src/include/kernel/cpumgr.H b/src/include/kernel/cpumgr.H index fc7b68547..21e29167f 100644 --- a/src/include/kernel/cpumgr.H +++ b/src/include/kernel/cpumgr.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/kernel/cpumgr.H $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2010-2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/kernel/cpumgr.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2010,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #ifndef __KERNEL_CPUMGR_H #define __KERNEL_CPUMGR_H @@ -34,7 +33,6 @@ class CpuManager public: enum { - MAXCPUS = KERNEL_MAX_SUPPORTED_CPUS, CPU_PERIODIC_CHECK_MEMORY = 128, // Is this even needed anymore? CPU_PERIODIC_FLUSH_PAGETABLE = 256, CPU_PERIODIC_DEFRAG = 949, // TODO Any bigger not currently hit @@ -44,8 +42,25 @@ class CpuManager * Returns a pointer to the current CPU structure by using the * task structure in SPRG3. */ - static cpu_t* getCurrentCPU() { return cv_cpus[getPIR()]; } - static cpu_t* getCpu(size_t i) { return cv_cpus[i]; } + static cpu_t* getCurrentCPU() + { + size_t pir = getPIR(); + return cv_cpus[pir / KERNEL_MAX_SUPPORTED_CPUS_PER_NODE] + [pir % KERNEL_MAX_SUPPORTED_CPUS_PER_NODE]; + } + static cpu_t* getCpu(size_t i) + { + cpu_t** c = cv_cpus[i / KERNEL_MAX_SUPPORTED_CPUS_PER_NODE]; + + if (NULL == c) + { + return NULL; + } + else + { + return c[i % KERNEL_MAX_SUPPORTED_CPUS_PER_NODE]; + } + } /** @brief Return pointer to master CPU object. */ @@ -157,9 +172,20 @@ class CpuManager void startSlaveCPU(cpu_t*); private: - static cpu_t** cv_cpus; // Need to be able to access this - // from start.S to get initial stacks - // of secondary cpus / threads. + /** Per-CPU kernel structures. + * + * There is one entry per hardware thread and they are stored as + * a two dimensional array of (cpu_t*)s: cv_cpus[node][thread] + * + * This needs to be a global variable rather than an instance + * variable of a singleton because it is needed within the kernel + * assembly code for interrupt / exception handling. For instance, + * when secondary CPUs start they need to find their own stack from + * these structures. Any changes to this structure needs to be + * kept in sync with the assembly code (ex. start.S). + */ + static cpu_t** cv_cpus[KERNEL_MAX_SUPPORTED_NODES]; + /** Number of active CPUs. * Stored as "(seqID << 32) | cpus" diff --git a/src/include/sys/misc.h b/src/include/sys/misc.h index f1c62273b..02338d1f8 100644 --- a/src/include/sys/misc.h +++ b/src/include/sys/misc.h @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/sys/misc.h $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2011-2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/sys/misc.h $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #ifndef __SYS_MISC_H #define __SYS_MISC_H @@ -64,11 +63,6 @@ extern "C" void shutdown(uint64_t i_status, */ enum ProcessorCoreType { - /** Base Power7 */ - CORE_POWER7, - /** Power7+ */ - CORE_POWER7_PLUS, - /** Power8 "Murano" (low-end) core */ CORE_POWER8_MURANO, /** Power8 "Venice" (high-end) core */ diff --git a/src/kernel/basesegment.C b/src/kernel/basesegment.C index 8430538f8..56f7b6229 100644 --- a/src/kernel/basesegment.C +++ b/src/kernel/basesegment.C @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/kernel/basesegment.C $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// p1 -// -// Object Code Only (OCO) source materials -// Licensed Internal Code Source Materials -// IBM HostBoot Licensed Internal Code -// -// The source code for this program is not published or other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/kernel/basesegment.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #include <limits.h> #include <errno.h> #include <util/singleton.H> @@ -50,8 +50,6 @@ void BaseSegment::_init() // Create initial static 3 or 8MB block. switch (CpuID::getCpuType()) { - case CORE_POWER7: - case CORE_POWER7_PLUS: case CORE_POWER8_MURANO: case CORE_POWER8_VENICE: default: diff --git a/src/kernel/cpuid.C b/src/kernel/cpuid.C index e75bc64b5..2825fbe32 100644 --- a/src/kernel/cpuid.C +++ b/src/kernel/cpuid.C @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/kernel/cpuid.C $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// p1 -// -// Object Code Only (OCO) source materials -// Licensed Internal Code Source Materials -// IBM HostBoot Licensed Internal Code -// -// The source code for this program is not published or other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/kernel/cpuid.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ /** @file cpuid.C * Implementation of the cpuid functions. */ @@ -42,12 +42,6 @@ namespace CpuID switch(l_pvr & 0xFFFF0000) { - case 0x003F0000: - return CORE_POWER7; - - case 0x004A0000: - return CORE_POWER7_PLUS; - case 0x004B0000: return CORE_POWER8_MURANO; diff --git a/src/kernel/cpumgr.C b/src/kernel/cpumgr.C index 909661cca..791d14703 100644 --- a/src/kernel/cpumgr.C +++ b/src/kernel/cpumgr.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/kernel/cpumgr.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2010-2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/kernel/cpumgr.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2010,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #include <assert.h> #include <kernel/cpumgr.H> #include <kernel/task.H> @@ -41,7 +40,7 @@ #include <kernel/deferred.H> #include <kernel/misc.H> -cpu_t** CpuManager::cv_cpus = NULL; +cpu_t** CpuManager::cv_cpus[KERNEL_MAX_SUPPORTED_NODES]; bool CpuManager::cv_shutdown_requested = false; uint64_t CpuManager::cv_shutdown_status = 0; size_t CpuManager::cv_cpuSeq = 0; @@ -50,7 +49,7 @@ InteractiveDebug CpuManager::cv_interactive_debug; CpuManager::CpuManager() { - for (int i = 0; i < MAXCPUS; i++) + for (int i = 0; i < KERNEL_MAX_SUPPORTED_NODES; i++) cv_cpus[i] = NULL; memset(&cv_interactive_debug, '\0', sizeof(cv_interactive_debug)); @@ -58,10 +57,21 @@ CpuManager::CpuManager() cpu_t* CpuManager::getMasterCPU() { - for (int i = 0; i < MAXCPUS; i++) - if (cv_cpus[i] != NULL) - if (cv_cpus[i]->master) - return cv_cpus[i]; + for (int i = 0; i < KERNEL_MAX_SUPPORTED_NODES; i++) + { + if (NULL == cv_cpus[i]) + { + continue; + } + + for (int j = 0; j < KERNEL_MAX_SUPPORTED_CPUS_PER_NODE; j++) + { + if ((cv_cpus[i][j] != NULL) && (cv_cpus[i][j]->master)) + { + return cv_cpus[i][j]; + } + } + } return NULL; } @@ -77,7 +87,8 @@ void CpuManager::init() size_t threads = getThreadCount(); // Set up CPU structure. - cv_cpus = new cpu_t*[MAXCPUS]; + cv_cpus[getPIR() / KERNEL_MAX_SUPPORTED_CPUS_PER_NODE] = + new cpu_t*[KERNEL_MAX_SUPPORTED_CPUS_PER_NODE]; // Create CPU objects starting at the thread-0 for this core. size_t baseCpu = getCpuId() & ~(threads-1); @@ -139,11 +150,20 @@ void CpuManager::startCPU(ssize_t i) currentCPU = true; } + size_t nodeId = i / KERNEL_MAX_SUPPORTED_CPUS_PER_NODE; + size_t cpuId = i % KERNEL_MAX_SUPPORTED_CPUS_PER_NODE; + + // Initialize node structure. + if (NULL == cv_cpus[nodeId]) + { + cv_cpus[nodeId] = new cpu_t*[KERNEL_MAX_SUPPORTED_CPUS_PER_NODE]; + } + // Initialize CPU structure. - if (NULL == cv_cpus[i]) + if (NULL == cv_cpus[nodeId][cpuId]) { printk("Starting CPU %ld...", i); - cpu_t* cpu = cv_cpus[i] = new cpu_t; + cpu_t* cpu = cv_cpus[nodeId][cpuId] = new cpu_t; // Initialize CPU. cpu->cpu = i; @@ -175,7 +195,7 @@ void CpuManager::startCPU(ssize_t i) if (currentCPU) { setDEC(TimeManager::getTimeSliceCount()); - activateCPU(cv_cpus[i]); + activateCPU(getCpu(i)); } return; } @@ -293,8 +313,11 @@ int CpuManager::startCore(uint64_t pir) size_t threads = getThreadCount(); pir = pir & ~(threads-1); - - if (pir >= MAXCPUS) { return -ENXIO; } + if (pir >= + (KERNEL_MAX_SUPPORTED_NODES * KERNEL_MAX_SUPPORTED_CPUS_PER_NODE)) + { + return -ENXIO; + } for(size_t i = 0; i < threads; i++) { @@ -312,11 +335,6 @@ size_t CpuManager::getThreadCount() size_t threads = 0; switch (CpuID::getCpuType()) { - case CORE_POWER7: - case CORE_POWER7_PLUS: - threads = 4; - break; - case CORE_POWER8_VENICE: case CORE_POWER8_MURANO: threads = 8; diff --git a/src/kernel/exception.C b/src/kernel/exception.C index 071f10b1e..836a57a57 100644 --- a/src/kernel/exception.C +++ b/src/kernel/exception.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/kernel/exception.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2010-2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/kernel/exception.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2010,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #include <assert.h> #include <kernel/types.h> #include <kernel/console.H> @@ -226,8 +225,6 @@ void kernel_execute_softpatch() switch (CpuID::getCpuType()) { - case CORE_POWER7: - case CORE_POWER7_PLUS: case CORE_POWER8_MURANO: // @TODO: Verify same procedure. case CORE_POWER8_VENICE: // @TODO: Verify same procedure. case CORE_UNKNOWN: diff --git a/src/kernel/misc.C b/src/kernel/misc.C index a928849fb..3754003d0 100644 --- a/src/kernel/misc.C +++ b/src/kernel/misc.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/kernel/misc.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2011-2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/kernel/misc.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #include <kernel/misc.H> #include <kernel/cpumgr.H> #include <kernel/cpuid.H> @@ -53,14 +52,9 @@ namespace KernelMisc { case CORE_POWER8_MURANO: case CORE_POWER8_VENICE: + case CORE_UNKNOWN: scratch_address = 0x40; break; - - case CORE_POWER7: - case CORE_POWER7_PLUS: - default: - scratch_address = 0x20; - break; } asm volatile("mtspr 276, %0\n" diff --git a/src/kernel/start.S b/src/kernel/start.S index a97fd484f..e8b19b4f5 100644 --- a/src/kernel/start.S +++ b/src/kernel/start.S @@ -302,15 +302,19 @@ _other_thread_spinlock_complete: or 2,2,2 ;// Raise thread priority. isync ;// Get CPU object from thread ID. - mfspr r1, PIR lis r2, _ZN10CpuManager7cv_cpusE@h ori r2, r2, _ZN10CpuManager7cv_cpusE@l - ld r2, 0(r2) ;// Dereference cv_cpus to get array. - muli r3, r1, 8 - add r2, r3, r2 - ld r3, 0(r2) ;// Load CPU object. + mfspr r1, PIR ;// Extract node id. + extrwi r1, r1, 3, 19 + sldi r1, r1, 3 + ldx r2, r1, r2 ;// Dereference to get on-node CPUs array. + cmpi cr0, r2, 0 ;// Check for NULL node array. + beq- 1f + mfspr r1, PIR ;// Extract on-node CPU id. + clrlslwi r1, r1, 22, 3 + ldx r3, r1, r2 ;// Load CPU object. cmpi cr0, r3, 0 ;// Check for NULL CPU object. - beq- cr0, 1f ;// Jump to handling if no CPU object found. + beq- 1f ld r1, CPU_KERNEL_STACK(r3) ;// Load initial stack. lis r2, smp_slave_main@h ;// Load TOC base. @@ -589,11 +593,16 @@ intvect_system_reset: ;// Get CPU object from thread ID, check for NULL which implies not ;// started yet. - mfspr r1, PIR lis r2, _ZN10CpuManager7cv_cpusE@h ori r2, r2, _ZN10CpuManager7cv_cpusE@l - ld r2, 0(r2) ;// Dereference cv_cpus to get array. - muli r1, r1, 8 + mfspr r1, PIR ;// Extract node id. + extrwi r1, r1, 3, 19 + sldi r1, r1, 3 + ldx r2, r1, r2 ;// Dereference to get on-node CPUs array. + cmpi cr0, r2, 0 ;// Check for NULL node array. + beq- _start + mfspr r1, PIR ;// Extract on-node CPU id. + clrlslwi r1, r1, 22, 3 ldx r2, r1, r2 ;// Load CPU object. cmpi cr0, r2, 0 ;// Check for NULL CPU object. beq- _start diff --git a/src/lib/syscall_misc.C b/src/lib/syscall_misc.C index c1b47b772..6d6755a5c 100644 --- a/src/lib/syscall_misc.C +++ b/src/lib/syscall_misc.C @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/lib/syscall_misc.C $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2011-2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/lib/syscall_misc.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #define __HIDDEN_SYSCALL_SHUTDOWN #include <sys/misc.h> @@ -56,11 +55,6 @@ size_t cpu_thread_count() ProcessorCoreType core_type = cpu_core_type(); switch(core_type) { - case CORE_POWER7: - case CORE_POWER7_PLUS: - threads = 4; - break; - case CORE_POWER8_MURANO: case CORE_POWER8_VENICE: threads = 8; diff --git a/src/lib/syscall_mmio.C b/src/lib/syscall_mmio.C index 8b2e49f0f..e1e71121e 100644 --- a/src/lib/syscall_mmio.C +++ b/src/lib/syscall_mmio.C @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/lib/syscall_mmio.C $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2010 - 2011 -// -// p1 -// -// Object Code Only (OCO) source materials -// Licensed Internal Code Source Materials -// IBM HostBoot Licensed Internal Code -// -// The source code for this program is not published or other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/lib/syscall_mmio.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2010,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #include <sys/syscall.h> #include <sys/mmio.h> #include <assert.h> @@ -62,10 +62,6 @@ static uint64_t mmio_scratch_base() ProcessorCoreType cpuType = CpuID::getCpuType(); switch (cpuType) { - case CORE_POWER7: - case CORE_POWER7_PLUS: - return 0x20; - case CORE_POWER8_MURANO: case CORE_POWER8_VENICE: case CORE_UNKNOWN: diff --git a/src/usr/intr/intrrp.H b/src/usr/intr/intrrp.H index a377d4cdc..98c8ab85b 100644 --- a/src/usr/intr/intrrp.H +++ b/src/usr/intr/intrrp.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/usr/intr/intrrp.H $ - * - * IBM CONFIDENTIAL - * - * COPYRIGHT International Business Machines Corp. 2011-2012 - * - * p1 - * - * Object Code Only (OCO) source materials - * Licensed Internal Code Source Materials - * IBM HostBoot Licensed Internal Code - * - * The source code for this program is not published or other- - * wise divested of its trade secrets, irrespective of what has - * been deposited with the U.S. Copyright Office. - * - * Origin: 30 - * - * IBM_PROLOG_END_TAG - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/intr/intrrp.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #ifndef INTRRP_H #define INTRRP_H @@ -284,11 +283,6 @@ namespace INTR offset <<= 20; switch (cpu_core_type()) { - case CORE_POWER7: - case CORE_POWER7_PLUS: - offset |= static_cast<uint64_t>(i_pir.coreId) << 14; - break; - case CORE_POWER8_MURANO: case CORE_POWER8_VENICE: default: |

