aboutsummaryrefslogtreecommitdiff
path: root/board-qemu
AgeCommit message (Collapse)AuthorFilesLines
2016-10-17Do not link libnet to net-snk anymore, and remove net-snk from board-qemuThomas Huth2-2/+1
Since libnet is now linked to Paflof directly, we do not have to link it into net-snk anymore. So for board-qemu, we can now even exclude net-snk completely from the build (for board-js2x, it is still required for the biosemu, so we can not erase the net-snk folder completely yet). Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-10-17Link libnet code to Paflof and add a wrapper for netboot()Thomas Huth1-3/+5
Now that all necessary functions are provided by Paflof, too, we can finally link the libnet code to this binary. To be able to call the netboot() function from the Forth code now, we also add a wrapper that takes the parameter string from the obp-tftp package and converts it to an argv array that is expected by the netboot() function. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-10-13Add virtio-serial device supportNikunj A Dadhania5-6/+155
Add support for virtio serial device to be used as a console device. Currently, SLOF only supports spapr-vty device. With this addition virtio console can be used during boot. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-10-13Generalize output banner write routineNikunj A Dadhania1-6/+12
Initial display output is replayed to vga/vnc display, similar facility will be needed for virtio-serial console as the enumeration would only happen during PCI discovery. Generalize the write routine that could be used accordingly for virtio-serial driver as well. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-10-13Improve indentation in OF.fsNikunj A Dadhania1-55/+55
Make uniform indentation(width = 4) everywhere in the file. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-10-12rtas: Improve rtas-do-config-@ and rtas-do-config-! a little bitThomas Huth1-6/+4
As soon as we are booting with at least one PCI device, the rtas-do-config-@ Forth word is called quite often, so it makes sense that we look up the corresponding RTAS token only once instead of each time the function is called. Also the "ffffffff and" operation on the lower half of the PUID is not really required and can be removed, since the "l!" Forth word is storing the lower four bytes only anyway. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-10-10pci: Fix secondary and subordinate PCI bus enumeration with board-qemuThomas Huth1-4/+11
SLOF currently fails to correctly initialize the secondary and subordinate bus number registers in the config space of PCI bridges, so that for example with the following command line, none of the PCI devices is usable: qemu-system-ppc64 -nodefaults -nographic -serial mon:stdio \ -device pci-bridge,chassis_nr=1,id=bridge0,addr=0x3 \ -device pci-bridge,chassis_nr=2,id=bridge1,addr=0x4 \ -device virtio-balloon,bus=bridge1,addr=0x1 \ -device virtio-net,bus=bridge0,addr=0x2 \ -device virtio-rng,bus=bridge0,addr=0x5 \ -device pci-bridge,chassis_nr=3,id=br2,addr=0x6,bus=bridge1 \ -device e1000,bus=br2,addr=0x1 This is because SLOF tries to enumerate the PCI bus numbers that are reachable via a bridge. In the function pci-bridge-probe, it increases the pci-bus-number counter and writes that value into the secondary bus number register of the PCI config space, and after probing all attached bridges, it fills the number of the last enumerated bus number into the subordinate bus number register. This works fine if the whole bus enumeration is done by SLOF, however on board-qemu, we nowadays rely on the pre-initialized PCI device tree from QEMU - and the numbers that SLOF is trying to use here do not match with the bus numbers that QEMU already assigned to the bus segments (QEMU provides the device tree nodes in descending order, but SLOF tries to enumerate the bus numbers in ascending order here instead). To fix this issue, we should simply stop setting up the secondary and subordinate config space registers of the bridge in SLOF - since this is done by QEMU already! Thus we replace the "pci-bridge-probe" function with a board-qemu-specific function "phb-pci-bridge-probe", that does not call "pci-bus!" and "pci-bus-subo!" anymore. (And since pci-bridge-probe was the only spot that called phb-pci-probe-bus, we can get rid of that wrapper now, too, and call phb-pci-walk-bridge from phb-pci-bridge-probe directly instead). Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1377083 Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-10-10pci-phb: Fix stack underflow in phb-pci-walk-bridgeThomas Huth1-1/+1
The sequence "my-space pci-htype@ pci-out" in phb-pci-walk-bridge is bugged: pci-htype@ already consumes the my-space item from the stack, only leaving one item for pci-out. But pci-out needs two input items on the stack, the PCI address and a character item. So this rather should be "my-space dup pci-htype@ pci-out" instead. However, using the output of pci-htype@ as input character for pci-out also does not make much sense, since this is likely an unprintable character. So let's simply use a question mark here instead to indicate that we did not recognize the type of the PCI device. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1377083 Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-09-14Do not include the FCode evaluator by default anymoreThomas Huth2-4/+1
Commit 2fed5652819ad26627a8 ("Always include evaluator, move framebuffer token init to fbuffer.fs") made sure that the FCode evaluator is always included, during each boot cycle. The basic idea was that we would soon be starting to support PCI cards with FCode drivers on them. However, this has never happened, and so this change was in vain. The bad thing is now that the inclusion of the FCode evaluator also takes a lot of precious boot time, e.g. when running in QEMU TCG mode, it is more than a second. So to be able to boot faster again, disable the FCode evaluator by default again and put it into the ROM-fs instead (so it still can be loaded manually with "include evaluator.fs" if necessary). Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-09-14Source code beautification of board-qemu/slof/pci-interrupts.fsThomas Huth1-26/+26
No functional change in this patch, only cosmetics: Use indentation width = 4 spaces everywhere, fix typo in one of the comments ("Child pin" instead of "Chile pin"), and rename "swizzledpin" in the return stack comments to "parentpin" to match the non-return stack comments. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-09-14Allow PCI devices in PCI bridge slots greater than 4Thomas Huth1-1/+1
PCI bridges can have up to 31 slots. If we limit the value from pci-addr2dev with "modulo 4", all devices in slots 4 and higher won't work correctly since the interrupt-map property then contains wrong values in this case. For example, when QEMU is started with the following command line, Linux is not able to use the balloon device: qemu-system-ppc64 ... \ -device pci-bridge,bus=pci.0,id=bridge1,chassis_nr=1,addr=0x6 \ -device virtio-balloon-pci,id=balloon0,bus=bridge1,addr=5 To fix this issue, simply remove the bogus "4 mod" calculation. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1366953 Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-09-14Fix bad interrupt pin numbering in interrupt-map property of PCI bridgesThomas Huth1-1/+1
The legacy PCI interrupts in the device tree are enumerated from 1 to 4. However, the code in pci-gen-irq-map-one generates numbers between 0 and 3 instead. This renders devices unusable by Linux in case they should use IRQ 4. For example, when starting QEMU with qemu-system-ppc64 ... \ -device pci-bridge,bus=pci.0,id=bridge1,chassis_nr=1,addr=0x6 \ -device virtio-balloon-pci,id=balloon0,bus=bridge1,addr=3 Linux can not use the balloon device since it is unable to determine the right IRQ number in this case. To fix this issue, we've simply got to make sure that the IRQ numbers are in the range from 1 to 4 instead of 0 to 3. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1366953 Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-08-03Remove dependency on cpu/@0 for bootingNikunj A Dadhania1-2/+11
With the addition of cpu hotplug in QEMU, cpu@0 can be removed as well. SLOF should not depend on it. Find the first child in the "/cpus" node and get the timer base frequency and set it as the chosen cpu as well Reported-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-06-27net: Move files from clients/net-snk/app/netlib/ to lib/libnet/Thomas Huth1-2/+2
When we want to link the network stack to other parts of the firmware later (paflof), we've got to turn it into a proper library first. Note: Make sure to run "make distclean" after this patch, so that the dependencies for the moved files get rebuilt properly. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-05-02virtio: Add modern version 1.0 support to 9p driverThomas Huth2-0/+5
Allow the new little-endian ring format for the 9p driver, too, just like it has already been done for the other virtio devices. Signed-off-by: Thomas Huth <thuth@redhat.com> Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-05-02virtio: Set a proper name for virtio-9p device tree nodesThomas Huth1-0/+1
The virtio-9p devices currently show up as "unknown-legacy-device" in the device tree. We've got a driver for this device, so it is certainly not "unknown", i.e. let's use a better name here instead. Signed-off-by: Thomas Huth <thuth@redhat.com> Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-03-16Remove unused sms code.Thomas Huth1-1/+1
There is currently only an unusable stub for the sms menu in SLOF. It does not make much sense to parse this defunc code each time we boot, that only wastes time and space in the boot rom image. So let's simply remove these sms menu remainders for now. Note: This patch also touches one line in OF.fs to make sure that the dependencies for this file are properly regenerated (so we avoid to force everybody to do a 'make distclean' afterwards). Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-03-10virtio-net: initialize to populate mac addressNikunj A Dadhania1-0/+7
With commit aa9566d2e(virtio-net: move setup-mac to the open routine) local-mac-address property started getting set during open routine. So the netboot workflow was addressed. This was required as the device needs to be probed before reading, after virtio 1.0 changes. While boot from the disk and grub is set to get kernel over network, it breaks. As grub looks for local-mac-address property first, which is not there. Fix this by creating an instance and closing it. setup-mac in the open will populate the local-mac-addres property Reported-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-24dev-null: The "read" function has to return 0 if nothing has been readThomas Huth1-1/+1
The "read" function of the dev-null device currently claims that the same amount of bytes has been read as input bytes have been requested. This causes grub to hang forever at the boot selection menu, since grub then thinks that there's a continuous stream of input data. If nothing has been read (which is always the case for the dev-null device), the "read" function should simply return 0 instead. Then grub also boots properly again after the typical short timeout. Reported-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Tested-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-11virtio-scsi: enable virtio 1.0Nikunj A Dadhania2-0/+16
Also add a device file for non-transitional pci device id: 0x1048 Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio-net: enable virtio 1.0Nikunj A Dadhania2-0/+16
Also add a device file for non-transitional pci device id: 0x1041 Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio-blk: enable virtio 1.0Nikunj A Dadhania2-0/+16
Also add a device file for non-transitional pci device id: 0x1042 Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio: add and enable 1.0 device setupNikunj A Dadhania6-47/+4
Introduce parsing routines for virtio capabilities. This would also determine whether we need to function in legacy mode or virtio 1.0. Update routine to start using the base address from the updated legacy structure. With the removal for base address setting in the Forth code and most of the device setup happening in C code, code in virtio.fs is redundant. Remove virtio.fs and move the allocation of the virtio_device structure to the C code instead of the Forth code in individual files. Also, drop the packed attribute for the virtio_{device,cap} structure. The structure is not shared anymore. Drivers need to negotiate the 1.0 feature capability before starting to use 1.0. Disable it in all the drivers until 1.0 is enabled. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio: add virtio 1.0 related struct and definesNikunj A Dadhania1-0/+8
Traditionally, struct virtio_device is shared between SLOF and C code. This still remains shared with the addition of virtio_cap structure as well. Now both virtio_device and virtio_cap structures are shared. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio: get rid of type variable in virtio_deviceNikunj A Dadhania1-12/+4
virtio device structure carries a type variable indicating whether virtio is over PCI or VIO. While VIO is not there and no plan to introduce other transport, there is no purpose of having this variable around and checking for PCI. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio-net: move setup-mac to the open routineNikunj A Dadhania1-16/+14
MAC reading should be done after the initialization of the device after the features negotiation. Adjust the open routine accordingly. There is no point in sending the mac address to the virtionet_open. Change the signature. Also read the mac address directly from the config space to remove the dependency of getting the mac address from the open routine. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio: introduce helper for initializing virt queueNikunj A Dadhania2-18/+0
The routine takes care to allocate and set the queue address in the device. Add these calls in virtio-net, virtio-blk and virtio-9p. With the lack of this routine, devices like virtio-blk and virtio-9p did not do a device reset in the driver initialization code. This helper will fix that problem Change the signature of virtio_set_qaddr, accepting queue address as unsigned long argument. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-12-23Increase temporary buffer size of ibm,client-architecture-support callThomas Huth1-6/+7
The buffer size that we currently use for the client-architecture- support call currently only works if there is not more than 1 TiB of hot-pluggable RAM for the guest. This will likely not be enough in the near future, so increase the buffer size from 128 kiB to 2 MiB instead. That should be enough to accomodate for 16 TiB of hot-pluggable memory. While we're at it, also rename the "size" variable to something more specific (since it is put into the namespace of the root node), and add a proper error message in case the alloc-mem fails. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-12-23Move archsupport.fs into board-qemu directoryThomas Huth2-0/+40
The "hv-cas" hypercall is only available on board-qemu. Including archsupport.fs on board-js2x breaks the boot process there. Thus the archsupport.fs file should reside in the board-qemu/slof directory instead and only be included from there. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-11-03qemu/js2x/client: Support binutils >= 2.25.1Alexey Kardashevskiy2-3/+2
The recent binutils version introduces explicit definition of a TOC symbol which points to the .toc section and enforces .toc alignment to 256 rather than 8 bytes before. For now the TOC symbol points to same location as it was before - start of .toc + 0x8000; however as this might change, we should not rely on that in the source code. This changes __toc_start (for qemu and js2x boards), _got (for net-snk, takeover, rtas) in linker scripts to use explicitely defined TOC if defined and fall back to the older scheme if not. This changes r2 (the register pointing to TOC) setup code not to add 0x8000 as linker scripts do that now. Here is a bit more information about the change: https://sourceware.org/ml/binutils/2015-10/msg00124.html https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=a27e685fa0a6480bdb07e3be359558524cec89b7 Tested on 1. gcc version 4.8.3 20140911 (Red Hat 4.8.3-7) (GCC) GNU ld version 2.23.2 2. gcc version 5.2.1 20151001 (GCC) GNU ld (GNU Binutils) 2.25.51.20150930 Reported-by: William Grant <wgrant@ubuntu.com> Tested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-09-30vga: Add support for virtio-vgaBenjamin Herrenschmidt4-187/+216
Move the bulk of the qemu VGA code to a qemu-vga.fs file and include it from both the qemu std PCI device and a qemu virtio VGA PCI device Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [aik: removed trailing spaces, changed year 2011 to 2015 in copyright notice] Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-09-18qemu-vga: Use MMIO BAR instead of legacy IO portsBenjamin Herrenschmidt1-44/+11
Qemu "std" VGA has long supported MMIO-only operations instead of legacy IO ports. This switches to using those. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-08-03fbuffer: Improve invert-region helperThomas Huth1-4/+10
The introduction of invert-region already speeded up the cursor drawing very much. But there is still space for improvement: So far invert-region is accessing the memory only byte by byte, but with some additional logic that checks the alignment of the address and the length of the area, we can also make this function to access the memory with half-word, word or long-word accesses. With this additional logic, invert-region-x is also no longer necessary and thus can be removed. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-05-29fbuffer: introduce the invert-region-x helperAlexey Kardashevskiy2-9/+5
This patch simply moves the slow RX based logic from fb8-invert-screen to board-js2x helpers and implement a fast hv-logical-memop based helper for board-qemu. And we can drop hcall-invert-screen ! Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> [aik: removed one empty line] Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-05-29fbuffer: introduce the invert-region helperGreg Kurz1-0/+3
The inner loop in fb8-toggle-cursor can be implemented with hv-logical-memop in board-qemu and get an incredible performance boost. Let's introduce a per-board helper: - board-js2x: slow RB based, taken from current fb8-toggle-cursor - board-qemu: faster hv-logical-memop based With standard graphical settings on board-qemu, we go from 512 hcall invocations per character down to 16. Suggested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-05-07pci: Use QEMU created PCI device nodesNikunj A Dadhania1-1/+43
PCI Enumeration has been part of SLOF. Now with hotplug code addition in QEMU, it makes more sense to have this code in one place, i.e. QEMU. Adding routines to walk through the device nodes created by QEMU. SLOF will now configure the device/bridges and program the BARs for communicating with the devices. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2015-03-12Set default palette according to "16-color Text Extension" documentThomas Huth2-16/+2
The "Open Firmware Recommended Practice: 16-color Text Extension" document specifies how the first 16 colors of a palette should be set. So let's use these colors in SLOF, too. Also move the function for initializing the palette into the common graphics.fs file so that we do not have to do this change twice. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2015-03-12Fix rectangle drawing functions to work also with higher bit depthsThomas Huth3-131/+4
draw-rectangle, fill-rectangle and read-rectangle were only working with 8-bit color depth displays so far. This is fixed now for 16-bit, 24-bit and 32-bit color depths, too, by taking the "screen-depth" into account. And while we're at it, consolidate all the same copies of these functions into one common file (graphics.fs) so that we do not have to do these modifications multiple times in different files. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2015-03-12Use device-type Forth word to set up the corresponding propertyThomas Huth2-2/+2
It's easier to use "device-type" instead of creating the corresponding properties manually. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2014-12-03cas: reconfigure memory nodesNikunj A Dadhania1-5/+31
For supporting memory hotplug feature, some changes are need in the way memory is represented during VM bootup. Now the guest boots from RMA and rest of the memory is configured only during client-architecture call. SLOF adds support for creation of these nodes dynamically. If the guest supports ibm,dynamic-reconfiguration-memory, qemu would create memory as part of /ibm,dynamic-reconfiguration-memory While for older guests, memory@ would be populated. CC: bharata@linux.vnet.ibm.com Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-12-03pci: use 64bit bar rangesNikunj A Dadhania1-2/+7
Add support for the new ranges property for 64bit BARs. This will enable devices with higher BAR requirements. Currently, the device could not get more than 256MB, as the 512MB memory range passed by Qemu was divided between prefetchable and non-prefetchable MMIO range. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2014-10-29net-snk: llfw startup is using the wrong offset to handlerBenjamin Herrenschmidt1-1/+1
It's loading from handler + 0x160 instead of 0x60. Not a big problem in practice but should be fixed. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-29rtas: Improve error handling in instantiate-rtasNikunj A Dadhania1-3/+6
Error handling, even when the call is not implemented, code was printing failed. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-08-27Add private HCALL to inform updated RTAS base and entryNikunj A. Dadhania1-1/+5
This patch adds a private HCALL to inform qemu the updated rtas-base and rtas-entry address when OS invokes the call "instantiate-rtas". This is required as qemu allocates the error reporting structure in RTAS space upon a machine check exception and hence needs to know the updated RTAS. Enhancements to qemu to handle the private HCALL, prepare error log and invoke machine check notification routine are in a separate patch. Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-06-13Add boot menu supportAvik Sil1-0/+12
This patch adds boot menu support to SLOF. When boot menu is enabled from qemu commandline with '-boot menu=on', on pressing F12 key it displays the list of devices to boot from and waits for user's input. This is in line with x86 qemu bios feature. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-06-12dhcparch define missing in compilationNikunj A Dadhania1-2/+1
Include DHCPARCH define in the FLAG variable Set the flag, so that dhcp request would contain DHCPARCH Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-04-29Set dhcp arch in board-qemu config fileqemu-slof-20140429Nikunj A Dadhania1-0/+1
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-04-25virtio-blk: support variable block sizeNikunj A Dadhania1-5/+5
Current code only works with 512 bytes read. Moreover, Qemu ignores the guest set features request. In the set features request SLOF indicates to qemu that it is not support VIRTIO_BLK_F_BLK_SIZE feature. Code in qemu suggests that virtio-blk is not implementing set_guest_feature. Tested-by: Bharata B Rao <bharata@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-04-25Remove unused SLOF codeThomas Huth1-4/+0
This patch removes some code that is obsolete and completely unused nowadays. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-04-25pci: extract dma functions as separate fileNikunj A Dadhania1-0/+1
DMA alloc/mapping functions needs to be used by pci generic bridge as well. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>