aboutsummaryrefslogtreecommitdiff
path: root/platforms
AgeCommit message (Collapse)AuthorFilesLines
2015-10-26Garrison: Add Nvlink device tree bindingsAlistair Popple1-0/+61
Garrison is the first system to support Nvlink. Eventually Hostboot should provide these device tree bindings. In the meantime this patch will add the required fixups to enable the Nvlinks on Garrison. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-10-26firestone: fix spacing in slot nameJeremy Kerr1-1/+1
The other SlotN names have no space. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-09-15platforms/astbmc: Move prd_init calls to astbmc_early_init()Jeremy Kerr4-5/+2
Currently, most astbmc platforms do their own call to prd_init(), but garrison is out-of-sync. This change moves the prd_init call to astbmc_early_init, so we don't need to enable it on every platform. 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-09-11firestone: Add slot tablesBenjamin Herrenschmidt1-0/+110
Slot names courtesy of Sertac Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-09-09assert dt allocation succeeded for rhesus rtcStewart Smith1-0/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-09-09IPMI: Introduce attention callVasant Hegde4-0/+4
Presently abort() function is not working on BMC based machine. System hangs after abort/assert call. We have to reboot machine from BMC (IPMI command or BMC console). This patch introduces attention functionality for BMC based machine. It logs eSEL event that contains OPAL version, file info and backtrace. And calls cec_reboot... which takes care of rebooting host. Note: - This patch uses ipmi_queue_msg() instead of ipmi_queue_msg_sync() as we are having some issues with sync path. This will resolved once we sort out [1]. - This patch calls cec_reboot to reboot machine after logging eSEL event. It queues IPMI message and bt_poll() should be working until we pass reboot IPMI message to BMC. Hence we have while loop with time_wait_ms(). Alternatively we can use xscom_trigger_xstop().. but it will stop immediately and eSEL logging fails. [1] https://lists.ozlabs.org/pipermail/skiboot/2015-August/001824.html Sample eSEL output after assert call: ------------------------------------ [hegdevasant@hegdevasant bin]$ strings fir01bmc.150820.120511.eSel.binary BB821410 AT8335-GTA000000000000 AT8335-GTA000000000000UD ATDESC OPAL version : skiboot-5.1.1-44-geae3999-hegdevasant-dirty-bb31bfd File info : core/init.c:463:0 CPU 0060 Backtrace: S: 0000000031d83bc0 R: 000000003006086c .ipmi_terminate+0x110 S: 0000000031d83c60 R: 0000000030017f90 ._abort+0x80 S: 0000000031d83ce0 R: 0000000030017fd8 .assert_fail+0x34 S: 0000000031d83d60 R: 0000000030013dcc .load_and_boot_kernel+0x784 S: 0000000031d83e30 R: 000000003001437c .main_cpu_entry+0x57c S: 0000000031d83f00 R: 0000000030002544 boot_entry+0x194 Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-09-09platform: Add platform hook for terminate callVasant Hegde2-0/+2
Current abort() call works fine on FSP based system. We need different mechanism on BMC based machine. Hence introduce platform hook for terminate call. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-09-09IPMI: Pre-allocate memory for PANIC eventVasant Hegde1-0/+1
Currently we allocate ipmi_msg for every eSEL event.. But in PANIC its not advised to allocate memory. Hence pre-allocate ipmi_msg for PANIC event. Note that we continue to allocate memory for normal event. Also with current implementation we can log only one eSEL event in PANIC path. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-09-01Add slot tables for HabaneroBenjamin Herrenschmidt1-1/+98
Names provided by Ben Mashak Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-09-01plat/bmc: Add infrastructure for slot tablesBenjamin Herrenschmidt3-1/+119
This adds some basic infrastructure for simple slot tables allowing us to name slots and built-in devices on OPP machines. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [stewart@linux.vnet.ibm.com: add IBM (C) in new file, trim trailing whitespace] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-09-01pci/fsp: Cleanup slot_infoBenjamin Herrenschmidt1-41/+48
This moves some fields that are specific to the LXVPD mechanism out of the generic pci_slot_info into a private wrapper. Additionally, most fields in pci_slot_info are made signed integers in order to allow them to be set to "-1" which indicates that the field doesn't have a meaningful value, and inhibits creation of the corresponding device-tree property. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-08-28libflash: Return a pointer to internal structure.Cyril Bur2-2/+2
There are some functions (notably: erase_chip and set_4b_mode) which cannot be abstracted away by the blocklevel interface, this means that if they are really needed (by pflash for example) then at the moment a program like pflash would need to pass a blocklevel_device struct to libflash. This forces libflash to trust that it was given a blocklevel that it did init. If it didn't init it the container_of call will return junk and libflash has no way to protect its self. This method (while very useful) has destroyed type safety. As such, this commit reintroduces some typesafety back into this stack. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-08-26Fix spelling mistakesStewart Smith3-4/+4
See https://github.com/lucasdemarchi/codespel Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-07-10fsp/ipmi: Add the in-band IPMI support for FSP systemsNeelesh Gupta1-0/+5
FSP implements the IPMI commands support that can be accessed over the mailbox interface from the host. The host needs to provide and receive the message/data bytes of the IPMI command in the TCE space in the KCS (Keyboard Controller Style) format. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Acked-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-07-09opal: Enable backup topology.Mahesh Salgaonkar1-0/+3
Whenever FSP makes any changes to backup topology as part of either routine hardware maintenance or fixing failed backup topology configuration, it sends out mailbox command xE6, s/c 0x06, mod 0, to enable/disable the backup topology. OPAL layer should keep itself up-to-date with accurate details of current topology configurations. This will help OPAL layer to successfully handle any TOD failover in future. The FSP can only request that the currently inactive (backup) topology be disabled or enabled. If the requested topology is currently the active topology, then fail this request with a 0xB8 (TOD topology in use) status as return code. For disable request, set the backup topology status as disabled. For enable request, scan all the available chips and find the new backup master chip by looking at TOD status register of each chip. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-07-07pnor_init() - Fix Uninitialized pointer readKamalesh Babulal1-1/+1
In pnor_init(), there are chances of pointer bl being read before assignment. Fix it by initializing it to NULL. Fixes Coverity defect#97868. Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Cc: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
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>