Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch enabled TPO sequence handling in Sapphire.
Timed power on notification comes from the user through
set_poweron_time tool. After receiving a valid TPO from user,
Sapphire sends a request to FSP through maibox command to set TPO.
FSP will set TPO and power on the system as per the TPO set by the user.
[ Removed global read_data, removed writing to NULL pointers,
fixed a couple of memory leaks ... --BenH
]
Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Ensure a thread is not stopping its siblings from making forward
progress when we are busy-waiting on older DD1.x CPU revisions where
SMT priorities are somewhat broken.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Linux can request for lesser bytes than actual elog size.
Also make sure Linux is not requesting more than elog size.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
If skiboot doesn't live in a git repository, the makefile will go
searching up the directory tree for one. To save confusion, only look in
the source tree for the git repository.
The gitid can be overridden by passing GIT_SHA=foo as an argument to
make. This is useful for doing builds outside of a git tree, as
buildroot does.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Rebooting and power down for the Palmetto is done by the BMC, which we
speak to over the BT interface using IPMI. Implement the IPMI chassis
commands which are used for power control, and hook them up to the
palmetto platform callbacks for shutdown and reboot.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch adds a device tree entry for the BT interface on Palmetto
and a call to initialise the BT/IPMI driver to allow interaction with
the BMC via IPMI commands.
[ Minor changes to device-tree representation -- BenH ]
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch adds a basic IPMI layer to the sapphire core and support
for a BT IPMI interface as found on the Aspeed BMC of the Palmetto
platform
[ Changed the compatible property -- BenH ]
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
OCC F/w team recommends 60s timeout waiting for OCC to init. OCC has
to wait for memory throttle calibration from hardware procedure and
that takes 10s of seconds on large memory configurations. In one of
the failing case, it took 24s for OCC to init.
Typically OCC takes 2-5 secs to boot and we do that in parallel with
skiboot inits. But on certain corner cases with large memory,
we have to wait for 60s before we give up.
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Don't add timestamps, the core printf does it now
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
When setting the flag in a lock that indicates that it's on the console
path, we need to take and release that lock to ensure that any other
processor that might have taken it before the flag was set has released
it, otherwise the lock might still be held without the console count
properly incremented, which can cause it to go negative or cause the
deadlock that we mean to avoid by that to still occur.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Adds a fake RTC that can be initialized via a named reserve in the
device tree that may, at some point, be on NVRAM.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The complete reset could be issued by kdump kernel to remove pending
PCI traffic in order to avoid EEH errors in kdump scenario. However,
the bus numbers configured into PCI bridges would be lost after the
reset and it would cause that some of PCI devices (e.g. IPR) can't
be probed by kdump kernel successfully.
The patch fixes above issue by restoring bus numbers after complete
reset. It's responsing to bug#113210
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Currently, the tasks of scanning PHBs are done on master CPU one
by one. The patch intends to do same tasks on multiple CPUs in
order to save booting time with help of additional flags to PHB.
With the patch applied, we saves 22 seconds the tasks to reset
and scan 8 PHBs on one P8 box from 37 seconds to 15 seconds.
NOTE: the printed logs during PCI enumeration should include
PHB index to be self-explaining enough. I'll fix it later.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
As Rolf reported, 2 downstream ports from different PHBs are
connected to same physical bridge, which supports virtual
"partitioned" functionalities. Fundamental reset issued on
one PHB affects the functionality used by another PHB during
PCI enumeration. Eventually, we can't detect the functionality
and all devices behind it on one of two PHBs.
The patch splits PCI enumeration to reset all PHBs and then scan
them one by one to avoid above issue. Also, the patch replaces
PCI_MAX_PHBs with ARRAY_SIZE, which is used heavily.
Reported-by: Rolf Brudeseth <rolfb@us.ibm.com>
Suggested-by: Benjamin Herrenschmidt <benh@au1.ibm.com>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The objcopy call was the odd one out in our build output.
Before:
[LD] hw/built-in.o
[LD] skiboot.elf
powerpc-linux-gnu-objcopy -O binary -S skiboot.elf skiboot.lid
[NM] skiboot.map
After:
[LD] hw/built-in.o
[LD] skiboot.elf
[OBJCOPY] skiboot.lid
[NM] skiboot.map
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
... helps figure out what the cause of the failure was.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Acked-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>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This enables (advanced) users to vary what level of output they want
at runtime in the memory console and through console drivers (fsp/uart)
You can vary two things by poking in the debug descriptor:
a) what log level is printed at all
e.g. only turn on PR_TRACE at specific points during runtime
b) what log level goes out the fsp/uart console
defaults to PR_PRINTF
We use two 4bit numbers (1 byte) for this in debug descriptor (saving
some space, not needlessly wasting space that we may want in future).
The default is 0x75 (7=PR_DEBUG to in memory console, 5=PR_PRINTF to drivers)
If you write 0x77 you will get debug info on uart/fsp console as
well as in memory. If you write 0x95 you get PR_INSANE in memory but
still only PR_NOTICE through drivers.
People who write something like 0x1f will get a very quiet boot indeed.
A future patch would be to (when possible) peek at device tree entries
for if we should change the default.
A future patch would add an OPAL API to get/set this.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
We modify write() (adding console_write()) which calls down to
a modified __flush_console() which can now decide if it's flushing
the added console contents to the console drivers or not.
A future patch may add support for changing PR_NOTICE to some other level
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>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Moving assert_fail() out of libc and into core/utils.c so that we can
sanely call prlog(PR_EMERG).
We shorten it from three fputs calls down to one prlog() call.
This may increase the number of cycles and stack usage for when we
hit an assert, which may not be desirable.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
When handling assert and we're going to fail, get the message out
with a high priority.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
If we're printing a backtrace, things have probably gone horribly,
horribly wrong - highest log priority.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Means that we print things correctly in console log with timestamps.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Save stack space, remove code and improve logging all in one handy patch.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
It turns out that GCC will use a builtin printf implementation that
directly wraps vfprintf (or something), so when I tried to do my
neat trick of overriding printf() with a call to vprlog() adding the
timebase and default log level to the log message, it wouldn't work as
GCC was being helpful.
This change to compiler options will mean that other places where GCC
is being helpful and using builtins rather than our implementations will
go away, potentially helping/hurting us.
We probably want to build with -ffreestanding anyway though.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The idea is to use prlog(PR_EMERG|PR_ALERT|...|PR_WARNING|..|PR_TRACE)
instead of random printf() calls, so that they can be properly
filtered for different console implementations (may only want trace level
calls in memory console rather than over serial port).
We remap PR_PRINTF to PR_NOTICE (5) rather than the absolute value 5.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Replace the libc printf implementation with a wrapper that does
fancy log things such as display timestamp and the log level.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This is the initial patch for having timestamps in the log.
It currently only wraps prerror to our prlog() function and thus only
(very slightly) modifies bootup log.
we use the timebase as an indication of the progression of time. It is
not perfect, and is indeed reset back to zero during boot, but it should
serve adequately for our needs of "approximately this much time elapsed
between log entries".
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
At present CPU control area ntuple in SPIRA structure is NULL.
ATTN component in Service Processor side checks for this field and if its empty,
it logs hardcoded SRC (0xBB821410) and generates SYSDUMP. So we have 1 SRC for
all failure (assert call) from OPAL side. This makes difficult to debug the issue.
Service processor provides attention area interface (FIPS PHyp Attentions spec),
so that we can pass SRC and user data (error message) to service processor.
This will helps us identify different failures in OPAL.
This patch enables attention area and provides interface (update_sp_attn_area())
to add src and user data (error message) through assert macro.
Attention SRC format:
1st byte - Opal src type
2-4 bytes - Holds the address of the assert function call
Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Commit 95932150: "slw: patch hsprg0 for wakeup from winkle" added
OPAL call for HSPRG0 to be patched via slw.
Extend it to all the sprs supported in libpore.
Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch changes the way how the old and the new system epow status
are maintained. After receiving FSP EPOW async message, only reset
those parts of system EPOW status which will be updated with the
new FSP async message. This patch also fixes a problem with comparing
the contents of the new and the old system EPOW status.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This patch changes the EPOW related mbox commands encoding to
make sure FSP message response structure is allocated. So that
when the command returns from FSP, it can be handled appropriately
and orphan response will not be logged. This also adds some more
in-code documentation explaining why panel status request based
handshaking is required with the FSP.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Right now, all the FSP initiated EPOW messages get logged. SPCN
configuration change message comes as part of the extended 1 panel
status type of FSP message all the time and fills up the log buffer
like the following.
------------Sapphire log---------------
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
EPOW: Received extended 1 EPOW from FSP
---------------------------------------
Even without being acted upon, SPCN configuration change does not
take down the system. With this patch only the messages, which need
to be acted upon will get logged.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The idle flag IDLE_LOSE_HYP_CONTEXT can be wrongly interpreted for
IDLE_USE_INST_SLEEP if the kernel has endian bug, which would
incorrectly enable fastsleep even though the device tree does not
advertise it.
Unfortunately, some kernels currently do have such a bug.
Additionally, current fastsleep wakeup path makes opal calls to sync
timebase which is not endian safe. This can lead to checkstops.
Hence for now change the bits used in IDLE_LOSE_HYP_CONTEXT to avoid
misinterpretation with IDLE_USE_INST_SLEEP in LE kernels.
Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Add informational event in add dump region path. Also change the
severity of the existing elog event.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Add OPAL interface to remove host memory region from SYSDUMP.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Add OPAL interface to add host memory region to SYSDUMP.
[ Added exported IDs in opal.h --BenH ]
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Presently we assume that we don't try to add new entry with
same ID again. But when we add OPAL interface we may get new entry
with same ID again (like when host does kexec). This patch checks
and removes old entry before adding new entry with same ID.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
We assumed that we always get TCE aligned address and size. But
its possible that we may non-aligned address (specially when we
add OPAL interface. This patch adds TCE validation.
Also defer TCE mapping until we make MBOX command. This is required
when we add OPAL interface. Ended up introducing new variable to
hold real address and size.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
- Better function naming
- Better macro naming
- Re-ordered function variables
- calculate max_mdst_entry after allocating memory
for mdst table.
No change in functionality.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
This is not used globally
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
It's broken on all DD1.x chips.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|