aboutsummaryrefslogtreecommitdiff
path: root/external
AgeCommit message (Collapse)AuthorFilesLines
2017-05-19mambo: Add skiboot/linux symbol lookupOliver O'Halloran2-0/+50
Adds the skisym and linsym commands which can be used to find the address of a Linux or Skiboot symbol. To function this requires the user to provide the SKIBOOT_MAP and VMLINUX_MAP environmental variables which indicate which skiboot.map and System.map files should be used. Examples: Look up a symbol address: systemsim % skisym .load_and_boot_kernel 0x0000000030013a08 Set a breakpoint there: systemsim % b [skisym .load_and_boot_kernel] breakpoint set at [0:0]: 0x0000000030013a08 (0x0000000030013A08) Enc:0x7D800026 : mfcr r12 Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-03mambo: Fix reserved-ranges nodeOliver O'Halloran1-0/+4
The DT bindings for the /reserved-memory node requires that it: a) Has #size-cells equal to the root b) Has #address-cells equal to the root c) Has an empty ranges property (i.e directly maps on the root) Currently we do not assign any of these when generating the Mambo device tree which causes the booted kernel to ignore the reservations in the /reserved-memory node. Fixes: b7b5302af737 Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-01external/mambo: add helper for machine checksNicholas Piggin1-3/+187
Add helpers to construct machine checks with registers set up properly. exc_mce raises a machine check exception that can be stepped into. This is useful for testing the machine check handler. Also add a similar exc_sreset for system reset. inject_mce does the same but runs immediately and stops when the instruction reaches the NIP (which can get tangled up if machine check re-enters this code). This is useful for testing robustness to interleaving machine checks. inject_mce_step allows injecting MCEs between each instruction and stepping over them. inject_mce_step_ri does the same but only when MSR has RI set. This can be useful to test correctness of low level code. For example, testing system call vs machine check: systemsim % b 0xC000000000004c00 systemsim % c 0xC000000000004C00 (0x0000000000004C00) Enc:0xA64BB17D : mtspr HSPRG1,r13 systemsim % inject_mce_step_ri 100 0xC000000000004C04 (0x0000000000004C04) Enc:0xA64AB07D : mfspr r13,HSPRG0 0xC000000000004C08 (0x0000000000004C08) Enc:0x80002DF9 : std r9,0x80(r13) 0xC000000000004C0C (0x0000000000004C0C) Enc:0xA6E2207D : mfspr r9,PPR 0xC000000000004C10 (0x0000000000004C10) Enc:0x7813427C : mr r2,r2 0xC000000000004C14 (0x0000000000004C14) Enc:0x88004DF9 : std r10,0x88(r13) 0xC000000000004C18 (0x0000000000004C18) Enc:0xD8002DF9 : std r9,0xD8(r13) 0xC000000000004C1C (0x0000000000004C1C) Enc:0x2600207D : mfcr r9 0xC000000000004C20 (0x0000000000004C20) Enc:0xE8074D89 : lbz r10,0x7E8(r13) 0xC000000000004C24 (0x0000000000004C24) Enc:0x00000A2C : cmpwi cr0,r10,0 0xC000000000004C28 (0x0000000000004C28) Enc:0xA80F8240 : bne cr0,$+0xFA8 (bc 0x4,0x2,0xFA8,0,0) 0xC000000000004C2C (0x0000000000004C2C) Enc:0xA64AB17D : mfspr r13,HSPRG1 0xC000000000004C30 (0x0000000000004C30) Enc:0xBE1E202C : cmpdi cr0,r0,7870 0xC000000000004C34 (0x0000000000004C34) Enc:0x2000C241 : beq cr0,$+0x20 (bc 0xE,0x2,0x20,0,0) 0xC000000000004C38 (0x0000000000004C38) Enc:0x786BA97D : mr r9,r13 0xC000000000004C3C (0x0000000000004C3C) Enc:0xA64AB07D : mfspr r13,HSPRG0 0xC000000000004C40 (0x0000000000004C40) Enc:0xA6027A7D : mfspr r11,SRR0 0xC000000000004C44 (0x0000000000004C44) Enc:0xA6029B7D : mfspr r12,SRR1 0xC000000000004C48 (0x0000000000004C48) Enc:0x02004039 : li r10,2 0xC000000000004C4C (0x0000000000004C4C) Enc:0x6401417D : mtmsrd r10,1 0xC000000000004C50 (0x0000000000004C50) Enc:0xB0620048 : b $+0x62B0 236380163: (212143620): Disabling lock debugging due to kernel taint 0xC000000000004C50 (0x0000000000004C50) Enc:0xB0620048 : b $+0x62B0 0xC00000000000AF00 (0x000000000000AF00) Enc:0xE1F78A79 : rldicl. r10,r12,30,63,63 (0x0000000000000001) 0xC00000000000AF00 (0x000000000000AF00) Enc:0xE1F78A79 : rldicl. r10,r12,30,63,63 (0x0000000000000001) [...] Every instruction after 0xC000000000004C4C is getting an interleaving MCE, and continuing after this injection the kernel prints a lot of MCE reports and continues working properly. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Tested-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-04-07external/pflash: Use blocklevel_smart_erase()Cyril Bur1-27/+4
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-04-07external/gard: Use blocklevel_smart_erase()Cyril Bur1-1/+1
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-04-07mambo: Allow setting the Linux command line from the environmentMichael Ellerman1-1/+5
For automated testing it's helpful to be able to set the Linux command line via an environment variable. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-04-07mambo: Add util function for breaking on console outputMichael Ellerman1-0/+14
Mambo can execute a trigger when certain output appears on the console. You can run any tcl function when the trigger fires, but the simplest thing to use it for is stopping the simulation. Add a helper to do that, break_on_console(), and a matching function to clear the trigger, clear_console_break(). Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24opal-prd: Direct systemd to always restart opal-prdAnanth N Mavinakayanahalli1-0/+1
Always restart the opal-prd daemon, irrespective of why it stopped. Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24external: Update xscom utils for type 1 indirect accessesMichael Neuling3-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>
2017-03-24external/ffspart: Add testsCyril Bur66-0/+440
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24external/tests: Add a data directory for testsCyril Bur1-4/+7
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24external/ffspart: Simple C program to be able to make an FFS partitionCyril Bur4-0/+527
A typical input file to generate something that current op-build would create: HBI,0x00010000,0x05a0000,EV,./bins/HBI.bin MVPD,0x05b0000,0x0090000,EF,./bins/MVPD.bin CVPD,0x0640000,0x0048000,EF,./bins/CVPD.bin DJVPD,0x688000,0x0048000,EF,./bins/DJVPD.bin HBD,0x006d0000,0x0060000,E,./bins/HBD.bin SBEC,0x0730000,0x0090000,EI,./bins/SBEC.bin SBE,0x007c0000,0x0048000,EI,./bins/SBE.bin ATTR_TMP,0x808000,0x8000,F,./bins/ATTR_TMP.bin ATTR_PERM,0x810000,0x8000,EF,./bins/ATTR_PERM.bin WINK,0x00818000,0x0120000,EV,./bins/WINK.bin GUARD,0x00938000,0x005000,EPF,./bins/GUARD.bin HBEL,0x0093d000,0x0024000,EF,./bins/HBEL.bin PAYLOAD,0x961000,0x100000,,./bins/skiboot.lid BOOTKERNEL,0xa61000,0xf00000,,./bins/petitboot.zImage NVRAM,0x01961000,0x90000,EPF,./bins/NVRAM.bin HBRT,0x019f1000,0x360000,EV,./bins/HBRT.bin OCC,0x001d51000,0x120000,E,./bins/OCC.bin FIRDATA,0x1e71000,0x3000,EF,./bins/FIRDATA.bin CAPP,0x001e74000,0x24000,E,./bins/CAPP.bin HBB,0x0001f67000,0x90000,EV,./bins/HBB.bin VERSION,0x1ff7000,0x1000,,./bins/VERSION2.bin Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-24mambo: No need to explicitly look for env(SKIBOOT)Michael Ellerman1-3/+0
We don't need to explicitly check for the SKIBOOT environment variable, the existing code that does: mconfig boot_image SKIBOOT ../../skiboot.lid Will do that for us, using the content of SKIBOOT if it's set, otherwise falling back to ../../skiboot.lid. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16getscom: Add chip info for P9.Pridhiviraj Paidipeddi1-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>
2017-02-23external/gard: Fix make dist targetCyril Bur5-13/+21
Several problems: Firstly, it could never have worked, it was using the wrong variable. Secondly, if it was using GARD_VERSION it produced a broken tarball that still looked into the skiboot source for files despite them having been copied into the tarball. Lastly (and not really a make dist issue) the current way of symlinking make_version.sh was racey. Get around the issue by refering to it in its actual location (if we know it will be there) or by looking at .version if building from tarball. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-02-22external/mambo: add device tree fixup for POWER9 stop levelsNicholas Piggin1-0/+7
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-02-15remove 'update mode for partitions' from TODO listWerner Fischer1-2/+0
Remove 'Support pnor "update" mode which only update selected partitions' from TODO list as pflash supports --partition=part_name already Signed-off-by: Werner Fischer <wfischer@thomas-krenn.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-01-05generate-fwts-olog: add support for parsing prerror()Stewart Smith1-6/+10
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-23mambo_utils: add ascii output to hexdumpOliver O'Halloran1-1/+12
Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-23mambo_utils: add p_str <addr> [limit]Oliver O'Halloran1-0/+19
Adds a helper function to mambo_utils.tcl that prints the NUL terminated string at <addr>, and optionally limits the output to a fixed number of characters. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-23mambo_utils: make p return a valueOliver O'Halloran1-5/+2
Currently the "p" command uses puts to output the result to the user. This works for interactive usage, but it makes it impossible for use inside scripts. This patch changes the function to return the value rather than print it. The mambo interpreter prints the result of an expression so this should not cause any user visible changes. With this change you can use p in expressions: x [p r3] 4 Which will display the word at the address in r3. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-21arch_flash_arm: Don't assume mtd labels are shortJoel Stanley1-1/+1
pflash relies on arch_flash_arm parsing /proc/mtd to discover the pnor partition. It helpfully uses strcasestr so it can handle the string changing, which is what has happened as we moved to upstream compliant mtd device tree bindings. We currently have a string like this: dev: size erasesize name mtd0: 00060000 00001000 "u-boot" mtd1: 00020000 00001000 "u-boot-env" mtd2: 00280000 00001000 "kernel" mtd3: 001c0000 00001000 "initramfs" mtd4: 01740000 00001000 "rofs" mtd5: 00400000 00001000 "rwfs" mtd6: 02000000 00001000 "1e620000.flash-controller:flash@1" mtd7: 08000000 00001000 "1e630000.flash-controller:pnor@0" Unfortunately arch_flash_arm assumes the string will be at most 50 characters. That's right before the label we're looking for starts so we ignore that line and keep searching. Fix it by allowing for a 255 character line. Fixes: 48ab7ce09504 (external/pflash: Add --mtd) Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-14external/fwts: Add 'last-tag' to FWTS olog outputJack Miller1-5/+12
This isn't so useful at the moment, but this will make cleaning out crufty old error definitions much easier. Signed-off-by: Jack Miller <jack@codezen.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-14external/fwts: Add FWTS olog merge scriptJack Miller1-0/+115
A script to merge olog error definitions from multiple skiboot versions into a single olog JSON file. Will prompt when conflicting patterns are found to update the pattern, or add both. Signed-off-by: Jack Miller <jack@codezen.org> [stewart@linux.vnet.ibm.com: add copyright notice] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-13mambo: fake NVRAM supportChris Smart1-1/+21
This re-configures the Mambo platform to use the new fake NVRAM introduced by Jack Miller <jack@codezen.org> in commit: mambo: Add Fake NVRAM driver An existing NVRAM file can be loaded by pointing SKIBOOT_NVRAM environment variable to the file when running Mambo. If no NVRAM file is provided, the default is set to 256Kb and will be formatted automatically by Skiboot on boot, e.g.: [ 0.000975501,5 ] NVRAM: Size is 256 KB [ 0.002292860,3 ] NVRAM: Partition at offset 0x0 has incorrect 0 length [ 0.002298792,3 ] NVRAM: Re-initializing (size: 0x00040000) This has been tested in Mambo, on bare metal Linux, as well as OpenPower BMC machines. Signed-off-by: Chris Smart <chris@distroguy.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-24external/mambo: add shortcut to print all GPRsOliver O'Halloran1-0/+4
The 'p' function added by mambo utils can be used to print registers (GPR or SPR) from a thread. Mambo supports printing all the GPRs in one go so this plumbs it into the 'p' function. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-11external/pflash: Perform the correct cleanupCyril Bur1-2/+2
If the -F flag is used then pflash uses a regular file as the flash. On cleanup pflash fails to tell arch_flash_close() if it had passed a filename to arch_flash_init() as such arch_flash_close() assumes that it needs to close the actual flash structure and not simply a file descriptor leading to a NULL dereference. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-08external/common: Add default erase chip implementationCyril Bur1-2/+18
Just blocklevel_erase() from zero to sizeof. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-08external/common: Teach ARM code to erase 'mtd chips'Cyril Bur1-2/+11
Currently the arch flash code for all architectures can only perform chip erases if there is a real flash driver attached. With increasing use of MTD on both host and BMC this code needs to know how to behave of the backend of blocklevel is MTD. This patch teaches the ARM specific code to pass an erase for the full size of the chip down the stack. This can be optimised into a chip erase within the kernel. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-08pflash: remove stray d in from info messageJoel Stanley1-1/+1
Fixes: 86640b032d79ff0 (pflash: Fix printf format warning) Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-07boot_test: fix typo in console messageStewart Smith1-2/+2
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-02pflash: Fail when file is larger than partitionJoel Stanley1-2/+8
Currently we warn the user and truncate the file by default. Instead abort as this is rarely the desired behaviour. You can still shoot yourself in the foot by passing --force. Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-02boot-tests: force BMC to boot from non-golden sideStewart Smith1-0/+2
Because IPMI raw commands copied out of internal bugzilla is the best source of things that need to go in test scripts. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-02gard: Fix printf warningJoel Stanley1-1/+2
With a modern GCC targetting ARM 32-bit: gard.c: In function 'main': gard.c:652:19: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}' [-Werror=format=] fprintf(stderr, "MTD device bigger than %i: size:%lu\n", Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-31opal-prd: only run on supported systemsRafael Fonseca1-0/+2
opal-prd is supposed to run only on ppc64(le) hosts with support for diagnostics. The presence of the following device-tree node will indicate a system that supports PRD: /sys/firmware/devicetree/base/ibm,opal/diagnostics Signed-off-by: Rafael Fonseca <rdossant@redhat.com> [stewart@linux.vnet.ibm.com: drop ppc64le arch req, DT is enough&we run on BE] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-28opal-prd: remove unused socket file.Rafael Fonseca2-10/+0
Signed-off-by: Rafael Fonseca <rdossant@redhat.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-25external/pflash: Make MTD accesses the defaultCyril Bur1-24/+22
Now that BMC and host kernel mtd drivers exist and have matured we should use them by default. This is especially important since we seem to be telling everyone to use pflash. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-25external/pflash: Catch incompatible combination of flagsCyril Bur1-0/+10
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-25external/common: Rename arch_flash_bmc() to arch_flash_access()Cyril Bur5-13/+31
Honestly the first name was terrible. Initially this was intended only to serve for BMC/ARM flash access, however, it should be more generic as it is in the external/common arch code it should play nice on all architectures. This change also paves the way to change the default flash access methods in pflash. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Acked-by: Joel Stanley <joel@jms.id.au> [stewart@linux.vnet.ibm.com: preserve Joel's ack] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-25external/common: arm: Don't error trying to wrprotect with MTD accessCyril Bur1-0/+3
If the access method to the flash is PNOR_MTD or BMC_MTD then the actual access is being done for us by the kernel. This means we don't need to worry about wrprotecting. The arch level shouldn't be returning an error, it should be fall though. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Acked-by: Joel Stanley <joel@jms.id.au> [stewart@linux.vnet.ibm.com: preserve Joel's ack] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-17mambo: Advertise available RADIX page sizesChris Smart1-2/+16
This adds a device tree entry which advertises additional support for 2M and 1G pages in a PAPR compliant manner. Without this, the kernel will default to only 4K and 64K page sizes. With this patch, 1G (0x40000000) pages for linear mapping will be used. This can be seen by when checking the output of "Mapping range" in the kernel log: # dmesg |grep "Mapping range" Mapping range 0x0 - 0x100000000 with 0x40000000 Without this patch, the kernel will use 64K (0x10000) instead: # dmesg |grep "Mapping range" Mapping range 0x0 - 0x100000000 with 0x10000 Signed-off-by: Chris Smart <chris@distroguy.com> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-17external/pflash: Remove unused filesCyril Bur2-372/+0
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-17external/pflash: Reduce variable scope as indicated by cppcheckCyril Bur1-4/+8
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-17external/pflash: Fix ccpcheck warnings in progress.cCyril Bur1-3/+3
Warnings in progress.c are not critical but warn about %d being used in printf format string when the parameter passed is unsigned. Trivial fixup which should silence the warnings. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-11v2 mambo: Add section for kernel command line boot argsChris Smart1-0/+4
Users can set kernel command line boot arguments for Mambo in a tcl script. This adds a place holder at the bottom of the skiboot.tcl script so that users know what format to use. Signed-off-by: Chris Smart <chris@distroguy.com> Acked-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-10Add software STB "ROM" implementation for MamboStewart Smith1-0/+28
Pass SKIBOOT_ENABLE_MAMBO_STB=1 as environment variable to skiboot.tcl and the tcl will enable the /ibm,secureboot node, enabling hash and signature "verification" for that mambo session. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-10external/boot_tests: remove lid from the BMC after flashingClaudio Carvalho1-2/+10
Usually, BMC systems doesn't have too much space for storage. This removes the lid from the BMC after the lid is flashed. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-10external/boot_tests: add the nobooting option -NClaudio Carvalho1-10/+21
This adds the -N option for BMC targets, which does not boot the firmware. The option helps in situations that we need to flash multiple partitions before booting the firmware. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-10external/boot_tests: add arbitrary lid option -FClaudio Carvalho2-3/+27
There are situations where we want to flash a lid that isn't neither BOOTKERNEL nor PAYLOAD. That's the case for CAPP, to test secure and trusted boot patches we need to flash CAPP with different secure boot headers. This adds the -F option for BMC targets that can be used to flash an arbitrary lid. Example: '-F CAPP:cappucode.bin.sec.ecc' will flash CAPP partition with cappucode.bin.sec.ecc The eyecatch for each partition is defined in https://github/open-power/pnor.git Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-09-26occ/prd/opal-prd: Queue OCC_RESET event message to host in OpenPOWERShilpasri G Bhat1-0/+6
During an OCC reset cycle the system is forced to Psafe pstate. When OCC becomes active, the system has to be restored to its last pstate as requested by host. So host needs to be notified of OCC_RESET event or else system will continue to remian in Psafe state until host requests a new pstate after the OCC reset cycle. This patch defines 'OPAL_PRD_MSG_TYPE_OCC_RESET_NOTIFY' to notify OPAL when opal-prd issues OCC reset. OPAL will queue OCC_RESET message to host when it receives opal_prd_msg of type '*_OCC_RESET_NOTIFY'. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>