aboutsummaryrefslogtreecommitdiff
path: root/external/mambo
AgeCommit message (Collapse)AuthorFilesLines
2017-09-12skiboot/skiboot.tcl: Add imc device nodes to skiboot.tclMadhavan Srinivasan1-0/+82
Add In-Memory Collection counter dummy nodes to the skiboot.tcl to aid code testing in mambo for both OPAL and Kernel side enablement. Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-09-04mambo: Add mambo socket programMichael Neuling2-0/+367
This adds a program that can be run inside a mambo simulator in linux userspace which enables TCP sockets to be proxied in and out of the simulator to the host. Unlike mambo bogusnet, it's requires no linux or skiboot specific drivers/infrastructure to run. eg. Run inside the simulator: - to forward host ssh connections to sim ssh server ./mambo-socket-proxy -h 10022 -s 22 Then connect to port 10022 on your host ssh -p 10022 localhost - to allow http proxy access from inside the sim to local http proxy ./mambo-socket-proxy -b proxy.mynetwork -h 3128 -s 3128 Multiple connections are supported. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-06-19mambo: Update P9 PVR to reflect Scale out 24 core chipsMichael Neuling1-2/+2
The P9 PVR bits 48:51 don't indicate a revision but instead different configurations. From BookIV we have: Bits: Configuration 0: Scale out 12 cores 1: Scale out 24 cores 2: Scale up 12 cores 3: Scale up 24 cores Skiboot will mostly the use "Scale out 24 core" configuration (ie. SMT4 not SMT8) so reflect this in mambo. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-06-14mambo: Create multiple chips when we have multiple CPUsMichael Ellerman1-1/+11
Currently when we boot mambo with multiple CPUs, we create multiple CPU nodes in the device tree, and each claims to be on a separate chip. However we don't create multiple xscom nodes, which means skiboot only knows about a single chip, and all CPUs end up on it. At the moment mambo is not able to create multiple xscom controllers. We can create fake ones, just by faking the device tree up, but that seems uglier than this solution. So create a mambo-chip for each CPU other than 0, to tell skiboot we want a separate chip created. This then enables Linux to see multiple chips: smp: Brought up 2 nodes, 2 CPUs numa: Node 0 CPUs: 0 numa: Node 1 CPUs: 1 Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-06-08mambo: fix cpio/initramfs reservationStewart Smith1-0/+1
We didn't init cpio_size in the no cpio case. Fixes: 52aed80bddd5eed94c537f2bb0b846e4b5683728 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-06-08mambo: Add a reservation for the initramfsOliver O'Halloran1-0/+5
On most systems the initramfs is loaded inside the part of memory reserved for the OS [0x0-0x30000000] and skiboot will never touch it. On mambo it's loaded at 0x80000000 and if you're unlucky skiboot can allocate over the top of it and corrupt the initramfs blob. There might be the downside that the kernel cannot re-use the initramfs memory since it's marked as reserved, but the kernel might also free it anyway. Fixes: 65612f120735 Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Tested-by: Michael Ellerman <mpe@ellerman.id.au> [stewart@linux.vnet.ibm.com: add Fixes] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-06-06mambo: Match whole string when looking up symbols with linsym/skisymMichael Ellerman1-2/+2
linsym/skisym use a regex to match the symbol name, and accepts a partial match against the entry in the symbol map, which can lead to somewhat confusing results, eg: systemsim % linsym early_setup 0xc000000000027890 systemsim % linsym early_setup$ 0xc000000000aa8054 systemsim % linsym early_setup_secondary 0xc000000000027890 I don't think that's the behaviour we want, so append a $ to the name so that the symbol has to match against the whole entry, eg: systemsim % linsym early_setup 0xc000000000aa8054 Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Tested-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-31mambo: Allow loading multiple CPIOsMichael Ellerman1-4/+10
Currently we have support for loading a single CPIO and telling Linux to use it as the initrd. But the Linux code actually supports having multiple CPIOs contiguously in memory, between initrd-start and end, and will unpack them all in order. That is a really nice feature as it means you can have a base CPIO with your root filesystem, and then tack on others as you need for various tests etc. So expand the logic to handle SKIBOOT_INITRD, and treat it as a comma separated list of CPIOs to load. I chose comma as it's fairly rare in filenames, but we could make it space, colon, whatever. Or we could add a new environment variable entirely. The code also supports trimming whitespace from the values, so you can have "cpio1, cpio2". Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
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-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-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-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>
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-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-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-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-09-16mambo: Make POWER9 look like DD2Michael Neuling1-1/+2
In a recent Linux (next) change we added support for Radix Tree Size (RTS) encodings for different POWER9 revs. Linux commit: commit 694c4951922d114e789f669deb409b2aef440ae9 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Wed Aug 24 15:03:37 2016 +0530 powerpc/mm/radix: Use different RTS encoding for different POWER9 revs In mambo, we support the DD2 encoding of RTS but the PVR we advertise is DD1. Hence Linux uses the wrong RTS encoding and we don't boot. This fixes mambo to use the POWER9 DD2 PVR encoding. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-09-06mambo: add exception and qtrace helpersNicholas Piggin1-0/+34
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-09-02external/mambo: Update skiboot.tcl to add page-sizes nodes to device treeSuraj Jitindar Singh1-0/+14
Currently skiboot.tcl doesn't add device tree nodes ibm,processor-page-sizes or ibm,segment-page-sizes. This results in failure when trying to boot a P8 guest using kvm in mambo. Update skiboot.tcl in order to have it add these device tree nodes. The values for these properties were taken from those hard-coded into skiboot in hdata/cpu-common.c:78; the format was preserved for readability and to make it obvious where these values came from. With this change it is possible to boot a P8 kvm guest in mambo. Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Acked-By: Michael Neuling <mikey@neuling.org> Reviewed-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-28mambo: Update Radix Tree Size as per ISA 3.0Michael Neuling1-1/+1
Fix Radix Tree Size (RTS) encoding as per ISA 3.0. This is controlled via a SIM_CTRL1 bit in mambo. In Linux we recently changed to this encoding, so we no longer boot. The associated Linux commit is: commit b23d9c5b9c83c05e013aa52460f12a8365062cf4 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Jun 17 11:40:36 2016 +0530 powerpc/mm/radix: Update Radix tree size as per ISA 3.0 Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20mambo: Fix bt command and add little endian supportMichael Neuling1-8/+32
This fixes the bt (back trace) command which had bit rot. It also adds little endian support. Format looks like this: systemsim % bt pc: 0x000000003007F270 lr: 0x000000003007EFAC stack:0x0000000031C03B60 0x0000000031C03BF0 stack:0x0000000031C03C00 0x0000000030022F44 stack:0x0000000031C03C90 0x0000000030023000 stack:0x0000000031C03D20 0x0000000030039540 stack:0x0000000031C03E30 0x00000000300145BC stack:0x0000000031C03F00 0x000000003000259C Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-05mambo: Run at fastest speed.Michael Neuling1-2/+2
Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-01mambo: Add README.md for skiboot.tclMichael Neuling1-0/+57
Stewart has a great blog post on getting started with mambo and skiboot. It would be better to have this content here so we can keep it in sync with the code. Original blog post here: https://www.flamingspork.com/blog/2014/12/03/running-skiboot-opal-on-the-power8-simulator/ Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-01mambo: Add support for POWER9Michael Neuling1-2/+31
Ensures the simulator is configured correctly and we advertise the right features via the device tree. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-20Fix for typosFrederic Bonnard1-1/+1
While reviewing the Debian packaging, codespell found those. Most proposed fixes are based on codespell's default dictionnary. Signed-off-by: Frederic Bonnard <frediz@linux.vnet.ibm.com> Reviewed-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-04-28mambo: Remove reliance on env(SIMHOST)Michael Neuling1-5/+3
The SIMHOST environment variable is not present in all version of mambo. This removes the reliance on it and instead uses the "display default_configure" command to find the simulator type. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-04-18mambo: Flatten device tree at the endMichael Neuling1-4/+3
Flatten device tree at the end to ensure we've configured everything first. Otherwise we may get an old dump of the device tree in skiboot. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-04-18mambo: Increase memory to 4GB and change memory mapMichael Neuling1-2/+4
Increase memory in the sim to 4GB up from 1GB. We need to turn off the small RAM and ROM in mambo as that sits at 3.75GB currently. We don't use these currently. Also change where we put the CPIO to give ourselves more space. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-04-17mambo: Enable multicore configurationsMichael Neuling1-13/+23
This enables multicore configurations in mambo. You can change the number of cores in mambo by changing the line: mconfig cpus CPUS 1 To do this, we need to sanitise the PIR that mambo sets and fixup the ibm,ppc-interrupt-server#s properties. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-15external/mambo: Load skiboot already offsetMichael Neuling1-2/+2
Load skiboot already offset at 768MB so that it doesn't need to relocate itself. This shaves about 1M instructions off boot time. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-15external/mambo: Fix indentation in mambo_tuils.tclMichael Neuling1-75/+75
No code change. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-10-21mambo: Auto start the simulator using SKIBOOT_AUTORUNMichael Neuling1-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>
2015-10-21mambo: Add SKIBOOT_SIMCONF for additional configurationMichael Neuling1-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>
2015-10-21mambo: Advertise the sim supports 256M and 1TB segments in device treeMichael Neuling1-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>
2015-10-21mambo: Add ability to load initrdMichael Neuling1-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>
2015-10-21mambo: Make PVR change only on p8Michael Neuling1-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>
2015-10-21mambo: Use SIMHOST to determine the simulator typeMichael Neuling1-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>
2015-10-21mambo: Use alternate skiboot.lid with SKIBOOTMichael Neuling1-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>
2015-08-21external/mambo: Update PVR valueSamuel Mendoza-Jonas1-0/+1
Running little-endian kernels in mambo requires HILE to be set properly, which requires a bump in the machine's pvr value to a DD2.x chip. Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-05-25Refactor mambo test runningStewart Smith1-2/+0
we now properly control the simulation rather than just killing off Mambo. For boot test, we wait for petitboot and actually shut down the simulation properly with 'halt'. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-31mambo: Make mambo_utils.tcl optionalMichael Ellerman1-5/+8
Only source mambo_utils.tcl if we can find it. This allows using skiboot.tcl from another directory, which is useful for automated testing. We need to open code the body of "ton" and "c" obviously, in case we didn't find skiboot.tcl. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-31mambo: Exit mambo when the simulation is stoppedMichael Ellerman1-2/+1
When the simulation runs to completion, exit mambo. In addition to the previous patch this allows "halt" on the Linux command line to stop the simulation and exit mambo. Note that this only takes effect if the "mysim go" is left to run until the simulation is stopped. If the user interrupts the simulation, eg. with Ctrl-C, to inspect state, then the exit has no effect. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-11Fixup "i" command in mambo scriptsBenjamin Herrenschmidt1-1/+1
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>