Age | Commit message (Collapse) | Author | Files | Lines |
|
This seem to be left behind during the previous commit for creating
a generic interface of reading the cached tod on non-fsp systems.
So, remove the old prototype fsp_rtc_get_cached_tod().
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
fsp_fetch_data_queue() internally calls fsp_queue_msg().
So ideally we should consume the result of this function.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
If the OCC interrupt comes from another chip, we incorrectly try to clear
it on the local one. This causes hangs at boot on some machines.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Commit cf6f4e8912d29fb89ce85c84834607065ad595a5 introduced a platform
independent frontend for error logging. However it failed to move the
generic parts of the fsp-elog.h header into the platform independent
one, instead relying on the fact that up until now fsp-elog.h was
included whenever a function needed to log errors.
This patch moves the platform independent defines into the frontend
header file (errorlog.h) and removes the include of the platform
specific header in generic code paths.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
By default new ipmi messages are added to the end of the transmission
queue. However sometimes it is necessary to add messages to the start
of the queue. This patch adds a new ipmi function that adds messages
to the start of the transmission queue.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Some of the generic skiboot code needs access to the rtc (for example
the pel logging code). Currently this is accessed via a call to fsp
specific code which implements an rtc cache. Obviously this wont work
on systems without a fsp.
This patch makes the rtc cache generic so that we can get the time on
other platforms (assuming they have some kind of rtc).
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Use available TCE mask and size macros to make the code readable
and easy to maintain.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
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>
|
|
We now get a bunch of warnings of places where we should go and fix
the code, yay!
(acked in discussing thread on list)
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Acked-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
|
|
|
|
We need the core to do proper endian among others since that
code is compiled in run-trace
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
None of these actually produce any warnings. My next patch will.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This would have thrown a compiler warning for cf8def9 rather than
failing at runtime.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
OPAL is expected to leave OCC stopped after receiving reset OCC
message from FSP. FSP will send this either at boot before
a load/start, or during runtime before load/start. If there
is no subsequent load/start command, the OCC can be left stopped.
After few attempts (runtime reset), FSP can just send reset and
expect OPAL to leave OCC in stopped state.
Call HBRT to stop OCC on FSP reset OCC command and acknowledge.
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
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>
|
|
Now that we catch/handle machine check interrupt directly in Linux host
PowerNV kernel, we are not anymore dependent on OPAL firmware to do MCE
handling job for us. The MCE handling code in OPAL has exclusive stack
space (4k size) reserved and remains unused with Linux host not being
dependent on it anymore. Hence, this patch removes the code that allows
machine check interrupt patching in OPAL and reclaims back 4k of stack
space for use of normal stack. For older kernel the patching request
will result into an error.
The subsequent patch will remove the rest of MCE handling code from OPAL.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
We grab a version from git tags (or SKIBOOT_VERSION environment variable),
optionally tack on EXTRA_VERSION (if from git) as well as add things to the
git version number if we're ahead of the most recent tag or the tree is dirty.
Also fix-up makefiles so that we don't have to rebuild version.c every time
you run make.
fsp attn area needed updating as we can have >40 character version strings.
We also export the version string via device tree rather than just the gitid.
For buildroot builds, setting SKIBOOT_VERSION environment variable to the
tag you grab will do the correct thing.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
It only exposed one function that is local to the hdat stuff
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
__builtin_frame_address really wants constants
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Separate text translation from capture of the backtrace
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
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>
|
|
Define SRCs of I2C component and interface with the existing
skiboot 'errorlog' infrasturcute for commiting the logs. Add the
i2c specific OPAL error codes to differentiate various types of
errors during i2c operations.
To ease debugging, dump the i2c register contents, 'master' and
'request' structure bits in case any error occured during transfer
on the bus. Minor clean-ups as well.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Due to the lack of SLW timed interrupt support, we take the opportunity
to check out timers on any incoming interrupt. However we really don't
want to do that for the background pollers.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
We only poll the masters for the chip that got the interrupt
and we improve the running of the timers as well.
We user the new TIMER_POLL facility to replace the use of the
OPAL poller, which simplifies the code further.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
These have no expiry and get called whenever the opal pollers run,
they are intended to replace most opal pollers and allow the same
code in drivers to chose between a poller or a timer based on things
like interrupt availability for example.
The other advantage over existing pollers (which I hope to deprecate)
is that they are protected against re-entrancy (while still running
without locks held).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
And start adding interfaces to lookup i2c busses.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This updates the i2c driver significantly, using a simpler state machine,
using the new timer for timeouts, and fixing a number of issues. I also
changed the Linux interface so I've changed the token number since some
builds have been done with the old code already.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
For now running off the event pollers, that will improve once we get
delayed interrupts from the SLW
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Fixed few bugs and clean up a lot. Renamed the state machine variables
to make more sense. A new helper 'p8_i2c_check_work' to avoid hitting
deep call stack after request complete.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Using the platform.load_resource interface, allow an external initramfs
image to be passed to the kernel.
We split the KERNEL_LOAD_BASE/KERNEL_LOAD_SIZE region in half, to allow
space for the initramfs.
Signed-off-by: Jeremy Kerr <jeremy.kerr@au.ibm.com>
Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
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>
|
|
We steal opal_update_pending_evt's lock for protecting the allocated
dynamic event mask.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch adds the generic i2c driver infrastructure to handle multiple i2c
master cores present in the system and exposes structures and interfaces for
the client to perform I/O on the i2c slave devices.
The driver adds the capability to queue multiple requests from client and
let clients notified asynchronously after completion. It does that by
handling the i2c interrupt or through OPAL poller in the absence of
interrupt.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
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>
|
|
In order to support fsp-less machines we need to be able to log errors
using a BMC or some other mechanism. Currently the error logging code
is tightly coupled to the platform making it difficult to add
different platforms.
This patch factors out the generic parts of the error logging code in
preparation for adding different logging backends. It also adds a
generic mechanism for pre-allocating a specific number of objects.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
The PEL log format is not specific to the FSP. We plan to use the same
format for OpenPOWER systems. This patch refactors the code into a
platform agnostic file.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This better states the intention of what it should return.
I was bit unsure when fixing mem_size(), so hopefully this
makes future me (or other people) less unsure as to the
intended return value of this function.
No functional changes, just rename.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Acked-by: Rusty Russell <rusty@au1.ibm.com>
|
|
There are more components using asynchronous infrastructure for messaging
between OPAL and kernel, therefore the patch bumps up the count and
documents the usage.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
The patch adds the support for reading and updating the system
parameter boot device path.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
Fixes 64MB chip support, improve Macronix settings, add Micron
chip support, etc...
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Right now if any non-LED FSP_MCLASS_INDICATOR class sub
command is received, we print it as an invalid sub command
like the following which then eventually gets reported as an
unhandled FSP message.
[163022636453,5] FSPLED: Invalid FSP async sub command da1105
[163022638116,3] FSP: Unhandled message da1105
This patch defines the complete list of FSP_MCLASS_INDICATOR
sub commands and handle them in the registered FSP async command
client by sending a generic error acknowledgement to the FSP.
Reported-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|