| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
When I reworked Thomas' fix, I put the symbol prefix in the wrong spot.
This resolves that bug and makes it clearer what is going on in the
template.
Fixes: 8275ca370476a3 (template.S: fix to build on architecture with non-empty __USER_LABEL_PREFIX__)
Signed-off-by: Joel Stanley <joel at jms.id.au>
|
|
|
|
|
|
|
|
|
| |
When the dtb targets were split out into two separate rules, the
dependencies should have been modified. Without this the creation of
dtsi can race the dtc step and the build fails.
Fixes: 81957b54c1b6 ("Makefile: seperate out dtb building steps")
Signed-off-by: Joel Stanley <joel at jms.id.au>
|
|
|
|
|
|
|
|
| |
The pdbg_target_index is supposed to walk up the tree looking for an index.
Instead it caused segfaults when the current target has no index assigned.
Fix the code up to make it do what it's supposed to.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
| |
Add support for detection of generic POWER9 chiplets. Unlike cores they do
not support special wakeup.
Signed-off-by: Jason Albert <albertj@us.ibm.com>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
| |
A core is a specific subset of chiplets so rename the existing usage of chiplet
to core so that we may add other types of chiplets to the system. No functional
change.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
| |
We don't have any recursive makefiles, so this does not provide any
useful debugging information.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now the build is pretty:
$ make
make --no-print-directory all-am
CC libfdt/libfdt_la-fdt.lo
CC libfdt/libfdt_la-fdt_wip.lo
CC libfdt/libfdt_la-fdt_ro.lo
CC libfdt/libfdt_la-fdt_sw.lo
CC libfdt/libfdt_la-fdt_addresses.lo
DTC fake.dtb
CC src/pdbg-main.o
DTC p8-i2c.dtb
CC libfdt/libfdt_la-fdt_strerror.lo
DTC p8-fsi.dtb
Note that we now pass -q to the device tree compiler to ignore all of
the junk that it spits out.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
|
| |
I don't see the need for the .tmp extension anymore.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
|
|
| |
We currently produce the .dtb.o.tmp and then convert that into the .dtb.o
file in the same rule.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
|
|
|
|
|
|
| |
Blackfin has a non-empty __USER_LABEL_PREFIX__, which means that a
symbol called "foo" in C must be named "_foo" in assembler.
We now use the preprocessor to set the variables in template.S instead
of using sed.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
|
|
|
|
|
| |
The existing API between libpdbg and pdbg was poorly defined. Other
programs are beginning to utilise libpdbg so a more strictly defined API
would be beneficial. This patch introduces a new header (libpdbg.h) which
includes the definition of a public API for libpdbg and updates pdbg to
only depend on this.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
| |
In preparation for a better defined libpdbg API rename "struct target" to
something less generic so that we can export the name.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
|
|
|
| |
A lot of the device-tree parsing code was borrowed from Skiboot. This
includes dt_for_each_node() which iterates over all the child device-tree
nodes. It was incorrectly assumed this only iterated over direct children,
rather than every child in the tree. This lead to each target being probed
multiple times when the children were explicitly (and incorrectly) iterated
over.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
| |
When the user specifies a device node on the command line, use that
value to update the entry in the pib node.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
| |
This was not implemented, so the user always got the default /dev/i2c4
no matter what the device tree specified.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
| |
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The .dtb.o files are currently generated by compiling the .dts into
.dtb, and then making a pass of objcopy to turn them into an ELF file
that can be linked with the rest of pdbg.
Unfortunately, this objcopy logic doesn't work on all platforms,
because it doesn't generate an object file with the correct ABI
flags. For example, on mips32r6, it fails to build with:
mipsel-buildroot-linux-gnu/bin/ld: fake.dtb.o: warning: linking abicalls files with non-abicalls files
mipsel-buildroot-linux-gnu/bin/ld: fake.dtb.o: linking -mnan=legacy module with previous -mnan=2008 modules
mipsel-buildroot-linux-gnu/bin/ld: failed to merge target specific data of file fake.dtb.o
mipsel-buildroot-linux-gnu/bin/ld: p8-fsi.dtb.o: warning: linking abicalls files with non-abicalls files
In order to fix this, we want to generate a proper object file with
gcc instead of playing tricks with objcopy, and this is what this
commit implement.
We have a template.S file, which gets sed'ed on the fly to point to
the right file / use the right symbol name, and then is fed to gcc.
This allows to remove all the objdump/objcopy logic from the
configure.ac script as well.
This fixes build issues of pdbg seems inside the Buildroot project:
http://autobuild.buildroot.net/?reason=pdbg-77158819158d1d7053a737ac090d04fdfbfe9265
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Cyril Bur <cyrilbur@gmail.com>
[joel:
- integrate Cyril/Stephen's tr change
- fix out of tree builds]
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
|
|
| |
The host and FSI backend require the device type to be specified. When
a user forgets, we pass a null pointer to strcmp and segfault.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The compiler.h header contains a macro that defines __unused. When
building against uClibc this collides with uClibc_stdio.h:
In file included from /usr/include/stdio.h:71:0,
from libpdbg/fake.c:17:
/usr/include/bits/uClibc_stdio.h:149:16: error: expected identifier or ‘(’ before ‘;’ token
void *__unused; /* Placeholder for codeset binding. */
^
As it is unused in pdbg, remove it.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|\
| |
| | |
docs: Add HTM to README.md
|
| |
| |
| |
| | |
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
|
|/
|
|
|
|
|
|
|
|
| |
The code in device.c was largely based on code from Skiboot which included calls
to _fdt_check_node_offset and _fdt_offset_ptr which are internal libfdt
functions. This makes packaging difficult so remove the usage of these functions
and call the correct public library API equivalents.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Suggested-by: Frédéric Bonnard <frederic@fr.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When cross compiling with uclibc under buildroot, we get the following
clash:
./ccan/endian/endian.h:84:24: error: redefinition of ‘__bswap_32’
static inline uint32_t bswap_32(uint32_t val)
^
In file included from usr/include/bits/byteswap.h:1:0,
from usr/include/byteswap.h:22,
from usr/include/endian.h:59,
from usr/include/bits/pthreadtypes.h:21,
from usr/include/bits/uClibc_stdio.h:92,
from usr/include/stdio.h:71,
from libpdbg/device.c:18:
usr/include/bits/byteswap-common.h:44:1: note: previous definition of ‘__bswap_32’ was here
__bswap_32 (unsigned int __bsx)
^~~~~~~~~~
Work around it by not using ccan's endian. There's only one call site, and we
can use a libc function instead.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
| |
This fixes a compile failure when cross compiling with musl libc under
buildroot.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is not Hardware Transactional Memory, rather it is the Hardware Trace
Macro (HTM) which can be used to gather data about hardware activity.
Currently only Nest HTM is implemented.
Only runs on a PPC host on a kernel built with CONFIG_PPC_MEMTRACE and
CONFIG_PPC_SCOM.
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
| |
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
|
| |
The device trees inside pdbg use 'chip-id'. This function can tell the
consumer of any target what chip it is on, if it searches for the correct
attribute.
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
| |
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
|
|
|
|
| |
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
|
|
|
|
|
|
|
| |
This allows tools that do tarball builds from git (eg. buildroot) to
manually set the GIT SHA1.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
| |
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
|
|
| |
Allows access to scom addresses with IBM bit 0 set (ie. indirect scom
addresses).
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
| |
Linux kernels configured with CONFIG_SCOM_DEBUGFS can be used to access
SCOM registers on the PowerPC machine running pdbg. Add a backend which can
be use to access SCOM registers via debugfs.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
|
| |
The description of the PIB is the same regardless of access mechanism
(OpenFSI, direct, etc.) so to ease updates move the common definitions into
a seperate file which can be easily shared between backends similar to how
P8 works.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
| |
When multiple device tree nodes exist at the top level subsequent nodes were not
getting probed. Fix this.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
| |
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
|
|
| |
The OpenBMC Yocto build process uses an out of tree build model. Now
that pdbg supports that, add it to the Travis build so it does not
regress.
This also updates to an Ubuntu 17.04 container.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
|
| |
ssssshhh.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
|
| |
This avoids warnings about GNU make extensions.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
| |
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
| |
Out of tree builds would occasionally fail due to not finding a generated
include file for the device-tree.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
| |
We were using the system objcopy which doesn't always recognise the host file
formats. Instead use the target objcopy.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
| |
The m4 targets had include directories based on relative paths. This broke
out-of-tree builds so turn them into absolute paths.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
| |
Fixes a compilation error due to an unused result on some systems.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
|
|
|
| |
Changes:
- Move to a generic description of the hw topography using device-tree
- General build bugfixes
- Build libpdbg as a shared library
- Complete support for POWER9 including get/putmem and register operations
- Minor code clean-ups
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
| |
Update documentation to match latest usage patterns.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
| |
Several minor fixes were required to enable building on both x64 and ARM with
-Wall -Werror, mostly related to unused variables and bad printf string formats.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
| |
All commands need a target to operate on. Running a command with no target would
produce no output which can be confusing. Instead return an error message and a
hint.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|