Age | Commit message (Collapse) | Author | Files | Lines |
|
This adds ibm,mmu-pid-bits and a new ibm,mmu-lpid-bits to POWER10 CPUs.
POWER9 Linux has some workarounds for processors bugs that means it's
probably safer to not add the entries there.
Linux already hard codes these values correctly on these processors, but
this allows more flexibility to change things.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
|
|
If the SMT configuration is not 8, set small-core mode in SIM_CTRL1
and PVR registers.
Also allow only 1, 2, 4, or 8 threads, and only allow 1 and 2 threads
if there is only one processor configured. This helps avoid strange
crashes due to thread/core enumeration problems with unexpected threads
per core.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
Update SIM_CTRL1 bits to set ARC0/1, which disables atomic RC updates in
hardware which matches implementation.
Comment some remaining quirks with the P9 configuration.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
Update PVR and mambo f000f bits:
- Set POWER10 to DD2.0
Update SIM_CTRL and SIM_CTRL1 bits:
- Set the LPAR-per-core mode bit. This is required for SMT KVM to work.
- Set ARC0/ARC1 bits which enable atomic RC update interrupts (not
hardware updates), which matches implementation.
- Enable DEXCR, HAIL, ROP, BHRB disable, block BHRB writes in PR=0,
and RFC02628 on POWER10.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
Make it a bit easier to boot large kernels by printing more info when
the kernel is too big, so the user has some idea how much they need to
adjust PAYLOAD_ADDR by.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
Co-authored-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Co-authored-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Co-authored-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
[Folded Maddy's IMC changes and Ravi's DAWR changes - Vasant]
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
Linux requires chained CPIOs to be 4 byte aligned otherwise they are
ignored. This aligns them.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Reviewed-by: Dan Horák <dan@danny.cz>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
Mambo has a strange feature called MEMORY_OVERFLOW, enabled by
default, which causes some accesses to non-existent memory addresses
to transparently "create" memory.
This can be confusing when debugging, eg:
systemsim % mysim cpu 0 display spr pc
0xC0000000000246B8
systemsim % mysim memory display 0xC0000000000246B8 8
0x0000000000000000
Appears to show that the memory at pc (NIP) is currently zeroes.
The astute observer will note that "mysim memory display" takes
physical addresses, not effective addresses. So unless this machine
has > 12XB of RAM, this access should have failed as there is no
memory at that address.
Turning MEMORY_OVERFLOW off gives us a much more sensible result:
systemsim % mysim memory display 0xC0000000000246B8 8
Illegal Address 0xC0000000000246B8
It doesn't appear to have any effect on accesses done from Linux, with
the setting enabled or disabled we still get a machine check for bad
accesses in real mode:
0:mon> p $__mmu_off
return value is 0x9000000030001003
0:mon> d c008000000000000
c008000000000000 [15447.242793] Disabling lock debugging due to kernel taint
[15447.242824] MCE: CPU0: machine check (Severe) Host Real address Load/Store (foreign) [Not recovered]
[15447.242868] MCE: CPU0: NIP: [c000000000103090] mread+0x90/0x190
[15447.242897] MCE: CPU0: Initiator CPU
[15447.242918] MCE: CPU0: Hardware error
[15447.242939] opal: Hardware platform error: Unrecoverable Machine Check exception
[15447.242978] CPU: 0 PID: 18 Comm: kopald Tainted: G M 5.7.0-gcc-8.2.0-13354-gd475a86526b5-dirty #127
[15447.243022] NIP: c000000000103090 LR: c000000000103034 CTR: c0000000000c2050
[15447.243059] REGS: c0000000fffbfd70 TRAP: 0200 Tainted: G M (5.7.0-gcc-8.2.0-13354-gd475a86526b5-dirty)
[15447.243101] MSR: 9000000000201003 <SF,HV,ME,RI,LE> CR: 28002224 XER: 20040000
[15447.243150] CFAR: c000000000029660 DAR: c008000000000000 DSISR: 00000008 IRQMASK: 3
[15447.243150] GPR00: 0000000028002224 c0000000f05074c0 c000000001775e00 0000000000000000
[15447.243150] GPR04: c0000000f0507768 0000000000000010 0000000000000010 c0000000f0507768
[15447.243150] GPR08: 0007ffff0faf8899 0000000000000000 c0000000f0507767 9000000030001003
[15447.243150] GPR12: 0000000031c10000 c000000001970000 c0000000f0507738 0000000000000000
[15447.243150] GPR16: 000000000000002e 0000000000000010 000000000000002e 0000000000000010
[15447.243150] GPR20: c000000000e563d0 c000000000ffcf88 c000000000fddf30 c008000000000000
[15447.243150] GPR24: c0000000f0507767 c000000000ffc678 0000000000000040 c0000000f0507878
[15447.243150] GPR28: c0000000f0507768 c0000000f0507768 0000000000000010 0000000000000000
[15447.243485] NIP [c000000000103090] mread+0x90/0x190
[15447.243514] LR [c000000000103034] mread+0x34/0x190
[15447.243538] Call Trace:
[15447.243559] [c0000000f05074c0] [c0000000f0507510] 0xc0000000f0507510 (unreliable)
[15447.243602] [c0000000f0507510] [c000000000107b48] xmon_core+0xd18/0x3a10
[15447.243640] [c0000000f0507850] [c00000000010a870] xmon+0x30/0x80
[15447.243677] [c0000000f05079f0] [c0000000001050d4] sysrq_handle_xmon+0xc4/0xd0
[15447.243720] [c0000000f0507a20] [c000000000882954] __handle_sysrq+0xd4/0x220
[15447.243758] [c0000000f0507ac0] [c00000000089db68] __hvc_poll+0x268/0x4b0
[15447.243796] [c0000000f0507b60] [c00000000089e824] hvc_handle_interrupt+0x24/0x70
[15447.243838] [c0000000f0507b80] [c0000000001c2474] __handle_irq_event_percpu+0xb4/0x350
[15447.243880] [c0000000f0507c50] [c0000000001c2754] handle_irq_event_percpu+0x44/0xc0
[15447.243923] [c0000000f0507c90] [c0000000001c2844] handle_irq_event+0x74/0xc0
[15447.243965] [c0000000f0507cc0] [c0000000001c9770] handle_level_irq+0xe0/0x1c0
[15447.244006] [c0000000f0507cf0] [c0000000001c0a44] generic_handle_irq+0x54/0x80
[15447.244046] [c0000000f0507d10] [c0000000000ca050] opal_handle_events+0x130/0x150
[15447.244088] [c0000000f0507d60] [c0000000000c1e7c] kopald+0x9c/0x140
[15447.244124] [c0000000f0507db0] [c00000000016ea9c] kthread+0x19c/0x1b0
[15447.244161] [c0000000f0507e20] [c00000000000d1a8] ret_from_kernel_thread+0x5c/0x74
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
The configuration of SIM_CTRL1 doesn't match POWER9 in a number of
ways, including missing vslv, vsrv, addex and xsmax*/xsmin*/xscmp*
instructions.
Signed-off-by: Anton Blanchard <anton@ozlabs.org>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
Bytes 22-23 Bit 0 in ibm,pa-features indicate TM support. None of the
pa_features_p9*[] in hdata/cpu-common.c set this bit so do not set it
in the ibm,pa-features made for mambo either.
Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
SPDX makes it a simpler diff.
I have audited the commit history of each file to ensure that they are
exclusively authored by IBM and thus we have the right to relicense.
The motivation behind this is twofold:
1) We want to enable experiments with coreboot, which is GPLv2 licensed
2) An upcoming firmware component wants to incorporate code from skiboot
and code from the Linux kernel, which is GPLv2 licensed.
I have gone through the IBM internal way of gaining approval for this.
The following files are not exclusively authored by IBM, so are *not*
included in this update (I will be seeking approval from contributors):
core/direct-controls.c
core/flash.c
core/pcie-slot.c
external/common/arch_flash_unknown.c
external/common/rules.mk
external/gard/Makefile
external/gard/rules.mk
external/opal-prd/Makefile
external/pflash/Makefile
external/xscom-utils/Makefile
hdata/vpd.c
hw/dts.c
hw/ipmi/ipmi-watchdog.c
hw/phb4.c
include/cpu.h
include/phb4.h
include/platform.h
libflash/libffs.c
libstb/mbedtls/sha512.c
libstb/mbedtls/sha512.h
platforms/astbmc/barreleye.c
platforms/astbmc/garrison.c
platforms/astbmc/mihawk.c
platforms/astbmc/nicole.c
platforms/astbmc/p8dnu.c
platforms/astbmc/p8dtu.c
platforms/astbmc/p9dsu.c
platforms/astbmc/vesnin.c
platforms/rhesus/ec/config.h
platforms/rhesus/ec/gpio.h
platforms/rhesus/gpio.c
platforms/rhesus/rhesus.c
platforms/astbmc/talos.c
platforms/astbmc/romulus.c
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
[oliver: fixed up the drift]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
This patch just renames the env var to be non-plural to match PMEM_DISK.
A related patch going in to mambo will make the actual mode used in
mambo be called "private" instead of "cow" to reflect the fact that
you're getting a private copy of the image file and that any data
written to it will be lost when mambo exits. Unlike the old bogusdisk
driver, there is no separate .cow file where the writes go.
Signed-off-by: Aaron Sawdey <acsawdey@linux.ibm.com>
Acked-by: Michael Neuling <mikey@neuling.org>
[oliver: fixed whitespace damage on the patch]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
I've added support in mambo's "memory mmap" command to have a "cow" mode
which just uses MAP_PRIVATE instead of MAP_SHARED on the file so that writes
to the memory region are not sent back to the file. This allows multiple
mambo instances to share the same filesystem image.
This is implemented by having a PMEM_MODES environment variable. If this
is set, it is expected to contain a comma separated list of modes (rw or cow)
for the list of files in PMEM_DISK. If there are fewer modes than files, the
remaining files default to "rw".
Signed-off-by: Aaron Sawdey <acsawdey@linux.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
Skiboot expects a chip-id to be associated with the pmem device tree
node. Without one the following assertion is hit during boot:
1305405: (1305405): [ 0.001300406,3] ***********************************************
1316412: (1316412): [ 0.001306446,3] < assert failed at core/device.c:968 >
1319544: (1319544): [ 0.001316645,3] .
1322726: (1322726): [ 0.001319777,3] .
1325958: (1325958): [ 0.001322959,3] .
1329490: (1329490): [ 0.001326191,3] OO__)
1332972: (1332972): [ 0.001329723,3] <"__/
1336404: (1336404): [ 0.001333205,3] ^ ^
1612307: (1612307): [ 0.001581877,3] Fatal TRAP at 00000000300297f4 .dt_get_chip_id+0x28 MSR 9000000000021002
1618779: (1618779): [ 0.001612557,3] CFAR : 00000000300ce7b4 MSR : 9000000030001000
1625236: (1625236): [ 0.001619014,3] SRR0 : 00000000300297f4 SRR1 : 9000000000021002
1631693: (1631693): [ 0.001625471,3] HSRR0: 0000000030012624 HSRR1: 9000000030001000
1637745: (1637745): [ 0.001631928,3] DSISR: 00000000 DAR : 0000000000000000
1644023: (1644023): [ 0.001637980,3] LR : 00000000300297dc CTR : 0000000000000000
1649684: (1649684): [ 0.001644258,3] CR : 20000202 XER : 00040000
1656705: (1656705): [ 0.001649921,3] GPR00: 00000000300297dc GPR16: 0000000000000000
1663740: (1663740): [ 0.001656946,3] GPR01: 0000000031c13940 GPR17: 0000000000000000
1670775: (1670775): [ 0.001663981,3] GPR02: 0000000030127400 GPR18: 0000000000000000
1677810: (1677810): [ 0.001671016,3] GPR03: 00000000ffffffff GPR19: 0000000000000000
1684845: (1684845): [ 0.001678051,3] GPR04: 00000000300d0376 GPR20: 0000000000000000
1691796: (1691796): [ 0.001685086,3] GPR05: 000000000000000c GPR21: 0000000000000000
1698831: (1698831): [ 0.001692037,3] GPR06: 0000000031c10060 GPR22: 0000000000000000
1705960: (1705960): [ 0.001699072,3] GPR07: 0000000030500010 GPR23: 00000000300eca0c
1713089: (1713089): [ 0.001706201,3] GPR08: 0000000030502b48 GPR24: 00000000300cf2c8
1720124: (1720124): [ 0.001713330,3] GPR09: 0000000000000000 GPR25: 00000000300ce8d7
1727182: (1727182): [ 0.001720365,3] GPR10: 0000000000000063 GPR26: 00000000300ce8fb
1734228: (1734228): [ 0.001727423,3] GPR11: 0000000000000003 GPR27: 00000000300d0398
1741358: (1741358): [ 0.001734469,3] GPR12: 0000000040000402 GPR28: 00000000300ce91d
1748488: (1748488): [ 0.001741599,3] GPR13: 0000000031c10000 GPR29: 00000000300d048f
1755618: (1755618): [ 0.001748729,3] GPR14: 00000000300026fc GPR30: 0000000030502cb8
1762748: (1762748): [ 0.001755859,3] GPR15: 0000000030000000 GPR31: 0000000030502cb8
2414283: (2414283): CPU 0000 Backtrace:
2414283: (2414283): S: 0000000031c13c40 R: 00000000300297dc .dt_get_chip_id+0x10
2414283: (2414283): S: 0000000031c13cb0 R: 000000003002ab68 .add_chip_dev_associativity+0x14
2414283: (2414283): S: 0000000031c13d50 R: 0000000030017c00 .mem_region_init+0x144
2414283: (2414283): S: 0000000031c13e30 R: 00000000300153d0 .main_cpu_entry+0x4d4
2414283: (2414283): S: 0000000031c13f00 R: 000000003000275c boot_entry+0x1bc
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Tested-by: Praveen K Pandey <praveen@linux.vnet.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
Make skiboot.tcl able to load and use a CVC blob from a real system.
This code comes from the src/securerom/ code in Hostboot.
we now use this in the sreset_world and hello_world test cases when we
do a secure boot run of them
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
[oliver: folded cvc.bin into this patch, misc fixes]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
This allows us to test various combinations of the Linux
spectre/meltdown mitigations.
The default values of the existing settings remain the same.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
Use Software Package Data Exchange (SPDX) to indicate license for each
file that is unique to skiboot.
At the same time, ensure the (C) who and years are correct.
See https://spdx.org/
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
[oliver: Added a few missing files]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
|
|
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
Repost of the same thing with Signed-off-by, and Acked-by from Michael Neuling.
This fixes a couple issues with external/mambo/skiboot.tcl so I can use the
mambo bogus net.
* newer distros (ubuntu 18.04) allow tap device to have a user specified
name instead of just tapN so we need to pass in a name not a number.
* need some kind of default for net_mac, and need the mconfig for it
to be set from an env var.
Thanks,
Aaron
Acked-by: Michael Neuling <mikey at neuling.org>
Signed-off-by: Aaron Sawdey <sawdey at linux.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
Add an environment variable which makes Mambo wait for a connection
from gdb prior to starting simulation.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
If you supply a VMLINUX_MAP/SKIBOOT_MAP/USER_MAP addr2func can guess
at your symbol name. ie
systemsim % p pc
0xC0000000002A68F8
systemsim % addr2func [p pc]
fdt_offset_ptr+0x78
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
Automatically exiting can be convenient for scripting. Will also exit
due to a HW crash (eg. unhandled exception).
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[stewart: handle case where SKIBOOT_AUTORUN is not set]
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Newer firmwares report some feature flags related to security
settings via HDAT. On real hardware skiboot translates these into
device tree properties. For testing purposes just create the
properties manually in the tcl.
These values don't exactly match any actual chip revision, but the
code should not rely on any exact set of values anyway. We just define
the most interesting flags, that if toggled to "disable" will change
Linux behaviour. You can see the actual values in the hostboot source
in src/usr/hdat/hdatiplparms.H.
Also add an environment variable for easily toggling the top-level
"security on" setting.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We *disable* the secure boot part, but we keep the verified boot
part as we don't currently have container verification code for Mambo.
We can run a small part of the code currently though.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Currently the mambo scripts can do multiple chips, but only the first
ever has memory.
This patch adds support for having memory on each chip, with each
appearing as a separate NUMA node. Each node gets MEM_SIZE worth of
memory.
It's opt-in, via export MAMBO_NUMA=1.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
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>
|
|
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>
|
|
We didn't init cpio_size in the no cpio case.
Fixes: 52aed80bddd5eed94c537f2bb0b846e4b5683728
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|