aboutsummaryrefslogtreecommitdiff
path: root/platforms
AgeCommit message (Collapse)AuthorFilesLines
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>
2014-12-02ipmi/fru: Add support for populating fru dataAlistair Popple1-0/+1
This patch adds basic support for populating some fru data. Currently we only support adding the skiboot version number to the product information area. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-11-28Remove sprintf: there's no good reason to have this in firmwareStewart Smith3-7/+7
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-11-28PLAT: Add i2c busses on firenzeNeelesh Gupta2-1/+133
Set up the device tree nodes of i2c masters and their busses, eventually all this has to come from hostboot. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-11-25palmetto: Use the right model of VPD eepromBenjamin Herrenschmidt1-1/+1
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-14platforms/astbmc: Temporary reboot workaroundJoel Stanley1-1/+3
The BMC does not currently support the IPMI_RESET (03h) chassis power control command. In order to have reboot working in the interim, send a POWER_CYCLE (02h) instead. This should be reverted once the BMC has support for 03h to ensure we follow the specification. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-14i2c: Update DT bindings and minor changesBenjamin Herrenschmidt1-6/+8
The i2c bus frequency is now per port and we use more standard properties this and the clock frequency of the master cell itself. Also use "ibm,opal-i2c" as a compatible match to indicate that the DT node is compatible with the OPAL APIs, whether it's a P8 i2c bus or something else (we will eventually expose the centaur i2c's too for example). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-11i2c: Move bus management and OPAL API to core i2c codeBenjamin Herrenschmidt1-2/+0
And start adding interfaces to lookup i2c busses. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-11-07PLAT: Add i2c busses on palmetto/habaneroBenjamin Herrenschmidt1-0/+92
We add engine 1 only for now. Eventually, HostBoot will provide the device nodes and we'll filter what Linux can access. We expose the VPD eeprom so that the Linux AT24 driver can pick it up Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-30platform: add a platform hook for loading external resourcesJeremy Kerr2-0/+2
Currently, in core/init.c we do a fsp-specific load procedure to grab the kernel image. We'd like to do two things: allow other types of resources, and have paths for non-FSP platforms to perform loads. This change adds a platform-specific load_resource hook, and moves the currently loading code to fsp_load_resource. To allow other resource types, we add an identifier to indicate the type of resouce to load. Signed-off-by: Jeremy Kerr <jeremy.kerr@au.ibm.com> Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com> Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-10-30ipmi: Add an opal interface to the ipmi stackAlistair Popple1-1/+1
This patch adds two opal calls (opal_ipmi_send and opal_ipmi_recv) to allow an operating system to send and receive arbitrary ipmi messages to the BMC. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-22fsp/elog: Make the logging backend platform specificAlistair Popple3-1/+5
OpenPOWER boxes don't have an FSP and therefore implement their own method for passing log messages to a support processor. This patch makes the logging method platform specific. 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>
2014-10-15uart: Give UART it's own OPAL console callbacks instead of dummy consoleBenjamin Herrenschmidt2-3/+7
This means the Linux output no longer gets into our internal log, which makes dumping of it from Linux a lot nicer. It will also allow us to improve the way we do the bufferring for Linux and to exploit eventually the TX interrupts. It will also allow us to implement some form of timeouts for the OPAL console variant of it so we don't get stuck of the BMC doesn't consume from the virtual UART. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-15console: Move dummy_console_add_nodes() to common codeBenjamin Herrenschmidt3-9/+0
All the platforms basically do the same thing Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-15Firenze platform: quieten logging of sending PCI info to FSPStewart Smith1-13/+9
We don't need the debug level printouts by default, set to PR_DEBUG Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-10-08Change DBG macro to prlog calls for platforms/ibm-fsp/lxvpd.cStewart Smith1-18/+23
No functional changes, when running with higher log level, you'll get debug messages without recompiling! Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-10-05platform: Add Habanero platformBenjamin Herrenschmidt2-1/+53
For now identical to Palmetto. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-05platform: Rename "bmc" to "astbmc"Benjamin Herrenschmidt7-8/+8
We might have a different BMC in the future.. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-05plat/palmetto: Move most code to a common file & reorder inits a bitBenjamin Herrenschmidt5-217/+252
This moves most of the palmetto platform code to a "common" file to share with other platforms using AST BMC. We also initialize IPMI later. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-05ipmi/bt: Rework iBT register accessBenjamin Herrenschmidt1-0/+1
The bits in the control register are mostly write-1-to-clear, so the rmw sequences in bt_setmask() and bt_clearmask() don't work. Additionally, H_BUSY is weird as it's a write-1-to-toggle, so let's write a "safe" function that sets it to the desired state based on its previous state. (We can optimize that further later). Also enable interrupt operations. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-05plat/palmetto: Fix SIO UART vs UART setup and iBT setupBenjamin Herrenschmidt1-2/+17
The AMI images use the virtual UART, not the SIO UART, so configuring the SIO the way we do is incorrect. Additionally, they don't configure the interrupts properly (bad polarity for VUART and bad number for iBT). This reworks the inits to fix that up: - All SIO interrupts are set to level low - Check if VUART is enabled. If yes, configure and use it (and disable SIO UART which hostboot might have left enabled). - Else, reconfigure VUART LPC address and IRQ properly - Configure iBT LPC address and IRQ properly Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>