summaryrefslogtreecommitdiffstats
path: root/external
Commit message (Collapse)AuthorAgeFilesLines
* opal-prd : Add options to set OCC in overclock modeShilpasri G Bhat2019-04-241-1/+66
| | | | | | | | | This option sets the OCC in characterization mode and the changes the governor to performance. This patch adds two new sub-options to 'occ' sub-command Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
* external/mambo: also invoke readline for the non-autorun caseNicholas Piggin2019-04-171-0/+2
| | | | | Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* opal-prd: Fix memory leak in is-fsp-system checkVasant Hegde2019-04-171-1/+6
| | | | | Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* opal-prd: Check malloc return valueVasant Hegde2019-04-171-0/+4
| | | | | Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* README: Reflect openpower_mambo_defconfig name changeReza Arbab2019-04-091-1/+1
| | | | | | | The name of this op-build config has changed. Use the new name. Signed-off-by: Reza Arbab <arbab@linux.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* external/mambo: Mambo hack to add trace-imc nodes in the device-treeAnju T Sudhakar2019-03-281-0/+21
| | | | | | | | Update skiboot.tcl device tree to include trace-imc node to help test the code path in mambo. Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* external/mambo: Error out if kernel is too largeRussell Currey2019-03-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | If you're trying to boot a gigantic kernel in mambo (which you can reproduce by building a kernel with CONFIG_MODULES=n) you'll get misleading errors like: WARNING: 0: (0): [0:0]: Invalid/unsupported instr 0x00000000[INVALID] WARNING: 0: (0): PC(EA): 0x0000000030000010 PC(RA):0x0000000030000010 MSR: 0x9000000000000000 LR: 0x0000000000000000 WARNING: 0: (0): numInstructions = 0 WARNING: 1: (1): [0:0]: Invalid/unsupported instr 0x00000000[INVALID] WARNING: 1: (1): PC(EA): 0x0000000000000E40 PC(RA):0x0000000000000E40 MSR: 0x9000000000000000 LR: 0x0000000000000000 WARNING: 1: (1): numInstructions = 1 WARNING: 1: (1): Interrupt to 0x0000000000000E40 from 0x0000000000000E40 INFO: 1: (2): ** Execution stopped: Continuous Interrupt, Instruction caused exception, ** So add an error to skiboot.tcl to warn the user before this happens. Making PAYLOAD_ADDR further back is one way to do this but if there's a less gross way to generally work around this very niche problem, I can suggest that instead. Signed-off-by: Russell Currey <ruscur@russell.cc> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* external/mambo: Populate kernel-base-address in the DTRussell Currey2019-03-281-1/+4
| | | | | | | | | | | | | | skiboot.tcl defines PAYLOAD_ADDR as 0x20000000, which is the default in skiboot. This is also the default in skiboot unless kernel-base-address is set in the device tree. If you change PAYLOAD_ADDR to something else for mambo, skiboot won't see it because it doesn't set that DT property, so fix it so that it does. Signed-off-by: Russell Currey <ruscur@russell.cc> Acked-by: Michael Neuling <mikey@neuling.org> [stewart: fix up mambo hacks for STB] Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* Makefile: Paper over gard and pflash coverage issuesAndrew Jeffery2019-02-212-0/+8
| | | | | | | | | | | | | | | | | | | | | | | `make coverage-report` gave the following error: (cd external/pflash; lcov -q -c -d . -o pflash.info --rc lcov_branch_coverage=1; sed -i -e 's%external/pflash/libflash%libflash%; s%external/pflash/ccan%ccan%' pflash.info) (cd external/gard; lcov -q -c -d . -o gard.info --rc lcov_branch_coverage=1; sed -i -e 's%external/gard/libflash%libflash%; s%external/gard/ccan%ccan%' gard.info) geninfo: WARNING: no .gcda files found in . - skipping! geninfo: WARNING: no .gcda files found in . - skipping! lcov -q -c -d . -d ccan/check_type/test/ -d ccan/str/test/ -d ccan/str/test/ -d ccan/list/test/ -d ccan/list/test/ -d ccan/list/test/ -d ccan/list/test/ -d ccan/list/test/ -d ccan/build_assert/test/ -d ccan/short_types/test/ -d ccan/short_types/test/ -d ccan/array_size/test/ -d ccan/container_of/test/ -d ccan/endian/test/ -d libc/test/ -d libc/test/ -d libc/test/ -d libc/test/ -o skiboot.info --rc lcov_branch_coverage=1 lcov -q -r skiboot.info 'external/pflash/*' -o skiboot.info lcov -q -r skiboot.info 'external/gard/*' -o skiboot.info lcov -q -a skiboot.info -a external/pflash/pflash.info -o skiboot.info lcov: ERROR: no valid records found in tracefile external/pflash/pflash.info make: *** [/home/andrew/src/open-power/skiboot/Makefile.main:315: skiboot.info] Error 255 And similar again for the gard tool. We should really untangle the build strategy for tools in external/, but in the mean time paper over the problem of generating the lcov output at the top level by ensuring we have a means to generate the necessary gcda files for lcov to consume. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* gard: Fix warnings from gcc 8.2.0Andrew Jeffery2019-02-211-2/+3
| | | | | | | | | | | | | | | | gard.c:285:5: error: no previous prototype for ‘parse_path’ [-Werror=missing-prototypes] int parse_path(const char *str, struct entity_path *parsed) ^~~~~~~~~~ gard.c: In function ‘do_list’: gard.c:459:46: error: unused parameter ‘argc’ [-Werror=unused-parameter] static int do_list(struct gard_ctx *ctx, int argc, char **argv) ~~~~^~~~ gard.c:459:59: error: unused parameter ‘argv’ [-Werror=unused-parameter] static int do_list(struct gard_ctx *ctx, int argc, char **argv) ~~~~~~~^~~~ Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* pflash: Increase stack frame size warning thresholdAndrew Jeffery2019-02-211-0/+1
| | | | | | | | pflash is a userspace tool, stack space isn't really a constraint that we care about. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* ffspart, libflash: Fix stack size warningsAndrew Jeffery2019-02-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | libflash/file.c: In function 'file_erase': libflash/file.c:134:1: error: the frame size of 4128 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] } ^ and ffspart.c: In function ‘main’: ffspart.c:529:1: error: the frame size of 4864 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] } ^ In both cases, mark the local variables as static to avoid the stack. The static approach is valid for file.c as the buffer is always filled with `~0`. Given it's now going to be in .bss due to static we have to still perform the memset(), but racing memset()s in this fashion won't be harmful, just wasteful. For ffspart.c's main(), there are bigger problems if that needs to be re-entrant. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* pflash: Don't try update RO ToCAndrew Jeffery2019-02-181-8/+34
| | | | | | | | In the future it's likely the ToC will be marked as read-only. Don't error out by assuming its writable. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* devicetree: Add Makefile to build dtb binariesReza Arbab2019-02-182-0/+11
| | | | | | | Add a simple Makefile to build external/devicetree/*.dtb. Signed-off-by: Reza Arbab <arbab@linux.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* devicetree: Add p9-simics.dtsReza Arbab2019-02-181-0/+16
| | | | | | | Add a p9-based devicetree that's suitable for use with Simics. Signed-off-by: Reza Arbab <arbab@linux.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* devicetree: Move power9-phb4.dtsReza Arbab2019-02-181-0/+221
| | | | | | | | | Clean up the formatting of power9-phb4.dts and move it to external/devicetree/p9.dts. This sets us up to include it as the basis for other trees. Signed-off-by: Reza Arbab <arbab@linux.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* pflash: Support encoding/decoding ECC'd partitionsStewart Smith2019-02-143-10/+41
| | | | | | | | | | | | | | | | | With the new --ecc option, pflash can add/remove ECC when reading/writing flash partitions protected by ECC. This is *not* flawless with current PNORs out in the wild though, as they do not typically fill the whole partition with valid ECC data, so you have to know how big the valid ECC'd data is and specify the size manually. Note that for some partitions this is pratically impossible without knowing the details of the content of the partition. A future patch is likely to introduce an option to "stop reading data when ECC starts failing and assume everything is okay rather than error out" to support reading the "valid" data from existing PNOR images. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* external/mambo: allow CPU targeting for most debug utilsNicholas Piggin2019-02-121-97/+229
| | | | | | | | | | | | | | Debug util functions target CPU 0:0:0 by default Some can be overidden explicitly per invocation, and others can't at all. Even for those that can be overidden, it is a pain to type them out when you're debugging a particular thread. Provide a new 'target' function that allows the default CPU target to be changed. Wire that up that default to all other utils. Provide a new 'S' step command which only steps the target CPU. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* Add PVR_TYPE_P9PReza Arbab2019-02-101-0/+2
| | | | | | | Enable a new PVR to get us running on another p9 variant. Signed-off-by: Reza Arbab <arbab@linux.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* opal-prd: hservice: Enable hservice->wakeup() in BMCShilpasri G Bhat2018-12-112-4/+3
| | | | | | | | | | | | This patch enables HBRT to use HYP special wakeup register in openBMC which until now was only used in FSP based machines. This patch also adds a capability check for opal-prd so that HBRT can decide if the host special wakeup register can be used. Fixes: 49999302251b("opal-prd: Add support for runtime OCC reset in ZZ") Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* ffspart: Support flashing already ECC protected imagesStewart Smith2018-12-115-5/+17
| | | | | | | | | | | | | | We do this by assuming filenames with '.ecc' in them are already ECC protected. This solves a practical problem in transitioning op-build to use ffspart for pnor assembly rather than three perl scripts and a lot of XML. We also update the ffspart tests to take into account ECC requirements. Signed-off-by: Stewart Smith <stewart@linux.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* ffspart: Increase MAX_LINE to above PATH_MAXStewart Smith2018-12-111-1/+1
| | | | | | | | | Otherwise we saw failures in CI and the ~221 character paths Jankins likes to have. Signed-off-by: Stewart Smith <stewart@linux.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* ffspart: Add test for eraseblock sizeJoel Stanley2018-11-282-0/+47
| | | | | | | | | | | | | | | This test checks that the partitions are correctly laid out when the eraseblock size is greater than the start of the first partition. Currently ffspart fails to create a valid image in this case. There are two tests. The second is expected to fail but it is marked as passing for now. This test requires pflash to work. Currently we leave that as an exercise for the user. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* ffspart: Add toc testJoel Stanley2018-11-283-0/+20
| | | | | | | | | | This test specifies a toc in the configuration file. There are no tests or documentation for the toc syntax, so this exists to describe how specify a toc. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* pflash: Add --skip option for readingAdriana Kobylak2018-10-253-3/+29
| | | | | | | | | | | | Add a --skip=N option to pflash to skip N number of bytes when reading. This would allow users to print the VERSION partition without the STB header by specifying the --skip=4096 argument, and it's a more generic solution rather than making pflash depend on secure/trusted boot code. Signed-off-by: Adriana Kobylak <anoo@linux.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> [stewart: fix up pflash test] Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* external/mambo: Check for qtrace_utils.tcl before sourcing itMadhavan Srinivasan2018-10-231-1/+3
| | | | | | | | | | | Commit cb835dbdf875 ('external/mambo: conditionally source qtrace script') added qtrace_utils.tcl sourcing in skiboot.tcl without a check to see whether it exists in the current directory. This broke running mambo from another directory using skiboot.tcl. Patch adds a check. Fixes: cb835dbdf875 ('external/mambo: conditionally source qtrace script') Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* mambo: Merge PMEM_DISK and PMEM_VOLATILE codeMichael Neuling2018-09-201-46/+31
| | | | | | | | | | PMEM_VOLATILE and PMEM_DISK can't be used together and are basically copies of the same code. This merges the two and allows them used together. Same API is kept. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* xscom-utils: Rework getsramOliver O'Halloran2018-09-201-7/+47
| | | | | | | | | Allow specifying a file on the command line to read OCC SRAM data into. If no file is specified then we print it to stdout as text. This is a bit inconsistent, but it retains compatibility with the existing tool. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* xscom-utils/getsram: Make it work on P9Oliver O'Halloran2018-09-201-23/+58
| | | | | | | | | The XSCOM base address of the OCC control registers changed slightly between P8 and P9. Fix this up and add a bit of PVR checking so we look in the right place. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* xscom-utils/adu_scoms.py: run 2to3 over itStewart Smith2018-09-131-21/+21
| | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* don't fail fatally if qtrace can't be loadedStewart Smith2018-08-151-1/+3
| | | | | | | Helps with p9 public mambo on fedora at least Fixes: cb835dbdf8758b1fb0cae0ef2f93b324d1c4c96e Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* external/mambo: conditionally source qtrace scriptNicholas Piggin2018-08-132-7/+10
| | | | | | | | This automatically gives qtrace commads if the simulator provides the capability. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* opal-prd: Fix opal-prd crashVasant Hegde2018-08-011-3/+3
| | | | | | | | | | | | | | | | | | | | | Presently callback function from HBRT uses r11 to point to target function pointer. r12 is garbage. This works fine when we compile with "-no-pie" option (as we don't use r12 to calculate TOC). As per ABIv2 : "r12 : Function entry address at global entry point" With "-pie" compilation option, we have to set r12 to point to global function entry point. So that we can calculate TOC properly. Crash log without this patch: opal-prd[2864]: unhandled signal 11 at 0000000000029320 nip 00000 00102012830 lr 0000000102016890 code 1 Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> CC: Jeremy Kerr <jk@ozlabs.org> CC: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Acked-by: Jeremy Kerr <jk@ozlabs.org> Reviewed-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* Fixup pflash build for ast refactorStewart Smith2018-07-181-1/+4
| | | | | Fixes: 5b1bc2ffe791ae94361d86b2ae063ee543bf2df5 Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* pmem: volatile bindings for the poorly enabledBalbir singh2018-06-271-0/+26
| | | | | | | | | | | | PMEM_DISK bindings were added, but they rely on a rather recent mmap feature. This patch steals from those bindings to add volatile bindings. I've used these bindings with PMEM_VOLATILE to launch an instance with the publicly available systemsim-p9. The bindings are volatile and one should not expect any data to be saved/retrieved. Signed-off-by: Balbir singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* external/xscom-utils: Add python library for xscom accessMadhavan Srinivasan2018-06-181-0/+312
| | | | | | | | | | | | | | | | | | | | | | | | | | Patch adds a simple python library module for xscom access. It directly manipulate the '/access' file for scom read and write from debugfs 'scom' directory. Example on how to generate a getscom using this module: #!/usr/bin/python from adu_scoms import * getscom = GetSCom() getscom.parse_args() getscom.run_command() Sample output for above getscom.py: # ./getscom.py -l Chip ID | Rev | Chip type ---------|-------|----------- 00000008 | DD2.0 | P9 (Nimbus) processor 00000000 | DD2.0 | P9 (Nimbus) processor Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* ffspart: Don't require user to create blank partitions manuallySamuel Mendoza-Jonas2018-06-017-11/+64
| | | | | | | | | | | Add '--allow-empty' which allows the filename for a given partition to be blank. If set ffspart will set that part of the PNOR file 'blank' and set ECC bits if required. Without this option behaviour is unchanged and ffspart will return an error if it can not find the partition file. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* pflash: Use correct prefix when installingJoel Stanley2018-06-011-1/+1
| | | | | | | | | | | | pflash uses lowercase prefix when running make install in it's direcetory, but uppercase PREFIX when running it in shared. Use lowercase everywhere. With this the OpenBMC bitbake recipie can drop an out of tree patch it's been carrying for years. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* Add -Wno-stringop-truncation for GCC8Stewart Smith2018-05-291-1/+1
| | | | | | | This warning appears to not be particularly useful if you ever actually *want* to truncate a string. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* Add prepare_hbrt_update to hbrt interfacesDan Crowell2018-05-292-1/+15
| | | | | | | | | Add placeholder support for prepare_hbrt_update call into hostboot runtime (opal-prd) code. This interface is only called as part of a concurrent code update on a FSP based system. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* external/mambo: Add support for readline if it existsBalbir Singh2018-05-241-1/+14
| | | | | | | | | Add support for tclreadline package if it is present. This patch loads the package and uses it when the simulation stops for any reason. Signed-off-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* opal-prd: Do not error out on first failure for soft/hard offline.Mahesh Salgaonkar2018-05-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The memory errors (CEs and UEs) that are detected as part of background memory scrubbing are reported by PRD asynchronously to opal-prd along with affected memory ranges. hservice_memory_error() converts these ranges into page granularity before hooking up them to soft/hard offline-ing infrastructure. But the current implementation of hservice_memory_error() does not hookup all the pages to soft/hard offline-ing if any of the page offline action fails. e.g hard offline can fail for: - Pages that are not part of buddy managed pool. - Pages that are reserved by kernel using memblock_reserved() - Pages that are in use by kernel. But for the pages that are in use by user space application, the hard offline marks the page as hwpoison, sends SIGBUS signal to kill the affected application as recovery action and returns success. Hence, It is possible that some of the pages in that memory range are in use by application or free. By stopping on first error we loose the opportunity to hwpoison the subsequent pages which may be free or in use by application. This patch fixes this issue. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* mambo: Enable XER CA32 and OV32 bits on P9Anton Blanchard2018-05-091-1/+1
| | | | | | | | POWER9 adds 32 bit carry and overflow bits to the XER, but we need to set the relevant CTRL1 bit to enable them. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* external/mambo: simplify implementation of diBalbir singh2018-05-021-9/+3
| | | | | | | | | | We've got a great disassembly function built-in, reuse that to implement di (as in xmon). Improves 1bcd6d84: (external/mambo: Add di command to decode instructions) Signed-off-by: Balbir singh <bsingharora@gmail.com> Acked-By: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* mambo: Add persistent memory disk supportMichael Neuling2018-04-291-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support to for mapping disks images using persistent memory. Disks can be added by setting this ENV variable: PMEM_DISK="/mydisks/disk1.img,/mydisks/disk2.img" These will show up in Linux as /dev/pmem0 and /dev/pmem1. This uses a new feature in mambo "mysim memory mmap .." which is only available since mambo commit 0131f0fc08 (from 24/4/2018). This also needs the of_pmem.c driver in Linux which is only available since v4.17. It works with powernv_defconfig + CONFIG_OF_PMEM. ie --- a/arch/powerpc/configs/powernv_defconfig +++ b/arch/powerpc/configs/powernv_defconfig @@ -238,6 +238,8 @@ CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_GENERIC=y CONFIG_VIRTIO_PCI=m CONFIG_VIRTIO_BALLOON=m +CONFIG_LIBNVDIMM=y +# CONFIG_ND_BLK is not set CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* external/mambo: Add di command to decode instructionsMichael Neuling2018-04-241-0/+11
| | | | | | | | | | | | | | | | By default you get 16 instructions but you can specify the number you want. ie systemsim % di 0x100 4 0x0000000000000100: Enc:0xA64BB17D : mtspr HSPRG1,r13 0x0000000000000104: Enc:0xA64AB07D : mfspr r13,HSPRG0 0x0000000000000108: Enc:0xF0092DF9 : std r9,0x9F0(r13) 0x000000000000010C: Enc:0xA6E2207D : mfspr r9,PPR Using di since it's what xmon uses. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* mambo/mambo_utils.tcl: Inject an MCE at a specified addressBalbir Singh2018-04-191-1/+15
| | | | | | | | | | | | | | | | | | | | | | Currently we don't support injecting an MCE on a specific address. This is useful for testing functionality like memcpy_mcsafe() (see https://patchwork.ozlabs.org/cover/893339/) The core of the functionality is a routine called inject_mce_ue_on_addr, which takes an addr argument and injects an MCE (load/store with UE) when the specified address is accessed by code. This functionality can easily be enhanced to cover instruction UE's as well. A sample use case to create an MCE on stack access would be set addr [mysim display gpr 1] inject_mce_ue_on_addr $addr This would cause an mce on any r1 or r1 based access Signed-off-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* external/mambo: improve helper for machine checksNicholas Piggin2018-04-191-9/+53
| | | | | | | | | | | | Improve workarounds for stop injection, because mambo often will trigger on 0x104/204 when injecting sreset/mces. This also adds a workaround to skip injecting on reservations to avoid infinite loops when doing inject_mce_step. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Acked-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* external: Add "lpc" toolBenjamin Herrenschmidt2018-04-192-0/+193
| | | | | | | | This is a little front-end to the lpc debugfs files to access the LPC bus from userspace on the host. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
* external/trace: fix makefileStewart Smith2018-04-181-1/+1
| | | | Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
OpenPOWER on IntegriCloud