Age | Commit message (Collapse) | Author | Files | Lines |
|
Handle more TFAC errors reported through TFMR i.e TB_RESIDUE_ERR,
FW_CONTROL_ERR and CHIP_TOD_PARITY_ERR. Clear these errors by writing to
respective TFMR bits.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
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>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
Replace prerror with 'elog' interface and correct one existing SRC
map from error type.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
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>
|
|
I debugged a checkstop with a BML boot which turned out to be device
tree issues. A corrupt device tree is very likely to result in a
later checkstop, so abort in dt_expand to make debugging much easier.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
It's a placeholder at the moment, which makes it easy to say "this never
gives a different answer". It also silences our one compiler warning:
hw/lpc.c: In function 'lpc_interrupt':
hw/lpc.c:457:6: warning: function might be candidate for attribute 'const' [-Wsuggest-attribute=const]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Endian breakage, build breakage, ...
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Remove recursive call in print_itoa to reduce the stack usage.
Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This will allow Travis CI (https://travis-ci.org) to build the firmware
and run the test suite. In the future we can also use it to run and
publish the results of scan-build and lcov.
Travis build environments are stuck back on 12.04, so we don't have a
powerpc cross compiler as part of the archive. Instead download one from
kernel.org and use that.
The 'make check' tests rely on newer -Wstack-usage flags that are not
present on the old version of gcc shipped with 12.04. Install 4.8 from
the toolchain ppa and set it to be the system default.
The tests also require valgrind, so include that in the VM environment.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
There are many places where we just pass fsp_msg without
validating whether message allocation succeded or not (like
fsp_queue_msg(fsp_mkmsg(...))).
If message allocation fails then we endup crashing OPAL. This
patch validates fsp_msg before using.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
When using a build directory different from the source tree, .C files
and make_version.sh are not found :
make: *** No rule to make target `libpore/p8_pore_table_gen_api_fixed.o', needed by `libpore/built-in.o'.
make: *** No rule to make target `make_version.sh', needed by `version.c'.
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
|
|
This function uses int arrays from stack that pushes stack usage to
more than 2kB. Reduce stack usage by allocating memory.
Ben H's stack check compile option exposed this usage count:
hw/occ.c: In function 'add_cpu_pstate_properties':
hw/occ.c:187:1: warning: the frame size of 2064 bytes is larger than
2048 bytes [-Wframe-larger-than=]
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Modify the FSP response message to include the status code in the
status/error byte instead of adding a new word to it which is
incorrect.
FSP ack messages are 2 words with status in the 3rd byte of second
word. Status byte is in the extra (3rd) word only on new status
messages from OPAL to FSP.
Code corrected based on FSP mailbox spec version 3.16.
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>
|
|
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>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The core/test/ and libc/test/ Makefile.check files both contain:
-include core/test/*.d (or libc/test/*d)
which is incorrect, since that evaluates literally to a *.d file.
This results in each build trying to find that file, and creating
it when not found (in an incorrect way because of other problems in
the Makefile).
The correct way to specify it is:
-include $(wildcard core/test/*.d)
Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
|
|
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>
|
|
Commit b54d1a8 broke timer test case.
core/test/run-timer.c: In function ‘main’:
core/test/run-timer.c:52:3: error: too few arguments to function ‘check_timers’
check_timers();
^
In file included from core/test/run-timer.c:16:0:
core/test/../timer.c:201:6: note: declared here
void check_timers(bool from_interrupt)
^
make: *** [core/test/run-timer] Error 1
This patch fixes above compilation issue.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
whoops
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
... from util.c to stack.c
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 increase various timeouts as per CQ SW283991 which should help
with some external drawers and GPUs.
We also fixup the timeouts in the PEC which HB won't do before GA3.
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>
|
|
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>
|
|
Merge PHB3 fixes from stable update
|
|
This increase various timeouts as per CQ SW283991 which should help
with some external drawers and GPUs.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
On a re-ipl or warm reboot, Sapphire asserts and deasserts PERST to each slot.
This results in the fpga image loaded into the flash for a CAPP adapter. HMIs
have been observed with a 200ms wait following PERST deassert, so bump time up
to 1s. Do this for all cases because re-ipl does not preserve memory and we'd
need a mechanism for Sapphire know that there is a CAPP adapter.
We might be able to reduce this to 750ms or 500ms but need more testing. Use
1s to be safe. Also, phyp fw uses 1s after deassert.
Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
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>
|