aboutsummaryrefslogtreecommitdiff
path: root/platforms
AgeCommit message (Collapse)AuthorFilesLines
2015-07-03plat/qemu: Add LPC based RTC supportBenjamin Herrenschmidt1-0/+5
This adds a driver for standard CMOS RTC chips and use it from the QEMU platform. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-07-03plat/qemu: Add simple qemu platformBenjamin Herrenschmidt3-1/+151
This adds support for running under qemu "powernv" platform, which is currently available via the qemu repository at: https://github.com/ozbenh/qemu branch "powernv" qemu can't yet create DT entries for ISA devices so we hard wire the UART and RTC devices in the device-tree like we do with other platforms. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-07-01Merge branch 'update-2.1.1.1' into mergebackBenjamin Herrenschmidt1-5/+144
Complex merge fixups Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2015-06-19Support for Naples LPC serial interruptsBenjamin Herrenschmidt6-27/+28
This adds support for the HW SerIRQ deserializer of the P8 LPC bridge which is properly wired up on Naples. It also adds support for detecting and reporting LPC error interrupts on all P8s. On most platforms (Rhesus is the exception here due to the way it lets Linux handle the UART interrupts directly), we modify the device-tree to properly represent the LPC controller as a cascaded interrupt-controller and the "interrupts" property of LPC devices to contain the actual LPC interrupt number for the device. We add a mechanism for drivers to register specific LPC interrupts, and a "workaround" for pre-Naples P8 which platforms can use to call all of them for when the external FPGA based deserializer is used. There's also a callback on LPC resets which isn't used yet, we need a bit more work on the general LPC error handling, but it can be done a separate patches. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-06-13firenze: Add PCIe power workaround for K80Benjamin Herrenschmidt2-6/+301
Based on instructions from the HW folks Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2015-06-11Fix branch on uninitialized value in rhesus platform codeStewart Smith1-1/+1
Found by llvm scan-build. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-06-11prd: Enable prd_init() for firestone platformVaidyanathan Srinivasan1-0/+1
Call prd_init() on astbmc/firestone platform in order to enable PRD in host kernel. Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Acked-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-06-09libflash: start using the blocklevel interface.Cyril Bur2-10/+13
Converted all the libflash calls to use the blocklevel interface, modified all callers to libflash to use the blocklevel interface. This patch should introduce next to no functional change. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-05-27Add fake nvram for Mambo platformStewart Smith1-0/+17
Increases boot-code-coverage (for Mambo): Lines: 2043 to 2168 (8.3% to 8.8%) Functions: 283 to 298 (14.7% to 15.4%) Branches: 792 to 816 (6.4% to 6.5%) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-05-27Add Mambo platformStewart Smith3-1/+89
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>
2015-05-21Merge PRD rework from stableStewart Smith1-0/+4
2015-05-21Merge branch 'update-2.1.1.1' into stableskiboot-5.0.2Stewart Smith1-0/+4
2015-05-21Fix race in firenze_get_slot_info() leading to assert() with many PCI cardsStewart Smith1-0/+4
With many PCI cards, we'd hit a race where calls to firenze_add_pcidev_to_fsp_inventory would step on each other leading to memory corruption and finally an assert() in the allocator being hit during boot. Observed with 33+ devices. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-05-18fix copy&paste error in Garrison definitionDan Horák1-1/+1
Signed-off-by: Dan Horák <dan@danny.cz> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-05-13PLAT: Add basic Garrison platformBenjamin Herrenschmidt2-1/+60
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-05-13astbmc: Fix uninitialised variable warningJoel Stanley1-1/+1
platforms/astbmc/pnor.c:43:6: error: variable 'pnor_chip' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (rc) { ^~ platforms/astbmc/pnor.c:58:6: note: uninitialized use occurs here if (pnor_chip) ^~~~~~~~~ platforms/astbmc/pnor.c:43:2: note: remove the 'if' if its condition is always false if (rc) { ^~~~~~~~~ platforms/astbmc/pnor.c:30:30: note: initialize the variable 'pnor_chip' to silence this warning struct flash_chip *pnor_chip; ^ = NULL Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-05-13rhesus: Fix uninitialised variable warningJoel Stanley1-1/+1
platforms/rhesus/rhesus.c:126:6: error: variable 'pnor_chip' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (rc) { ^~ platforms/rhesus/rhesus.c:141:6: note: uninitialized use occurs here if (pnor_chip) ^~~~~~~~~ platforms/rhesus/rhesus.c:126:2: note: remove the 'if' if its condition is always false if (rc) { ^~~~~~~~~ platforms/rhesus/rhesus.c:121:30: note: initialize the variable 'pnor_chip' to silence this warning struct flash_chip *pnor_chip; ^ = NULL Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-05-07Don't double preload hservices LIDsStewart Smith1-4/+0
On Firenze, we called hservices_lid_preload in firenze_init() but hservices_lid_preload() is called from ibm_fsp_init(), so we ended up doing the load twice. This added approximately 0.2 seconds to boot time. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-05-07astbmc: asynchronous preloading of resourcesStewart Smith3-3/+6
Implement start_preload_resource and resource_loaded platform functions for astbmc machines (palmetto, habanero, firestone). This means we start loading kernel and initramfs from flash much earlier in boot, doing things like PCI init concurrently so that by the time we go to boot the payload, it's already loaded. Implementation is a simple queue with a job running on another CPU doing the libflash calls. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-05-07core: add a read sensors op to the Apollo platformCédric Le Goater1-0/+1
commit 132e593400f9 ("core: add a platform op to read sensors") missed out this platform. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-31plat/firestone: Add missing platform hooksBenjamin Herrenschmidt1-0/+1
We didn't keep it in sync with palmetto and habanero Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-31plat/firestone: Add missing platform hooksBenjamin Herrenschmidt1-0/+3
We didn't keep it in sync with palmetto and habanero Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-26memboot: Add a memboot flash backendAlistair Popple1-3/+10
memboot uses bmc system memory instead of a real flash chip. This patch adds a flash backend for bmc system memory to allow use of the memboot tool (in external/memboot) to boot the system. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-24core: add a platform op to read sensorsCédric Le Goater3-0/+9
This patch introduces an initial framework to define a sensor_read operation per platform. It also proposes a few helper routines to work on the sensor 'handler' which identifies a sensor and attribute in the OPAL_SENSOR_READ call. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-24Asynchronous LID/Resource loading for FSP systemsStewart Smith4-2/+4
This moves away from using fsp_sync_msg in fsp_fetch_data and instead using the platform hooks for start_preload_resource() to actually queue up a load and having the plumbing for checking if a resource is loaded yet. This gets rid of the "pollers called with locks held" warning we got heaps of previously. You can now boot some FSP systems without getting this warning at all. This also sets the stage for starting load of LIDs much earlier to when they're needed, improving boot time. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-23Change load_resource() API to be all about preloading.Stewart Smith4-4/+4
No functional changes in what happens, just have two calls, one for queueing preload the other for waiting until it has loaded. future patches will introduce platform specific queueing. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-20FSP/LEDS: Add device tree nodesVasant Hegde4-0/+13
This patch creates a parent LED device node called 'led' under the root 'opal' device node. This also creates child device nodes under 'led' corresponding to all individual LEDs on the system whether it is an enclosure type or a descendant type with their location code as name. The location code information will be used by the host to enlist and access all the individual LEDs present on the system. The child LED device nodes also have the properties 'led-types' and 'led-loc' representing what kind of LEDs present on the same loation code and whether it is an enclosure type LED or a descendant type LED. Sample device tree output: ibm,opal { .. .. led { compatible = "ibm,opal-v3-led"; phandle = <0x1000006b>; linux,phandle = <0x1000006b>; U78C9.001.RST0027-P1-C1 { led-types = "identify", "fault"; led-loc = "descendent"; phandle = <0x1000006f>; linux,phandle = <0x1000006f>; }; <snip> }; }; Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: Move create_led_device_nodes to FSP platform.exit] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-04astbmc: Use firmware FRU ID from the device treeJeremy Kerr1-1/+20
Rather than using the hardcoded FRU ID, parse it from the device tree. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2015-03-04platforms/habanero: sync platform definition with palemttoJeremy Kerr1-0/+3
We're missing callbacks for elog_commit and exit. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2015-03-04platforms/astbmc: Fixup hostboot sensor nodesJeremy Kerr1-0/+33
The sensor nodes should have the compatible properties, not the "bmc" and "sensors" nodes. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2015-03-04hw/ipmi: Set firmware progress sensorJoel Stanley1-0/+3
We set the IPMI firmware progress sensor to indicate the boot progress of the system. The x86-centric IPMI names don't fit perfectly into what skiboot does, but they do give some indication of the system state. Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-03-04hw/prd: Add firmware PRD handling subsystemJeremy Kerr2-0/+4
This change adds Processor Recovery Diagnostics (PRD) code to skiboot firmware. This allows certain hardware RAS events to be handled by a userspace application. The core of the PRD code is a messaging interface to the kernel (and onwards to userspace). PRD events are logged with the prd.c code, and sent to the kernel as opal_msg messages. For responses to these messages, the kernel will reply using a new OPAL call, opal_prd_msg. Only one message is outstanding at a time; we collect events from hardware interrupts (hooked up by subsequent patches), and set per-processor event bits. Once an event has been consumed by the kernel, we clear that event from out pending set, and send any further pending events. Certain events (hardware attentions from the psi layer) need to be masked at interrupt time. For these, we have an acknowledgement facility to clear the mask once the userspace PRD application has cleared the source of the error. Includes multiple contributions from: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-04core: Move hservices_init to platform codeJeremy Kerr1-1/+16
We don't want to call hservices_init on machines that use the PRD, as they expect to relocate the hbrt code later. This change moves the hservices_init call out of the common path, and into the firenze platform init. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-04plat/astbmc: Remove i2c DT fixupsBenjamin Herrenschmidt1-91/+0
HostBoot now creates the necessary nodes Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-23hostservices/fsp: Move lid caching to platformAnanth N Mavinakayanahalli1-0/+4
Move lid caching from skiboot init to platform initialization code, just after the OPL sequence. Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-19core/flash: Move flash NVRAM handling to new flash moduleJeremy Kerr2-69/+11
Since we want to prevent conflicts between PNOR and NVRAM, this change moves the flash-nvram handling out of flash-nvram.c and into the generic flash module. This way, the OPAL_FLASH_{READ,WRITE,ERASE} API won't conflict with the OPAL_*_NVRAM api. To do this, we use the flash_register function to look for an "NVRAM" partition. If one is found, it is automatically registered as the system NVRAM backend. We also change the rhesus and astmbc platforms to use the common flash code. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-19core/flash: port pnor_load_resource to flash codeJeremy Kerr4-172/+2
Since we have a flash device registered as the system flash, use this as a generic load_resource backend. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-17core: Add subid to load_resource()Michael Neuling2-7/+121
This adds a subid to load_resource() so that sub-partitions can be accessed inside a PNOR partition. These sub-partitions follow the format used by the hostboot SBE image. The subid will match on the EC field of the SBE table of contents. If it's found, only that sub-partition is returned to the caller. Current partitions (kernel and ramfs) don't support sub-partitions. If caller tries to access a sub-partition within these, we fail the call. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-09ipmi/wdt: Add ipmi watchdog timer supportAlistair Popple2-0/+2
Add support for an ipmi watchdog timer. During skiboot initialisation this patch will cause the system to be reset if opal_run_pollers() isn't called for more than 60 seconds. Once the payload is started the watchdog timer will be reset and a pre-timeout interrupt set. The payload should then receive the interrupt and call into skiboot which will disable the watchdog timer. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-09ipmi: Set BMC Global Enables to enable notificationsJoel Stanley1-0/+48
For OEM events including graceful power down and BMC PNOR access we want to receive notification whenever a message is ready to be read from the BMC. This requires the Event Message Buffer flag to be enabled. This is the equivalent of doing mc setenables event_msg=on with ipmitool, except the message must come from the BT interface in order to have permission to modify the flags. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-09Fix commit 16c80346Jeremy Kerr4-1/+58
Commit 16c80346 change included some reverts of previous commits, which we need. This change reverts those reverts, leaving the original intent of that change. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-05Add OPAL_INVALID_CALL explicitly in opal.h and docsStewart Smith4-58/+1
Was mentioned in linux as possibly being used by some external test modules. It's harmless to make this official behaviour. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-05astbmc: Allow loading of payload from flashJoel Stanley4-1/+58
To date BMC platforms have had their payload built in to the skiboot binary. This patch adds the option of loading from a flash partition instead. This has been tested on palmetto with a separate skiboot and kernel+rootfs partition. In the future we may have separate kernel and rootfs, which should just work. For now this is what we see when booting: [10648940943,5] INIT: Kernel loaded, size: 15728640 bytes (0 = unknown preload) [10649094578,5] INIT: 32-bit kernel entry at 0x2001015c [10649170607,3] PLAT: No ROOTFS partition in PNOR If the partition named cannot be found, the core loading logic will fall back to using the built-in payload. In this case, the user gets the following messages: [2214557191,3] PLAT: No KERNEL partition in PNOR. [2220486159,5] INIT: platform kernel load failed. [2221293286,5] Using built-in kernel. [2265861935,5] INIT: Kernel loaded, size: 14706638 bytes (0 = unknown preload). Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-01-29Revert "platforms/astbmc: Temporary reboot workaround"skiboot-4.1.1Joel Stanley1-3/+1
This reverts commit 7185393df6d7d806811b827fabce1d8ad3e05fff. Now that we have the correct behaviour in the BMC, we can go back to sending the correct ipmi command for rebooting the machine. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-01-22PLAT: Use NULL check instead assertionNeelesh Gupta1-17/+25
There could be some processor chips not populated in the system. So, if we are not able to get chip data of given chip id, we should just move on to the next or return instead of aborting (bz 120562). Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-01-22platforms/firestone: Add Firestone platformJeremy Kerr2-1/+45
Based on Habanero. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-17Fix compatible match for palmetto & habaneroBenjamin Herrenschmidt2-2/+2
The strings should be "tyan,..." not "ibm,..." Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-12-10PLAT/i2c: Fix the i2c device node name and add target propertyskiboot-4.1Neelesh Gupta1-13/+29
Fix the i2c device node name that should show the functionality and use a dedicated 'target' name property to tell targets being controlled. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02astbmc: Add a system-id device tree propertyAlistair Popple1-0/+13
The pel logging code requires a system-id device tree property. This should be passed to us from Hostboot but at present we don't seem to get one. This patch adds a default value of "unavailable" if it doesn't exist. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-12-02esel: Add a logging backend for bmc based machinesAlistair Popple2-0/+4
This patch adds a backend for bmc based machines running AMI firmware supporting the OEM extended sel commands. Errors are logged in pel format to the bmc. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>