aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-03-04version: update to 20140304qemu-slof-20140304Alexey Kardashevskiy1-1/+1
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2014-03-04Introduce dummy console deviceNikunj A Dadhania3-1/+43
Qemu can create console-less machine, aka no output device. And there are dependencies in the guest which expects a valid output device. Add this dummy device that gobbles up all the output send, and keeps the guest happy. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-03-04vio-vscsi: Fix CRQ allocation alignmentBenjamin Herrenschmidt1-3/+6
alloc-mem in SLOF does not always return aligned values it seems, so we need to align it manually. While messing around I hit a case where after a close and re-open via the client interface vscsi would fail to initialize without this fix. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [ free the allocated size ] Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-02-04version: update to 20140204qemu-slof-20140204Alexey Kardashevskiy1-1/+1
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2014-02-04virtio-9p: disable unused structureNikunj A Dadhania1-1/+2
In file included from ./board.code:140:0, from /home/nikunj/work/power/code/slof/SLOF/slof/paflof.c:106: /home/nikunj/work/power/code/slof/SLOF/slof/paflof.c: In function ‘engine’: /home/nikunj/work/power/code/slof/SLOF/lib/libvirtio/virtio-9p.h:23:3: warning: typedef ‘virtio_9p_config_t’ locally defined but not used [-Wunused-local-typedefs] } virtio_9p_config_t; Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-02-04Make "boot net:dhcp" boot from IPv4 onlyAvik Sil1-3/+7
The default network boot method "boot net" tries to boot from both IPv4 and IPv6 networks. The "boot net:ipv6" allows to boot from IPv6 network only. But there is no option for booting from IPv4 network only. This patch addresses this issue. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-02-04Fix virtio device shutdownAvik Sil2-3/+9
The virtio device shutdown method is called during quiesce in order to reset the device. This implies writing to the I/O region of the device and this only makes sense if the device is opened, otherwise we hit an "unassigned write" handler in qemu. This happens for example while booting a guest from a virtio-blk or virtio-scsi device, when the guest kernel reaches the end of prom_init(). Reported-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-02-04Change shutdown method name for virtio-scsiAvik Sil1-2/+2
add-quiesce-xt adds a different method virtio-scsi-shutdown which is not intended to be added, since the intended method shares the same name with the un-intended one. This makes call to the wrong method with wrong parameter which makes it unable to reset virtion-scsi device during quiesce. This patch fixes this by renaming the method name. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-02-04Add support for 64bit LE ABI v1 and v2 supportNikunj A Dadhania6-18/+77
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> -- v2: With the parameters changed for go-64, kernel loading from commandline broke v3: (client-exec) calls start-elf64 directly, fix args
2014-02-04Change representation of string environment variableNikunj A Dadhania1-3/+3
Currently strings are stored in the dictionary using "string," which stores the length as a byte. This brings in the limitation of only 255 byte string. The issue got exposed when using "boot-device" which was more than 256 bytes, and the string length was equal to (length & 0xFF) With this patch, we are storing the length in dictionary in a cell and copying the string after that. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-02-04cas: return error when unknown node foundNikunj A Dadhania2-5/+20
Hypercall for ibm,client-architecture-support could return nodes that isn't there in the guest DT, in such cases error should be returned to the guest kernel. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-01-21version: updateqemu-slof-20140121Alexey Kardashevskiy1-1/+1
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2014-01-20Reset obp-tftp arguments before parsingAvik Sil1-0/+2
This avoids junk values assigned to obp-tftp arguments Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
2014-01-20Enable seamless netboot on IPv6 networkAvik Sil7-39/+81
To boot from an IPv6 network user has to type "boot net:ipv6" from SLOF prompt. This is inconvenient in auto-install environment. This patch addresses this issue by falling back to IPv6 booting in case IPv4 booting fails (No DHCPv4 response). Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
2014-01-20Fix shutdown for virtio devicesNikunj A Dadhania2-4/+8
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-01-20Fix zero checksum in UDP headerAvik Sil2-0/+13
As per RFC 768 (UDP), if the computed checksum is zero, it is transmitted as all ones (the equivalent in one's complement arithmetic). Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-01-20Handle router advertisement message properlyAvik Sil3-8/+20
process_ra_options was going through infinite loop due to improper handling of option_length. Also introduction of is_ra_received() makes booting time faster since it returns as soon as router advertisement mesage is received. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-01-20[oex]hci_exit: Check before freeing/unmapping memoryNikunj A Dadhania3-16/+38
While doing cleanup of the allocated memory, make sure addresses being unmapped/free were really allocated. During error conditions, some address would not have been. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-12-17Work around missing sc 1 traps on pHypAlexander Graf12-3/+238
When running a pseries guest in PR KVM on top of pHyp, sc 1 instructions are handled directly by pHyp, so we don't get to see them. That means we need to get inventive. Invent a new instruction that behaves like sc 1, but really is a reserved instruction that traps. This instruction can be used by KVM to emulate sc 1 behavior. This patch adds the SLOF support for it. With this, SLOF detects whether it's running on such a broken setup and if so patches itself to execute the fake sc 1 instruction instead of the real one. Furthermore, we also hook into "quiesce" which Linux calls when it boots. This gives us the chance to also patch Linux when it boots up, so it uses the fake sc 1 too. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-12-16fix print_version() to return where it came fromAlexander Graf2-6/+3
The print_version() is jumping through hoops to get back to where it was called from, though it actually does get called with "bl" already, so it knows. Just return to where we came from after print_version(), making it a function we can call from other places in the code. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-12-16usb-xhci: memory freeing and using returns as bool uniformlyNikunj A Dadhania2-26/+41
* Fix freeing of memory in error path * Boolean and int were used interchangebly at various points, consolidate it to use boolean Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-12-16Output banner and initial display output in VNC windowNikunj A Dadhania10-8/+103
Initial display output does not show up in the VGA/VNC window. Create replay buffer to store the initial output and when vga/vnc console starts, dump the buffer there. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-12-09use VERSION file to generate FW versionqemu-slof-20131209Alexey Kardashevskiy2-0/+6
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2013-12-09cas: remove warningAlexey Kardashevskiy1-1/+1
Since client-architecture-support is not support by the mainline QEMU yet, this warning might be confusing so remove it. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-12-06Add support for loading little endian ELF binaries.Anton Blanchard4-6/+102
We byte swap the entire header in place in elf_check_file. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-12-06Add bswap_{16,32,64}pAnton Blanchard1-0/+18
Add byte swap macros that take a pointer and byte swap in place. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-12-06dhcpv6 and other minor net-snk fixesAvik Sil4-53/+52
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-12-06Fix missing drop in virtio-fs setup-aliasAvik Sil1-1/+3
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-12-06Find next available alias nameAvik Sil6-31/+34
This patch generaliazes the device alias name enumeration for all scsi disks, virtio-blk disks and network devices. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-12-06SLOF does not exit if given 1KB diskNikunj A Dadhania1-2/+11
When passing a 1KB disk, it goes on looping inside the deblocker, ignoring the unability of driver to read from out-of-bound blocks. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-11-26boot: enable support for bootindexqemu-slof-20131126Alexey Kardashevskiy1-0/+6
QEMU supports a bootindex property for every device in the command line. With the respective support from the QEMU side, this change is enough to make SLOF go through the list and try to boot. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2013-11-22pci-properties: add properties to enable hotplug for spaprqemu-slof-20131122Michael Roth3-0/+17
drmgr expects ibm,my-drc-index and ibm,loc-code OF properties in the corresponding device tree node to determine whether a pre-populated slot is hotpluggable/unpluggable. This is also stated as a boot-time requirement for DR-capable devices in SPAPR, though it does not specify there how these entries are to be generated. In the case of QEMU, hotpluggable slots are allocated entries based on bus/slotno values, so we can determine these entries statically at boot-time, rather than relying on RTAS calls as we would during OS-driven configuration. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-11-18e1000: remember node handleqemu-slof-20131118Nikunj A Dadhania1-0/+2
While netbooting with yaboot, code was failing at dma-map-out. Remember my-handle and store for further reference, which is needed for dma-map-out during close. yaboot for some reason does not set the current-node while calling close. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-11-18Increase quiesce tokens array sizeNikunj A Dadhania1-1/+1
16 is too less, push it to 256 Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-11-18virtio: timeout after 5secNikunj A Dadhania3-12/+20
Remove adhoc timer and put 5sec timeout. On a busy host, code hits this. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-11-18Enable IPv6 support in dnsAvik Sil5-43/+94
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-11-17usb-ohci: fix warningsNikunj A Dadhania1-3/+2
usb-ohci.c: In function ‘ohci_process_done_head’: usb-ohci.c:458:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘struct ohci_td *’ [-Wformat] usb-ohci.c:417:20: warning: variable ‘start_frame’ set but not used [-Wunused-but-set-variable] Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-11-17Add ipv6 support in net-snkAvik Sil14-53/+2191
This patch adds support for booting from a IPv6 network. It gets the boot information (tftp server, boot file name) from DHCPv6 server or can be specified manually using obp-tftp arguments. To boot from a IPv6 network, type "boot net:ipv6" from the SLOF prompt. To specify ipaddresses manually, type "boot net:ipv6,<si6addr>,<filename>,<ci6addr>" from the SLOF prompt. This patch is based on the IPv6 code written by the former SLOF team. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
2013-11-17ipv4: fix frame overwriting following arp_send_requestAvik Sil1-7/+22
Sometimes before ARP request frame is written to the line by qemu, the data gets overwritten by next outgoing frame (typically tftp request) since both use the same ARP table index for the frame buffer. This is fixed by copying the next outgoing packet data to a different buffer instead of writing it to same ARP table index's frame buffer. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
2013-11-17e1000: fix SLOF_dma_map_out argumentsAvik Sil1-1/+1
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
2013-11-17Maintain single global packet buffer for tftpAvik Sil1-14/+10
Since they were stack variable, chances are that the buffer pointer is invalid during data transfer Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
2013-11-17Increase virtio-net receive queue sizeAvik Sil1-1/+1
Since SLOF is poll based, in a high network traffic zone desired packet might be missed during receiving. Hence increase the receive queue size. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
2013-11-17Increase veth receive queue sizeAvik Sil1-1/+1
Since SLOF is poll based, in a high network traffic zone desired packet might be missed during receiving. Hence increase the receive queue size. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
2013-11-16Fix dprintf macros at various pointsNikunj A Dadhania9-10/+10
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-11-15usb-ohci: rewrite done_head processing codeNikunj A Dadhania1-55/+59
The routine had got complicated and source of few bugs while using in pci-passthru and js2x Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-11-15boot: add net in default boot orderNikunj A Dadhania1-0/+1
So if there is no boot order from qemu, nvram, the default boot order will be to try from "disk" aliases, "cdrom" aliases and lastly "net" aliases Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-11-15block 0 address in the allocatorNikunj A Dadhania1-0/+5
PCI window bars sometimes returns 0 as the a start address. This will be used by the allocator. Devices or Software can take it as null address. Mark 0 address as always allocated during initialization. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-11-15scsi: make-media-alias fixNikunj A Dadhania1-5/+9
* disk alias names are not correct * also drop stack variable in case we overflow max-alias Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-11-15usb-xhci: add xhci host controller supportNikunj A Dadhania5-9/+1454
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-11-15usb-xhci: add xhci supportNikunj A Dadhania10-7/+250
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>