Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
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>
|
|
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>
|
|
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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
|
|
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>
|
|
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>
|
|
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
This avoids junk values assigned to obp-tftp arguments
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
|
|
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>
|
|
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
* 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>
|
|
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>
|
|
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
16 is too less, push it to 256
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
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>
|
|
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
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>
|
|
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>
|
|
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>
|
|
* 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>
|
|
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|