summaryrefslogtreecommitdiffstats
path: root/external
Commit message (Collapse)AuthorAgeFilesLines
...
| * opal-prd: display explicit message on IBM Power systemsCédric Le Goater2015-12-031-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today, when run on an IBM Power systems, opal-prd complains in syslog with a set of messages similar to these : opal-prd: CTRL: Starting PRD daemon opal-prd: I2C: Found Chip: 00000000 engine 1 port 0 opal-prd: I2C: Found Chip: 00000010 engine 1 port 0 opal-prd: CTRL: Listening on control socket /run/opal-prd-control opal-prd: FW: Can't open PRD device /dev/opal-prd: No such file or directory opal-prd: FW: Error initialising PRD channel opal-prd: CTRL: stopping PRD daemon Which are difficult to interpret for a person not initiated to Power firmware. The patch below detects if the platform has support for PRD by looking at the device tree property : /sys/firmware/devicetree/base/ibm,opal/diagnostics/compatible and stops opal-prd early in the main routine with an explicit message for the user. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
| * external/pflash: Add (C) headerCyril Bur2015-12-031-0/+16
| | | | | | | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | pflash: Add an install targetJoel Stanley2015-12-011-0/+3
| | | | | | | | | | Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | pflash: Don't remove libflash/test/ bins in make cleanStewart Smith2015-11-271-1/+1
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | common/arch_flash_arm.c: Add missing includeStewart Smith2015-11-261-0/+1
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/pflash: Add script to build all backendsJoel Stanley2015-11-261-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | We need to test all the backends when eg. making changes to libflash, to ensure that something hasn't gone wrong. To encourage developers to do this, add a script to simplify it. Patches welcome to detect the specific cross compilers binaries shipped on your favourite distro. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/pflash: Add quiet rules and fix raceJoel Stanley2015-11-263-22/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding quiet rules to make our output a bit cleaner. Building now looks like this: $ make LN libflash LN common LN ccan CC pflash.o CC version.o LD common-arch_flash.o CC pflash You can see the full build ouput by doing a "make V=1". By doing this, we build fractionally faster, exposing arace condition between running the make_version.sh script and the link existing for it. As we run it when creating the variable, there is no way to ensure it exists first. Solved this by not creating the symlink and simply running make_version.sh from the root. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | pflash: Remove ast.hJoel Stanley2015-11-262-67/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | pflash contained a copy of the include/ast.h header. It had grown stale, so remove in and link in the common header. Note that it's hard to test that we haven't broken tools in the external/ directory these days; when making changes we need to test with amd64, ppc64, ppc64le and arm to ensure that everything can build! Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Update gitignore for gardStewart Smith2015-11-181-1/+8
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Add gitignore for pflashStewart Smith2015-11-181-0/+5
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | pflash: Fix file descriptor leakStewart Smith2015-11-171-0/+1
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Make gard and pflash build arch specific files in pwdStewart Smith2015-11-163-11/+17
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/gard: Clean after check to avoid leaving bad .o files aroundCyril Bur2015-11-161-2/+6
| | | | | | | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/gard: Add make distCyril Bur2015-11-162-0/+21
| | | | | | | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/gard: Make use of the common/ flash reading codeCyril Bur2015-11-161-153/+11
| | | | | | | | | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/gard: Add version informationCyril Bur2015-11-165-6/+37
| | | | | | | | | | | | | | | | Method for recording version is identical to pflash. Uses the current skiboot version and any current repository state. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/tests: Add ability to strip version string from resultCyril Bur2015-11-161-0/+6
| | | | | | | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/gard: Update gard building to use external/common filesCyril Bur2015-11-162-26/+44
| | | | | | | | | | | | | | | | This will enable building the gard tool on any arch which may prove useful for debug parsing of gard records in a binary file format Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/pflash: Fixup LDFLAGSCyril Bur2015-11-162-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to be able to compile for something that isn't the default for the compiler one should be able to use CFLAGS and LDFLAGS on commandline. ie build a 64bit binary with a compiler which builds by default 32bit or the opposite endian for which the compiler is configured. Currently the common/rules.mk ignores LDFLAGS when it shouldn't and pflash sets LDFLAGS for something which only applies to the final link. This patch addresses both those issues. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/common: Don't just expect `sh` to be in $PATHCyril Bur2015-11-161-1/+1
| | | | | | | | | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/gard: Fix memory leakCyril Bur2015-11-161-6/+13
| | | | | | | | | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/common: Don't leak temporary filenameCyril Bur2015-11-161-1/+2
| | | | | | | | | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | opal-prd: add systemd scriptsCédric Le Goater2015-11-092-0/+18
| | | | | | | | | | | | | | | | | | These systemd scripts start the opal-prd daemon and we have been duplicating these in a few distributions already. skiboot seems like a good place to keep a common reference. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Free bl_prot_range on file_exit_close()Samuel Mendoza-Jonas2015-11-091-1/+0
| | | | | | | | | | | | Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Reviewed-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Merge branch 'stable'Stewart Smith2015-10-301-0/+1
|\|
| * Fix boot_test.sh script for chmod +x pflash if copyingStewart Smith2015-10-301-0/+1
| | | | | | | | | | | | | | On some BMC firmware revisions, we need to copy over a pflash binary and we need to ensure that the executable bit is set. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | gard: print error message when we can't open a flash deviceJeremy Kerr2015-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If I run gard on system flash as a non-root user, I get: $ ./external/gard/gard list $ echo $? 1 which isn't too helpful. This change adds a basic error message to the open() failure. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | opal-prd: Display messages at startup and shutdownJoel Stanley2015-10-231-0/+5
| | | | | | | | | | | | | | | | | | | | On a system the PRD daemon was starting without a PNOR path, and it was hard to diagnose what had happened. These messages should help in that case. Signed-off-by: Joel Stanley <joel@jms.id.au> Acked-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | mambo: Auto start the simulator using SKIBOOT_AUTORUNMichael Neuling2015-10-211-0/+4
| | | | | | | | | | | | | | | | Automatically start the simulator using the SKIBOOT_AUTORUN environment variable. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | mambo: Add SKIBOOT_SIMCONF for additional configurationMichael Neuling2015-10-211-0/+4
| | | | | | | | | | | | | | | | Add ability to add additional configuration information using the SKIBOOT_SIMCONF environment variable. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | mambo: Advertise the sim supports 256M and 1TB segments in device treeMichael Neuling2015-10-211-0/+2
| | | | | | | | | | | | | | | | Advertise the sim supports 256M and 1TB segments in device tree. If we don't have this, Linux will default to 256MB segments. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | mambo: Add ability to load initrdMichael Neuling2015-10-211-0/+11
| | | | | | | | | | | | | | Add ability to load initrd using SKIBOOT_INITRD environment variable. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | mambo: Make PVR change only on p8Michael Neuling2015-10-211-1/+5
| | | | | | | | | | | | | | Only make PVR change when running on the POWER8 simulator. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | mambo: Use SIMHOST to determine the simulator typeMichael Neuling2015-10-211-2/+4
| | | | | | | | | | | | | | | | | | Use SIMHOST to determine the simulator type. This means we can support past and future sims other than P8. Signed-off-by: Michael Neuling <mikey@neuling.org> [stewart@linux.vnet.ibm.com: support environments without SIMHOST] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | mambo: Use alternate skiboot.lid with SKIBOOTMichael Neuling2015-10-211-0/+3
| | | | | | | | | | | | | | | | Make it possible to use an alternate skiboot.lid by setting the SKIBOOT environment variable. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | opal-prd: Improve error-checking in hservices_initJeremy Kerr2015-10-141-3/+16
| | | | | | | | | | | | | | | | | | | | | | Currently, a signature failure for the HBRT image prints a log message, but doesn't actually abort the initialisation. This change adds a failure path for this, as well as hbrt_init() returning NULL. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/gard/tests: Add tests for the gard toolCyril Bur2015-10-1415-1/+90
| | | | | | | | | | | | | | Simple tests for the gard tool that can be expanded on over time Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/test: Create an external test harnessCyril Bur2015-10-141-0/+95
| | | | | | | | | | | | | | | | | | | | Unlike skiboot where individual functions can be tested, the external/ binaries can sometimes only be fully tested by observing the output of the full binary as such this little framework designed to grab stdout and stderr and compare to provided output files should prove useful. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | external/pflash: Add (C) headerCyril Bur2015-10-141-0/+16
|/ | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add ability to copy pflash binary to BMC to boot_tests.shStewart Smith2015-10-011-3/+9
| | | | | | | | | Some BMC firmware versions don't ship pflash. Support PFLASH_TO_COPY environment variable to a pflash binary built for the BMC that will be copied over and used to pflash the partition or whole pnor. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* opal-prd: Increase IPMI timeout to a slightly better valueStewart Smith2015-09-301-1/+1
| | | | | | | | | | | We've seen various IPMI timeouts during testing (mainly hit by petitboot) but it seems that 5 seconds is the magic value that matches everywhere. This echoes what we use in petitboot, so at least being consistent with ourselves is a good idea. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/gard: Fix Coverity defect 107465Cyril Bur2015-09-081-1/+1
| | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/gard: Fix Coverity defect 107466Cyril Bur2015-09-081-1/+1
| | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/gard: Fix Coverity defect 107467Cyril Bur2015-09-081-1/+2
| | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/opal-prd: move hservices_init after the ipmi and pnor initNeelesh Gupta2015-09-081-4/+4
| | | | | | | | | | The IPMI device and pnor should be ready with the devices present and module loaded before the host service interfaces. So, reorder the initialization code in the daemon. Suggested-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/gard: Recover the entire gard partitionCyril Bur2015-09-071-12/+2
| | | | | | | | | | | | | | | If the gard tool detects that the GUARD partition has been corrupted it has logic to attempt to recover the GUARD partition in a best effort attempt to leave the GUARD partition in a state that will allow the machine to boot. It has come to light that Hostboot is more sensitive to what must be in the GUARD partition in order to be able to bring a machine up, as such, the gard tool will now fill the entire partition with all 1's and ECC bytes, not simply the first record as it currently does Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/gard: Update record clearing to match Hostboots expectationsCyril Bur2015-09-071-46/+59
| | | | | | | | | | | | | | | When the gard tool is told to clear all the gard records it actually erases the entire flash and inserts ECC bytes only for the size of the first gard record. The current method appears to have stopped working, Hostboot expects the entire partition to have ECC bytes throughout the entire partition, and as such the current method causes Hostboot to error and be unable to bring up machines. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/opal-prd: Add 'run' option to execute HBRT commandsVaidyanathan Srinivasan2015-09-073-1/+135
| | | | | | | | | | | | | | | | | | | | opal-prd client to accept run command and pass it as-is to hbrt. Example: opal-prd -d run test hbrt -t 1 -c "good cmd" argv[0] = test argv[1] = hbrt argv[2] = -t argv[3] = 1 argv[4] = -c argv[5] = good cmd Above argc/argv passed to hbrt->run_command() and result out string sent to the console. Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Reviewed-by: Patrick Williams <iawillia@us.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/opal-prd: Support manufacturing command HTMGT and attribute overrideNeelesh Gupta2015-09-073-48/+345
| | | | | | | | | | | | | | | | | | | | | | The patch adds the support to invoke manufacturing htmgt pass through and attribute override command in HBRT. The command format would look something as below: # opal-prd --expert-mode htmgt-passthru 0x10 0x11 0x12 It will pass the arguments after 'passthru' in an array as input data to hbrt->htmgt_pass_thru(). The HBRT will return the output data to a buffer provided by 'opal-prd' of maximum length 4096 bytes. # opal-prd override <file_name_of_binary_blob> It will read the contents of the binary blob into a buffer and invoke hbrt->apply_attr_override() with the buffer and size as the input to the interface. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Reviewed-by: Patrick Williams <iawillia@us.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* build pflash in travis-ciStewart Smith2015-09-011-1/+1
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud