Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
The value returned by virtio_vring_size() is used to allocate memory
for vring. The used descriptor list (array of vring_used_elem) is
counted by the header - vring_used struct - is not.
This fixes virtio_vring_size() to return the correct size.
At the moment rings are quite small (256) and allocated with
4096 alignment, this is why we have not been having issues with
this so far.
Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
Changes:
v2:
* remove magic numbers
|
|
Every caller of SLOF_alloc_mem_aligned() assumes the size is the first
argument while it is not.
This switches align and size and fixes random memory corruptions.
This is grep for SLOF_alloc_mem_aligned with this patch applied:
include/helpers.h|27| extern void *SLOF_alloc_mem_aligned(long size, long align);
lib/libveth/veth.c|103| buffer_list = SLOF_alloc_mem_aligned(8192, 4096);
lib/libveth/veth.c|105| rx_queue = SLOF_alloc_mem_aligned(rx_queue_len, 16);
lib/libvirtio/virtio-net.c|101| vq[i].desc = SLOF_alloc_mem_aligned(virtio_vring_size(vq[i].size), 4096);
slof/helpers.c|70| void *SLOF_alloc_mem_aligned(long size, long align)
Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
The send packet code does understand that the IP is not part of the
current network and needs to use the router. And then tries to get the
MAC address of the router IP from arp cache, that fails. This is
becuase there was no ARP Request send for the router IP.
So in case when there is router involved, send arp request for the
router IP and after the reply, we have the router mac cached to
communicate with.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
In certain cases when a PCI device is passthru and is frozen before it
reaches SLOF. All PCI read result reading FF. This exposed a bug in
the pci scan code which would wrongly take it as a pci brigde and try
to scan devices below that and that would enter an infinite loop.
Explicitly scan for type 0/1 and rest are not supported.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
commit 706c69e4 "xhci: fix port assignment" partially fixed the
usb port numbering.
Adding parsing of xhci extended capabilities, we can parse the
overlapped ports accordingly and have proper port numbering.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
term-io-key simply did nothing when the stdin had not been set yet.
Especially, it even did not put an output item on the stack, which led
to very ugly crashes in case we dropped to the Forth prompt before
the console had been set up. Fix it by running the behaviour of the
previous key handler instead.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
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: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
[Error handling, even when the call is not implemented,
code was printing failed.]
|
|
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
Port assignment logic was generating negative port number
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
|
|
Replace the warning with code comment
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
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>
|
|
SLES when creating an LVM, creates a boot partition with
CHRP-BOOT. This was only being handled for CDROM case. Add this for
the hard-disk as well.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
* fat16 code had old debug prints, get rid of that
* yaboot tried reading a file beyond the size of file, fix read
routine to override and read only till the file-size
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
|
|
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>
|
|
|
|
A pci-bridge without a downstream device will end up with no memory
range allocated. For cases like hotplug, reserve some memory for the
bridge device.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
Before starting pci-bridge probing the ranges property is set to the
max limit, and then pci bridge is probed. Once the probe is over we
would update the ranges property.
In case when there is no device beyond the bridge, ranges will be null
and the code moves ahead. The actual problem here is that before
probing the bridge the ranges property was set to max limit. That
stays and cause overlapping ranges for sibling devices.
So empty the ranges property for this bridge when there is no device present.
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>
|
|
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
A bit operation bug left the controller in the running state causing
PCI EEH in the host when using pci-passthru for USB3 device.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
Added support for the DHCP request to include the code 93 architecture
code. This is needed so the responding dhcp server, knows what
filename it should return for the system to netboot. Set the
qemu-board DHCPARCH type to 0x0c which is the correct value for slof.
Signed-off-by: Blake Rouse <blake.rouse@canonical.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
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>
|
|
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
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>
|
|
With a generic pci bridge and a pci device on that bridge, any call to
dma functions would fail as generic pci-bridge does not support
them. This would result in TCE entries not getting populated either in
the host(vfio) or qemu.
Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
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>
|
|
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
When using multiple e1000 network interface netboot would fail if we
try to boot from the first interface.
During first e1000 device initialization, m_e1k.m_baseaddr_u64 (static
variable) is set to read/write pci registers. Later the second device
does process. When first e1000 driver tries netboot, it has an
assumption that m_e1k.m_baseaddr_u64 is correct, which is not the
case.
Ensure reinitialization for m_e1k.m_baseaddr_u64 when open interface
of device is called.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
Under weird circumstances we ended up with unsynchronized data and text
section references between the stage1 and paflof binaries.
This patch moves the initial sc 1 detection logic to work without any
persistent state, making it properly reentrant regardless of the place
we end up hitting the code at.
This fixes broken sc 1 detection for me on PR KVM.
Signed-off-by: Alexander Graf <agraf@suse.de>
[aik: added r0 to clobber list and $(FLAG) to AS1FLAGS as suggested by agraf, tested on pHyp]
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
s Please enter the commit message for your changes. Lines starting
|
|
Remove the silliness of running make on powerpc like this;
$ CROSS= make
The default value of CROSS prevented this, detect the architecture in
the makefile and sent the CROSS accordingly.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
It is seen that guests booting in compatibility mode (like Power7)
will issue a client-architecture-service call which will result in
QEMU rebuilding the device tree. The size of the device tree to be
built, which is passed from SLOF is currently 4 kB. This is
insufficient to contain more than 48 CPU nodes. Increase this size in
SLOF so that 255 CPUs (max limit in QEMU) can be supported.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
Qemu ignores the controller type while coding the bootindex. Changing
the representation of name accordingly.
Earlier a USB controller device representation was:
/pci@800000020000000/ohci@1/usb-storage@1/disk@101000000000000
/pci@800000020000000/ehci@2/usb-storage@1/disk@101000000000000
/pci@800000020000000/xhci@3/usb-storage@1/disk@101000000000000
The patch changes this to:
/pci@800000020000000/usb@1/storage@1/disk@101000000000000
/pci@800000020000000/usb@2/storage@1/disk@101000000000000
/pci@800000020000000/usb@3/storage@1/disk@101000000000000
Controller name is preserved in " device_type" property in the node.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
There is a mismatch between the port number between qemu and slof. Was
unearthed while using bootindex.
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: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
commit 66119a19 changed the stack representation of go-64 calls, this
call site needs update as well. r12 is not passed as an argument
anymore.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
Sometimes the bootp reply message from a dhcp nak packet is passed to bootloader
(grub2) through "bootp-response" property. Grub2 does not verify if it is an
ack or nak packet and goes on picking up the server ip address from the message.
This makes grub2 unable to make further communication. The workaround here is
made to avoid this situation by copying the bootp reply message only when it is
from dhcp ack packet.
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
Trampoline code in the LE binary were helping fix this. This patch now
takes care of switching the mode to LE for LE elf binaries.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
Prevent loading of elf files which does not have virtual address same
as physical address.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
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>
|