summaryrefslogtreecommitdiffstats
path: root/src/kernel/cpumgr.C
Commit message (Collapse)AuthorAgeFilesLines
* Uninitialized values in cpumgr.Patrick Williams2013-04-181-4/+3
| | | | | | | | | Change-Id: I1d357cedbd0dc77f2cde0d9071a82860398e09b6 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4096 Tested-by: Jenkins Server Reviewed-by: Dean Sanner <dsanner@us.ibm.com> Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Support for less than 8 threads per coreDan Crowell2013-02-081-2/+6
| | | | | | | | | | | Modified anywhere that we enable non-master threads to only touch the threads that we are told to update. Change-Id: I5b764e51d85a5c663ac76164e9465831ef0c167c RTC: 48808 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2877 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Triggering Hostboot Shutdown when PNOR is badAdam Muhle2013-02-041-3/+13
| | | | | | | | | | | | | Updating the doShutdown path to support receiving a reason code as input. Then changing PNOR RP to issue a shutdown when problems are detected with the PNOR Partition table. RTC: 44146 Change-Id: Ib4111d0a91f53d90fa100422a1463539897598e6 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3024 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Zero out cpu_t struct on creationDean Sanner2013-01-211-0/+1
| | | | | | | Change-Id: I5a185aa5ac86a70361b43e71ad264bee87aea2d0 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2956 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Support RPR register.Patrick Williams2013-01-141-2/+7
| | | | | | | | | | | | | | | | | | | | For P8 the priority of different threads has no effect unless the relative priority register is programmed to tell the relative scheduling weight of the different priorities. We will now be programming the RPR to give 32x performance boost to "high" priority threads relative to "low" priority. This means that when a thread is waiting on another, and thus has low priority, it will get 32x less dispatch cycles then the thread it is waiting on. Change-Id: I0d1d1052b12ab8bd5612aa4580cd85b5c238f885 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2888 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Mark W. Wenning <wenning@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Terminate Immediate on a shutdown and assertMissy Connell2012-11-091-0/+54
| | | | | | | | Change-Id: I37c8956afb11c69201f4936821cff5e153327780 RTC:43793 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2194 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* pore_gen_cpuregMark Wenning2012-11-071-0/+1
| | | | | | | | | Change-Id: Ic5cb0817118bf0de7d706124708e5b8551ba4258 RTC: 41425 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1899 Tested-by: Jenkins Server Reviewed-by: Van H. Lee <vanlee@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Sync timebase to slave cores.Patrick Williams2012-09-241-2/+36
| | | | | | | | | | Change-Id: I196e58be48195f653ab16a74dedafabafbd07bbc RTC: 47013 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1774 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Fixes for winkle state.Patrick Williams2012-09-211-2/+9
| | | | | | | | | | | | | | | | | | | The memory profiling tools sometimes encountered a condition where the kernel stack was becoming corrupted. I tracked it down to the winkle code storing the winkle-save state at the wrong end of the stack. Moving the winkle-save area to the bottom of the stack, which is where I originally intended it to go. Also noticed that the task issuing the winkle was in "running" state while waiting for the cores to come out of winkle. Ensure that the kernel updates the task state with a non-running status while we are waiting for winkle to complete. Change-Id: I07a56ea6f24cbc09362f9227d81915da5bc9f148 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1737 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* Allow processors on logical nodes != 0.Patrick Williams2012-09-061-40/+58
| | | | | | | | | | | | | | | | | 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>
* Support for master winkle.Patrick Williams2012-08-101-26/+75
| | | | | | | | | RTC: 44730 Change-Id: Ifaeecc659e1bfd8ded4744dc591fc993471519ba Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1471 Tested-by: Jenkins Server Reviewed-by: Mark W. Wenning <wenning@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* cpu_spr_value syscall for SLW image build.Patrick Williams2012-07-181-0/+6
| | | | | | | | | | | | Task 44887 Change-Id: If87b6e80b974bb4cbff13844d8a3f055a17282d2 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1378 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Mark W. Wenning <wenning@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Support for core_activate via IPI.Patrick Williams2012-07-161-40/+69
| | | | | | | | RTC: 37009 Change-Id: I56669805c86d9659a20ad7c26e5e9860c7a248c7 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1087 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Improve user-space page allocator.Patrick Williams2012-07-161-3/+14
| | | | | | | | | | | | | | | | | * Allow page allocation system call to force coalesce if a contiguous block is unavailable. [long-term enhancement] * Workaround lack of large contiguous memory for PageTable test-cases, which require 256K, by allocating a VMM block. This should be removed when story 43401 is implemented. [short-term workaround] Change-Id: Idddb30eaa3aeac52d56b82a70355095f31d4a0cd Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1369 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Live-lock issues in memory allocator.Patrick Williams2012-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Debug tool for PageManager. * Support PageMgr allocations of non-2^k size. * Switch page-allocation to always be in kernel-mode. While investigating issue 44511, I noticed two problesm with the memory page allocator (PageManager). First, the allocator did not support allocations of pages which were not a power of 2, which would result in pages appearing to "leak". Second, in situations where a large allocation was requested and there was not a large chunk available, the allocation would enter a live-lock condition where coalescing would never occur. Switched the PageManager so that all allocations happen in kernel space. This allows us to force memory-release operations on the syscall path when we are out of memory and also put in place a task_yield call which will allow coalescing to eventually occur. Issue 44523 is suppose to fully resolve any of these live-lock paths. RTC: 44511 Change-Id: Ifefd5d0996ee6914e291c862fac0c7b76980717f Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1330 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Fix race condition in active cpu count.Patrick Williams2012-06-031-23/+24
| | | | | | | Change-Id: I3a8a6a521d219a55600b3370fb75a25b8ed085be Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1154 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Allow kernel to shutdown-to-payload.Patrick Williams2012-04-241-1/+2
| | | | | | | | | | | | | | | This code is currently unused, due to InitService not having the payload address and the start_host_os IPL step being unimplemented. For testing purposes the 'shutdown' call in initservice.C can be changed to pass a non-zero base address (such as 256MB). RTC: 40871 Change-Id: I0f4b6bae62ede1853aabbcb28082300005e31897 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/926 Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
* Fix weak consistency bug in cpumgr.Patrick Williams2012-04-201-3/+5
| | | | | | | | | Change-Id: Ie0ba82a759afee2e4809924b32c7ef0fefcd0ad1 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/914 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Support P8 mambo model and Murano proc.Patrick Williams2012-03-211-1/+1
| | | | | | | | | RTC: 38206 Change-Id: Iab79041931db533ad6b6ebd057c1ef9fe4c4b8cc Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/714 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Interactive debug tool.Patrick Williams2011-12-061-0/+8
| | | | | | | | | | | | | | | - Modify debug fw to support writing data. - Modify debug fw to support clocking model forward. - Add simics environment support for both. - Kernel support to start a task when directed. - Write debug tool to modify kernel structure for debug. Change-Id: Ic001dfd45f91392aefbc9d5096c5344018d5190e Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/518 Tested-by: Jenkins Server Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* new HEAP manager to reduce fragmentationDoug Gilbert2011-10-251-2/+40
| | | | | | | | Change-Id: Ibe725a43e6366d9113ec99df1cc6aafa7bbb770e Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/431 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
* Support task_wait / task_wait_tid syscalls:Patrick Williams2011-10-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | - Add task_end2 syscall to allow pthread_exit-like retval. - Add/maintain task states. - Create task parent/child tracking tree. - Add task_detach function. - Implement wait syscalls. Make task_exec caller the parent of spawned task: Previously the task_exec call caused a message to the VFS task, which called task_create and returned the tid in response to the message. This causes the parent of the spawned task to appear to be the VFS task. Modify task_exec / VFS handling to instead return the entry point address on the message and have task_exec call task_create directly itself. Change-Id: I6b6796f45875de37b1ab01e7596639b073820b95 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/443 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
* Mechanism to detect low memory and cast out older pageDoug Gilbert2011-09-191-0/+32
| | | | | | | | Change-Id: Icce8e01f3d1cd2942f2b9ff802993da0441535ee Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/344 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
* Ensure scratch operations happen on master core.Patrick Williams2011-08-311-8/+17
| | | | | | | | Change-Id: I970d645108de041d410599847edce877cb794015 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/275 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Add copyright headers to all source files.Patrick Williams2011-08-241-0/+22
| | | | | | | Change-Id: I205f2409e56032cfc0aaf01d7e26d357f0b86373 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/277 Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Tested-by: Jenkins Server
* Add userspace syscalls for PVR.Patrick Williams2011-07-291-5/+5
| | | | | | | | Change-Id: I27d51e0e9f2396a4ddd45d98d6b1004a17c9db46 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/219 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: MATTHEW S. BARTH <msbarth@us.ibm.com>
* Reduce memory footprint to 3MB.Patrick Williams2011-07-291-11/+11
| | | | | | | Change-Id: I309bc63bdb27baa21f65de05e12324b9c4ce3407 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/212 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Reduce working threads to first core.Patrick Williams2011-07-251-2/+32
| | | | | | | | | | | | | This is required to reduce the memory footprint of the kernel so we can fit within 2MB. This patch will cause (in simics) all other cores/threads to execute a 'doze' instruction and cease executing. In VBU, only 1 core will be active anyhow. Change-Id: If1bdc01393b02d802ba7595a88dcf3331efc2d4e Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/203 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
* Shutdown and post status on HostBoot completionMike Jones2011-07-191-0/+16
| | | | | | | | Change-Id: If2ab46af85065b29695a1186ed331fd835944eb4 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/204 Tested-by: Jenkins Server Reviewed-by: Mark W. Wenning <wenning@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Remove heap allocation of xscom mutex.Patrick Williams2011-06-241-1/+2
| | | | | | | | | | | | | | Since mutexes are simply a uint64 with a static initializer, the xscom mutex is now a instance variable directly in the cpu object. Remove unneeded mutex_create function and changed the behavior of mutex_destroy. Change-Id: If6e1d1bf0083c32ef9e7502d27678811bdaf7e1e Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/150 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com>
* Create per-CPU mutex for XSCOM usage.Patrick Williams2011-06-081-0/+1
| | | | | | | | Change-Id: I76ad5c1d553d544b52910afd82e2716781ea13b9 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/140 Tested-by: Jenkins Server Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
* Kernel support for processor affinity.Patrick Williams2011-05-261-0/+1
| | | | | | | | | Change-Id: Ie84a805bad58032085208a98b1b31393def681cb Reviewed-on: http://gfwr801.rchland.ibm.com:8080/gerrit/100 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
* Move inline mtdec into arch/ppc.HPatrick Williams2011-04-211-6/+2
| | | | | | | | Change-Id: I65b2be9a5a5166cd946033e34cedd87345e55979 Reviewed-on: http://gfwr801.rchland.ibm.com:8080/gerrit/4 Tested-by: Jenkins Server Tested-by: Andrew J. Geissler <andrewg@us.ibm.com> Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
* Remove unused isCPU0 function.Patrick Williams2011-04-141-5/+0
| | | | | | | Change-Id: I07c49d54352565061be3810bcd02217c95117f9d Reviewed-on: http://localhost:8080/gerrit/2 Reviewed-by: ALWOOD P. WILLIAMS III <iawillia@us.ibm.com> Tested-by: Jenkins Server
* Eliminate race condition in updating task->cpu pointer.Patrick Williams2011-03-311-2/+1
|
* Merge of PowerHAL project up to commit:Patrick Williams2011-03-051-5/+5
| | | | dd45c30bd53d8e6c123165b83842d08117558a3c
* Add skeleton of timebase manager.Patrick Williams2010-09-201-4/+3
|
* Enable -Wall and fix warnings.Patrick Williams2010-08-191-1/+1
|
* SMT support.Patrick Williams2010-07-071-21/+37
|
* Move SPRG3 manipulation to common ppc-arch file.Patrick Williams2010-06-281-4/+3
|
* Create init process, fix scheduler bugs.Patrick Williams2010-06-071-1/+1
|
* Add stub for decrementer interrupt.Patrick Williams2010-06-031-0/+5
|
* Add stub for syscall.Patrick Williams2010-06-031-1/+2
|
* Initial cpu / task structs.Patrick Williams2010-06-021-0/+72
OpenPOWER on IntegriCloud