summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add Blackbird supportRaptor Engineering Development Team2019-04-192-1/+7
|
* Add Talos supportRaptor Engineering Development Team2019-04-192-1/+9
|
* tests: Fix the core address calculationAmitay Isaacs2019-03-281-3/+3
| | | | | | | fake.dts was changed to have fixed addresses for core (to be able to test exact dn name match). Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
* path: Avoid a match for nested nodes of the same classAmitay Isaacs2019-03-261-0/+13
| | | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Tested-by: Rashmica Gupta <rashmica.g@gmail.com>
* path: Match targets with dn name correctlyAmitay Isaacs2019-03-261-3/+5
| | | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Tested-by: Rashmica Gupta <rashmica.g@gmail.com>
* main: Use new api to read/write memoryAmitay Isaacs2019-03-263-22/+14
| | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
* main: Set I2C backend device specified in argumentsArtem Senichev2019-02-051-0/+8
| | | | | | | | | Restores the functionality that allows to set I2C backend device through command line arguments, it was broken by commit dacc9b57e4615f125eb1f56d842a64c40abb1408 Signed-off-by: Artem Senichev <artemsen@gmail.com> Reviewed-by: Amitay Isaacs <amitay@ozlabs.org>
* adu: Add arugments for block sizeAlistair Popple2018-12-182-16/+59
| | | | | | | | | | | | | | Not all memory can be read with the default ADU block size of 8 bytes. Specifically cache-inhibited access to some MMIO regions such as PCIe BAR spaces requires 4 byte accesses to avoid check stopping the machine. This patch adds library functions to read/write IO memory which takes a block size argument and two new put/getmemio commands to allow a specific block size to be specified from the command line. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Amitay Isaacs <amitay@ozlabs.org>
* optcmd: Add parser for 8-bit power of 2 integersAlistair Popple2018-12-112-0/+27
| | | | Signed-off-by: Alistair Popple <alistair@popple.id.au>
* main: Drop unused target_select/target_selected functionsAmitay Isaacs2018-12-032-15/+1
| | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
* main: Convert gdbserver command to path based targetingAmitay Isaacs2018-12-031-39/+38
| | | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Rashmica Gupta <rashmica.g@gmail.com>
* main: Convert htm commands to path based targetingAmitay Isaacs2018-12-031-44/+62
| | | | | | | | | If none of the expected targets are selected, log an error. core htm - core target nest htm - pib target Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
* main: Drop unused iterators with callbacksAmitay Isaacs2018-12-032-69/+0
| | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
* main: Convert regs command to path based targetingAmitay Isaacs2018-12-031-34/+33
| | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
* main: Convert threadstatus command to path based targetingAmitay Isaacs2018-12-031-92/+91
| | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
* main: Convert thread commands start/stop/step/sresetAmitay Isaacs2018-12-031-25/+50
| | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
* main: Convert getring to path based targetingAmitay Isaacs2018-12-031-18/+38
| | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
* main: Mark print_target staticAmitay Isaacs2018-12-031-1/+1
| | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
* main: Move device_node setting before parse_optionsAmitay Isaacs2018-12-031-3/+6
| | | | | | | Parsing -l options requires device_node to be set. It is used in pir_map() to map Linux CPU to proc/core/thread. Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
* main: Ignore nodes that do not have class namesAmitay Isaacs2018-11-161-1/+6
| | | | | | | | | It's possible that pdbg doesn't have hw units defined for all the nodes in the device tree. So if we encounter a node without class name ignore that node while matching path. Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* main: Convert register functions to path based targetingAmitay Isaacs2018-11-161-60/+95
| | | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* main: Convert getscom/putscom to use path based targetingAmitay Isaacs2018-11-161-18/+77
| | | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* main: Convert getcfam/putcfam to use path based targetingAmitay Isaacs2018-11-161-19/+29
| | | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* main: Update probe output to display device namesAmitay Isaacs2018-11-161-18/+9
| | | | | | | | With capability of selecting any target in the device tree, probe output should display all the nodes with their device tree names. Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* main: Do not use argv[0] for prognameAmitay Isaacs2018-11-161-4/+4
| | | | | | | | | When pdbg is built without "--disable-shared" option, libtool creates pdbg as a wrapper around lt-pdbg binary. This causes the tests to fail which try to match the output containing argv[0]. Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* main: Fix probe() to print targets correctlyAmitay Isaacs2018-11-161-11/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* main: Switch to path based target selectionAmitay Isaacs2018-11-161-72/+8
| | | | | | | Drop the old target selection code. Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* main: Convert -p/-c/-t/-a/-l to path based targetsAmitay Isaacs2018-11-161-21/+53
| | | | | | | | To maintain the compatibility with the old selection where -p selected processor, add fsi and pib targets with matching index. Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* main: Add explicit probing of selected targetsAmitay Isaacs2018-11-161-0/+6
| | | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* main: Add an option for path based targettingAmitay Isaacs2018-11-161-1/+49
| | | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* path: Add device tree path based targetingAmitay Isaacs2018-11-162-0/+435
| | | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* util: Move parse_list() into a separate fileAmitay Isaacs2018-11-163-73/+130
| | | | | | | ... and document the function. Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* main: Convert target_selection() to return a booleanAmitay Isaacs2018-11-161-9/+9
| | | | | Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
* device.c: Fix pdbg_target_addressAlistair Popple2018-11-091-1/+9
| | | | | | | | | | | | | | | | Commit 936dbdcedb27 ("libpdbg: Rework target addressing") introduced a bug leading to the following assertion failing: pdbg: libpdbg/device.c:634: pdbg_target_address: Assertion `(pos + n) <= p->len' failed. When this function was reworked the index parameter was dropped as every caller set index == 0. Removal should have also resulted in the local pos variable being removed. Instead it was set as if index == 1 resulting in the above violation. Fix the bug and add a test to check pdbg_target_address(). Signed-off-by: Alistair Popple <alistair@popple.id.au>
* libpdbg: Remove device.hAlistair Popple2018-11-091-1/+0
| | | | | Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Amitay Isaacs <amitay@ozlabs.org>
* libpdbg: Make dt_root privateAlistair Popple2018-11-091-1/+1
| | | | | Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Amitay Isaacs <amitay@ozlabs.org>
* libpdbg: Rename property functionsAlistair Popple2018-11-091-1/+1
| | | | | | | | | | Some of the functions dealing with target properties have somewhat inconsistent naming. This patch renames them and adds #defines for backwards compatibility for external projects. These will be removed once older projects have moved over to the new names. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Amitay Isaacs <amitay@ozlabs.org>
* pdbg/gdbserver: Make gdbserver optionalRashmica Gupta2018-11-021-0/+9
| | | | | Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com> Signed-off-by: Alistair Popple <alistair@popple.id.au>
* pdbg/gdbserver: Make ragel optionalAlistair Popple2018-11-021-0/+410
| | | | | | | | Add in the generated c file so if the build system doesn't have ragel gdbserver can still be built. Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com> Signed-off-by: Alistair Popple <alistair@popple.id.au>
* pdbg/gdbserver: Add in basic skeleton for a gdbserver on p8Rashmica Gupta2018-11-024-2/+710
| | | | | | | | I have changed a few bits here and there but this patch is largely authored by Alistair Popple. Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com> Signed-off-by: Alistair Popple <alistair@popple.id.au>
* stack: guess endian for stack frame walkingNicholas Piggin2018-11-011-10/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The stack unwinder currently does not do any endian conversion, which means it won't work correctly if the stack does not match pdbg endian. This patch attempts an endian flip if the stack looks wrong, and goes with that if it's an improvement. It also has some magic hackery to take OPAL->Linux into account. Unfortunately this is not a "clean" fully general solution, but works reasonably well in practice. This is the regs --backtrace output for a test that has a CPU hang in an OPAL call from Linux: STACK: SP NIA 0x0000000031c43cb0 0x000000003002b324 (big-endian) 0x0000000031c43d20 0x00000000300051e4 (big-endian) 0xc000200006283b60 0xc00000000008f1c8 (little-endian) 0xc000200006283c40 0xc00000000002af18 (little-endian) 0xc000200006283c70 0xc000000000114064 (little-endian) 0xc000200006283ce0 0xc0000000001144d0 (little-endian) 0xc000200006283e30 0xc00000000000b288 (little-endian) 0x00007fffe28d0cb0 We can see the stack unwind from OPAL to Linux to userspace (which does not get decoded -- yet). Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
* Fix build failure in target detectionJoel Stanley2018-10-261-1/+5
| | | | | | | | | | | | | | | CI is failing to build: src/options_arm.c:65:3: error: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Werror=unused-result] fscanf(cfam_id_file, "0x%" PRIx32, &cfam_id); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If we don't get the expected value in fscanf, display an error. The code already will do the correct thing and fall through to the unknown device case. Signed-off-by: Joel Stanley <joel@jms.id.au>
* regs: Allow user to opt in to backtraceAlistair Popple2018-10-152-6/+16
| | | | | | | | | | | The backtrace causes us to read memory which appears to have a high likelihood of causing a checkstop due to an invalid address. This adds a --backtrace flag to the regs command which enables the backtrace. By default it is off to protect the user. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Alistair Popple <alistair@popple.id.au>
* optcmd: Add OPTCMD_DEFINE_CMD_ONLY_FLAGSAlistair Popple2018-10-152-1/+48
| | | | | | | | Defines a new macro allowing commands that only taking flags and no positional arguments to be defined. Also adds a couple of test cases for the new macro. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Joel Stanley <joel@jms.id.au>
* src/options_arm.c: Add detection of host type for kernel backendAlistair Popple2018-09-121-1/+44
| | | | Signed-off-by: Alistair Popple <alistair@popple.id.au>
* pdbg: Rework backend detectionAlistair Popple2018-09-125-92/+31
| | | | | | | | | | | | | | | | If a user explicitly specifies a backend assume they know what they're doing and use it. If no backend is specified pick some sane defaults based on the detected platform. Fixes the following bug when specifying a backend is incorrectly determined to be invalid: Target p8 not possible kernel: No target is necessary i2c: No target is necessary fsi: p8 p9w p9r p9z Signed-off-by: Alistair Popple <alistair@popple.id.au>
* pdbg: Add in parser for uint16_tRashmica Gupta2018-09-122-0/+20
| | | | Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
* pdbg: Add getcr and putcr optionsRashmica Gupta2018-09-122-1/+27
| | | | | Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
* pdbg: Add getxer & putxer commandsRashmica Gupta2018-09-122-2/+26
| | | | | Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
* pdbg: Fix function call for putnia commandRashmica Gupta2018-09-121-1/+1
| | | | | Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
OpenPOWER on IntegriCloud