Age | Commit message (Collapse) | Author | Files | Lines |
|
Previously we put all the trace buffer exports in the exports/ node.
However, there's one trace buffer for each core so I moved them into a
subdirectory since they were crowding up the place. Most kernels don't
support recursively exporting subnodes though so kernel's don't have
support for recursively exporting subnodes, so add a hack to restore the
old behaviour for now.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
[Fixed run-trace test case - Vasant]
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
SPDX makes it a simpler diff.
I have audited the commit history of each file to ensure that they are
exclusively authored by IBM and thus we have the right to relicense.
The motivation behind this is twofold:
1) We want to enable experiments with coreboot, which is GPLv2 licensed
2) An upcoming firmware component wants to incorporate code from skiboot
and code from the Linux kernel, which is GPLv2 licensed.
I have gone through the IBM internal way of gaining approval for this.
The following files are not exclusively authored by IBM, so are *not*
included in this update (I will be seeking approval from contributors):
core/direct-controls.c
core/flash.c
core/pcie-slot.c
external/common/arch_flash_unknown.c
external/common/rules.mk
external/gard/Makefile
external/gard/rules.mk
external/opal-prd/Makefile
external/pflash/Makefile
external/xscom-utils/Makefile
hdata/vpd.c
hw/dts.c
hw/ipmi/ipmi-watchdog.c
hw/phb4.c
include/cpu.h
include/phb4.h
include/platform.h
libflash/libffs.c
libstb/mbedtls/sha512.c
libstb/mbedtls/sha512.h
platforms/astbmc/barreleye.c
platforms/astbmc/garrison.c
platforms/astbmc/mihawk.c
platforms/astbmc/nicole.c
platforms/astbmc/p8dnu.c
platforms/astbmc/p8dtu.c
platforms/astbmc/p9dsu.c
platforms/astbmc/vesnin.c
platforms/rhesus/ec/config.h
platforms/rhesus/ec/gpio.h
platforms/rhesus/gpio.c
platforms/rhesus/rhesus.c
platforms/astbmc/talos.c
platforms/astbmc/romulus.c
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
[oliver: fixed up the drift]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
This fixes quite a few sparse endian annotations across the tree.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
Right now we name the trace buffers:
trace-<pir>-<phys addr of buffer>
The physical address is only really required to differentiate the
boot-time trace buffer from the runtime trace buffer associated with the
same PIR. Rename the boot trace buffer to boot-<pir> to better
differentiate it.
Cc: Jordan Niethe <jniethe5@gmail.com>
[oliver: fixed trace test]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
The top level exports node is getting a bit crowded. Move the trace
entries into their own directory since there's a lot of them and there
(currently) isn't any hard dependencies on them being in the top level
node so we can move them into a sub-node.
Cc: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
Use Software Package Data Exchange (SPDX) to indicate license for each
file that is unique to skiboot.
At the same time, ensure the (C) who and years are correct.
See https://spdx.org/
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
[oliver: Added a few missing files]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
Every property in the device-tree under /ibm,opal/firmware/exports has a
sysfs node created in /firmware/opal/exports. Add properties with the
physical address and size for each trace buffer so they are exported.
Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
The names given to the trace buffers when exported to sysfs should show
what cpu they are associated with to make it easier to understand there
output. The debug_descriptor currently stores the address and length of
each trace buffer and this is used for adding properties to the device
tree. Extend debug_descriptor to include a cpu associated with each
trace. This will be used for creating properties in the device-tree
under /ibm,opal/firmware/exports/.
Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
We want to be able to mmap the trace buffers to be used by the
dump_trace tool. This means that the trace bufferes must be page
aligned. Currently they are aligned to 4K. Most power systems have a
64K page size. On systems with a 4K page size, 64K aligned will still be
page aligned. Change the allocation of the trace buffers to be 64K
aligned.
The trace_info struct that contains the trace buffer is actually what is
allocated aligned memory. This means the trace buffer itself is not
actually aligned and this is the address that is currently exposed
through sysfs. To get around this change the address that is exposed to
sysfs to be the trace_info struct. This means the lock in trace_info is
now visible too.
Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
We would like the be able to mmap the trace buffers so that the
dump_trace tool is able to make use of the existing functions for
reading traces in external/trace. Mmaping is done by pages which means
that buffers should be aligned to page size. This is not as simple as
setting the buffer length to a page aligned value as the buffers each
have a header and leave space for an extra entry at the end. These must
be taken into account so the entire buffer will be page aligned.
The current method of calculating buffer offsets is to use a mask and
bitwise 'and'. This limits the potential sizes of the buffer to powers
of two. The initial justification for using the mask was that the
buffers had different sizes so the offset needed to based on information
the buffers carried with them, otherwise they could overflow.
Being limited to powers of two will make it impossible to page align the
entire buffer. Change to using modulo for calculating the buffer offset
to make a much larger range of buffer sizes possible. Instead of the
mask, make each buffer carry around the length of the buffer to be used
for calculating the offset to avoid overflows.
Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
A position for the boot_tracebuf is allocated in skiboot.lds.S.
However, without a __section attribute the boot trace buffer is not
placed in the correct location, meaning that it also will not be
correctly aligned. Add the __section attribute to ensure it will be
placed in its allocated position.
Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
We only touch it in limited places, let's simplify skiboot.h
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
Hackish fix from benh
Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
A few places (mostly old code) were using:
add_property_cells(hi32(number), lo32(number));
This patch converts them to use the helper rather than doing it manually.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
core/trace.c:106:23: warning: incorrect type in assignment (different base types)
core/trace.c:106:23: expected restricted beint16_t [usertype] prev_len
core/trace.c:106:23: got int
Never read anywhere (by anyone), but silences a warning by doing the right thing.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
core/trace.c:43:42: warning: incorrect type in assignment (different base types)
core/trace.c:43:42: expected restricted beint64_t static [toplevel] [usertype] mask
core/trace.c:43:42: got int
core/trace.c:44:46: warning: incorrect type in assignment (different base types)
core/trace.c:44:46: expected restricted beint32_t static [toplevel] [usertype] max_size
core/trace.c:44:46: got unsigned long
Shouldn't affect any runtime code, just cleans up the warnings.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
this saves 65720 bytes from skiboot.lid
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This is probably not the best collection of things in the world,
but it means that opal.h is much closer to being directly usable
by an OS.
This triggers a bunch of #include fixes throughout the tree.
Signed-off-by: Stewart Smith <stewart@linux.vnet.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>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|