Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Rather than hard coding /tmp/zImage.epapr, get the zImage from an environment
variable.
This is a) cleaner, and b) allows running multiple copies of the
simulator against different kernels simultaneously.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|