summaryrefslogtreecommitdiffstats
path: root/external/xscom-utils
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* 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>
* Fix xscom-utils distclean targetFrédéric Bonnard2018-01-301-1/+1
| | | | | | | | | In Debian/Ubuntu, the packaging system likes to have a full cleanup that restores the tree back to original one, so add some files to the distclean target. Signed-off-by: Frédéric Bonnard <frediz@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add man pages for xscom-utils and pflashFrédéric Bonnard2018-01-304-0/+67
| | | | | | | | For the need of Debian/Ubuntu packaging, I infered some initial man pages from their help output. Signed-off-by: Frédéric Bonnard <frediz@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/xscom-utils: Add --list-bitsOliver O'Halloran2017-08-214-9/+50
| | | | | | | | | | | When using getscom/putscom it's helpful to know what bits are set in the register. This patch adds an option to print out which bits are set along with the value that was read/written to the register. Note that this output indicates which bits are set using the IBM bit ordering since that's what the XSCOM documentation uses. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external: Update xscom utils for type 1 indirect accessesMichael Neuling2017-03-243-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | Update get/putscom utils to support type 1 indirect access. Currently we do some (ugly) bit mangling so that we can fit a 64 bit scom address into the debugfs interface. The current code only shifts down the top bit (indirect bit). This patch changes it to shift down the whole top nibble so that the form of the indirection is also shifted. Also currently putscom always reads back the value. This causes a problem for form 1 which can only be written. This patch marks the form 1 as not readable and hence doesn't attempt the read back. The kernel debugfs scom driver doesn't do the bit mangling correctly. So for form1 to work correctly, the kernel debugfs scom driver needs updating. Existing scoms are forwards and backwards compatible with the kernel. (FWIW the kernel PRD scom interface doesn't need to be updated as it passes the whole 64 bit scom address without any bit mangling) Signed-off-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* getscom: Add chip info for P9.Pridhiviraj Paidipeddi2017-03-161-0/+6
| | | | | | | | Took the cfam values from hw/xscom. Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* getscom/getsram/putscom: Parse chip-id as hexAnton Blanchard2016-09-063-3/+3
| | | | | | | | | | | | | | | | | We print the chip-id in hex (without a leading 0x), but we fail to parse that same value correctly in getscom/getsram/putscom: # getscom -l ... 80000000 | DD2.0 | Centaur memory buffer # getscom -c 80000000 201140a Error -19 reading XSCOM Fix this by assuming base 16 when parsing chip-id. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* getscom/putscom: always print full 16 digitsStewart Smith2016-06-242-2/+2
| | | | | Suggested-by: Daniel M Crowell <dcrowell@us.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external: add a gitignore to xscom-utilsCédric Le Goater2016-05-111-0/+3
| | | | | Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external: improve xscom commands MakefileCédric Le Goater2016-04-014-13/+53
| | | | | | | | | The current Makefile is a bit rustic compared to other skiboot tools. This patch adds a proper install target and a new versioning target. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external: fix exit code in xscom commandsCédric Le Goater2016-04-013-15/+15
| | | | | | | | | commit 618a201ebf33 ("external: simplify help output in xscom commands") broke the exit code in some paths. Fixes: 618a201ebf33 Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external: use skiboot make_version scriptCédric Le Goater2016-03-314-17/+6
| | | | | | | | | | Let's version like skiboot and other external tools do. There is no need to generate a version.c file. Defining VERSION on the compile commande line is enough. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> [stewart@linux.vnet.ibm.com: fix makefile CFLAGS so can be overwritten] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external: simplify help output in xscom commandsCédric Le Goater2016-03-313-45/+19
| | | | | | | | This kills a few booleans used to output version and help. Suggested-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external: add copyright to xscom filesCédric Le Goater2016-03-314-0/+64
| | | | | Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external: Add a getsram commandCédric Le Goater2016-03-314-2/+261
| | | | | | | | | The getsram command reads the OCC SRAM. This is useful for debug. The code is totally inspired from the meltbox tool. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* getscom: Add Naples chip supportCédric Le Goater2016-03-091-0/+3
| | | | | Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external: Add xscom utilitiesBenjamin Herrenschmidt2014-11-135-0/+455
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
OpenPOWER on IntegriCloud