summaryrefslogtreecommitdiffstats
path: root/asm
Commit message (Collapse)AuthorAgeFilesLines
...
* Add base POWER9 supportMichael Neuling2016-05-101-0/+2
| | | | | | | | | | | Add PVR detection, chip id and other misc bits for POWER9. POWER9 changes the location of the HILE and attn enable bits in the HID0 register, so add these definitions also. Signed-off-by: Michael Neuling <mikey@neuling.org> [stewart@linux.vnet.ibm.com: Fix Numbus typo, hdata_to_dt build fixes] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Make trigger_attn() enable attn alsoMichael Neuling2016-05-101-2/+2
| | | | | | | | This changes trigger_attn() to also enable attn via HID0, so callers don't have to do it themselves. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: Enable SPIRA-HVasant Hegde2016-04-011-1/+1
| | | | | | | | | | | | | | Update the SPIRA-H pointer in the NACA so that the FSP can build and pass the SPIRA-S structure to OPAL instead of the legacy SPIRA. Older systems (which does not support SPIRA-H) ignores SPIRA-H pointer and continue to pass legacy SPIRA. "spira" is a global structure and referred everywhere inside hdata dir. Once we enable SPIRA-H we get data in SPIRA-S area, not in legacy spira. Hence fixup spira structure, so that we don't break building device tree. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* asm/head.S: fix hang in multi-threaded mamboOliver O'Halloran2016-03-071-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | In very early boot, skiboot places secondary threads in holding loop until the primary thread has finished relocating skiboot. The secondary threads wait until a flag at INITAL_OFFSET + offsetof(boot_flag) is set to one before continuing. After relocating the skiboot image and applying ELF relocations the sets this flag and continues booting. To avoid having to copy skiboot at runtime within the simulation e605691e introduced a change to have the skiboot.tcl mambo script load skiboot at it's preferred location of 0x30000000 rather than 0x00000000. Unfortunately, the relocation code path is also responsible for saving the inital offset pointer (into r15). When not taken this results in the main thread writing to r15 + offsetof(boot_flag) instead, which leaves the secondary threads stuck waiting for boot_flag and the main thread stuck when trying to call-in the secondary threads during CPU initialisation. This patch fixes the bug by saving the inital offset before checking if relocation is necessary and adds a few comments to better document the relocation process. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add prototype in asm-offsets to silence clangJoel Stanley2015-08-131-0/+2
| | | | | | | | | asm/asm-offsets.c:31:5: error: no previous prototype for function 'main' [-Werror,-Wmissing-prototypes] int main(void) Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Merge branch 'stable'Stewart Smith2015-06-181-0/+3
|\
| * Set proper value for RPR registerBenjamin Herrenschmidt2015-06-181-0/+3
| | | | | | | | | | | | | | The value was provided by Dave Larson and is what pHyp uses Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Add Mambo platformStewart Smith2015-05-271-0/+8
| | | | | | | | | | | | | | | | By adding an explicit mambo platform we can do tricks like a fake NVRAM, actually get RTC from mambo and generally be a bit better in a simulator Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Make relocate() return specific error as to what went wrongStewart Smith2015-05-151-1/+1
| | | | | | | | | | | | Useful in debugging odd problems, such as skiboot > 1MB. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Clarify documentation on OPAL parameters (up to 8), fix opal_entryStewart Smith2015-05-131-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenPower ABI mentions (2.2.1.1 Register Roles) that r11 is not used for parameter passing, and again in 2.2.3 (Parameter Passing in Registers) that only 8 registers are available, with the rest spilling to stack. Incorrectly, we had documented that we use r11 for a 9th parameter and we were storing and loading r11 as part of OPAL_TRACE_ENTRY. Github-issue: https://github.com/open-power/skiboot/issues/12 Reported-by: Andrei Warkentin <andrey.warkentin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Reviewed-by: Andrei Warkentin <andrey.warkentin@gmail.com>
* | Add Naples chip supportBenjamin Herrenschmidt2015-04-091-0/+4
|/ | | | | | | | | | This adds the PVR and CFAM ID for the Naples chip. Otherwise treated as a Venice. This doesn't add the definitions for the new PHB revision yet Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Move contents of opal.h to opal-api.hMichael Ellerman2015-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | Move the contents of opal.h, which is the definition of the OPAL API shared with Linux, into opal-api.h. Recreate opal.h, containing just the include of types.h as well as including opal-api.h and opal-internal.h. We can also remove the #ifdef SKIBOOT, because opal.h is no longer shared with Linux. This gets us to an opal-api.h that is purely a superset of Linux's opal-api.h, ie. the only differences are things that are new in skiboot and haven't yet been added to Linux. Finally update head.S to only include opal-api.h, which is all it needs, and avoids the need for ASSEMBLY guards in opal.h. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* core: Add support for cec_power_down() on mamboMichael Ellerman2015-04-011-0/+5
| | | | | | | | | | | Currently when running on mambo OPAL_CEC_POWER_DOWN doesn't work, the simulator keeps running. We can use the magic mambo support instruction with the right opcode to ask mambo to stop the simulation. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* exceptions: Catch exceptions at boot timeBenjamin Herrenschmidt2015-03-312-17/+76
| | | | | | | And print some informations about GPR state, backtrace, etc... Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* exceptions: Remove deprecated exception patching stuffBenjamin Herrenschmidt2015-03-311-125/+0
| | | | | | | | Linux no longer calls it, it never worked on LE and generally speaking never really did anything useful anyway. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* replace infinite loop on relocation failure with attnStewart Smith2015-02-181-1/+1
| | | | | | Aids in debugging relocation failure as you get an immediate error. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add tweaks to work in Mambo simulatorBenjamin Herrenschmidt2014-12-011-0/+19
| | | | | | | | | | | Mambo doesn't implement various things such as PBA SCOMs, LPC, ChipTOD, etc... It also provides a special console hook. This adds detection of Mambo via the /mambo node, and enables us to boot all the way to Linux. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* opal: Remove MCE handling code.Mahesh Salgaonkar2014-11-221-5/+0
| | | | | | | | | | | | | | Removed following: - Machine check handle and other related routines. - per-cpu MCE event used to record machine check data cpu_thread->mc_event; - Machine check related definition including mce event structure from include/opal.h - A comment above GET_STACK() #define that warns about runtime modification made to GET_STACK macro by MC patching code. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Add symbolic backtraces and expose skiboot map to LinuxBenjamin Herrenschmidt2014-11-182-0/+23
| | | | | | | We use a double link technique, doing a first pass with a .o containing a dummy symbol map, then re-linking with a new .o Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Capture backtraces when measuring stack depthBenjamin Herrenschmidt2014-11-182-2/+4
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Stack checking extensionsBenjamin Herrenschmidt2014-11-173-1/+20
| | | | | | | | | | | | This patch adds: - Normal builds are done with -fstack-protector (we want to investigate using -fstack-protector-strong on gcc4.9 but for now we just use that - Build with STACK_CHECK=1 will use -fstack-protector-all and -pg and will check the stack in mcount Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Quote built-in kernel path from MakefileBenjamin Herrenschmidt2014-11-171-5/+1
| | | | | | | Otherwise, if your path contains something like "linux-foo" then the "linux" part gets replaced by the preprocessor due to stupid built-ins. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* irq/occ/opal: Add self-sent dummy interruptBenjamin Herrenschmidt2014-10-242-0/+4
| | | | | | | | | | | | | This makes OPAL use the OCC interrupt facility to send itself an interrupt whenever the OPAL event bit is set as a result of an OPAL call that wasn't itself opal_handle_interrupt() or opal_handle_hmi() (both of which we know the OS will already deal with appropriately). This ensures that OPAL event changes are notified to Linux via its interrupt path which is necessary for it to properly broadcast the state change to its various clients. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Initial commit of Open Source releaseBenjamin Herrenschmidt2014-07-026-0/+1204
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
OpenPOWER on IntegriCloud