aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-03-17version: update to 20150317qemu-slof-20150317Nikunj A Dadhania1-1/+1
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2015-03-17virtio: Fix vring allocationAlexey Kardashevskiy1-2/+4
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
2015-03-17helpers: Fix SLOF_alloc_mem_aligned to meet callers expectationAlexey Kardashevskiy2-2/+2
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>
2014-10-29version: update to 20141029qemu-slof-20141029Nikunj A Dadhania1-1/+1
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-10-29ipv4: Fix send packet across a subnetNikunj A Dadhania1-4/+8
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>
2014-10-17version: update to 20141017qemu-slof-20141017Nikunj A Dadhania1-1/+1
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-10-17pci: scan only type 0 and type 1Nikunj A Dadhania1-5/+6
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>
2014-09-05version: update to 20140905qemu-slof-20140905Nikunj A Dadhania1-1/+1
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-09-05usb-xhci: support xhci extended capabilitiesNikunj A Dadhania2-6/+41
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>
2014-09-05Fix term-io-key to also work when stdin has not been set yetThomas Huth1-0/+2
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>
2014-09-05Add private HCALL to inform updated RTAS base and entryAravinda Prasad4-2/+18
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.]
2014-07-22version: update to 20140722qemu-slof-20140722Nikunj A Dadhania1-1/+1
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-07-17xhci: fix port assignmentNikunj A Dadhania1-1/+1
Port assignment logic was generating negative port number Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-06-30version: update to 20140630qemu-slof-20140630Nikunj A Dadhania1-1/+1
2014-06-26Quieten the grub warningNikunj A Dadhania1-1/+1
Replace the warning with code comment Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-06-13Add boot menu supportAvik Sil2-7/+98
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-13boot from disk having chrp-boot fileNikunj A Dadhania1-16/+24
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>
2014-06-13fat16: fix read and remove debug messagesNikunj A Dadhania1-4/+5
* 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>
2014-06-13version: update to 20140613qemu-slof-20140613Nikunj A Dadhania1-1/+1
2014-06-12dhcparch define missing in compilationNikunj A Dadhania2-4/+4
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-05-14version: update to 20140514qemu-slof-20140514Nikunj A Dadhania1-1/+1
2014-05-14pci-scan: reserve memory for pci-bridge without devicesNikunj A Dadhania1-3/+3
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>
2014-05-14pci-bridge: Fix ranges when no device beyond the bridgeNikunj A Dadhania1-0/+1
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>
2014-04-29version: update to 20140429Nikunj A Dadhania1-1/+1
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-28version: update to 20140428qemu-slof-20140428Nikunj A Dadhania1-1/+1
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-04-25xhci: fix controller stopNikunj A Dadhania1-1/+1
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>
2014-04-25dhcp: support client architecture code 93Blake Rouse1-0/+25
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>
2014-04-25virtio-blk: support variable block sizeNikunj A Dadhania8-25/+59
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-25usb: use common pci dma alloc/mapping routinesNikunj A Dadhania1-4/+2
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-04-25Remove unused SLOF codeThomas Huth4-21/+7
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-bridge: generic bridge needs to support pci dma functionsNikunj A Dadhania1-0/+1
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>
2014-04-25pci: extract dma functions as separate fileNikunj A Dadhania3-26/+38
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>
2014-04-15version: update to 20140415qemu-slof-20140415Alexey Kardashevskiy1-1/+1
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2014-04-08e1000: fix usage of multiple nicsNikunj A Dadhania4-6/+11
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>
2014-04-04version: update to 20140404qemu-slof-20140404Alexey Kardashevskiy1-1/+1
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2014-04-04Isolate sc 1 detection logicAlexander Graf2-29/+29
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>
2014-03-31version: update to 20140331qemu-slof-20140331Alexey Kardashevskiy1-1/+1
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> s Please enter the commit message for your changes. Lines starting
2014-03-27build: auto-detect ppc64 architectureNikunj A Dadhania1-0/+7
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>
2014-03-27cas: increase hcall buffer size to accomodate 256 cpusNikunj A Dadhania1-1/+3
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>
2014-03-26usb: change device tree namingNikunj A Dadhania3-44/+25
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>
2014-03-26usb-core: adjust port numbers in set_addressNikunj A Dadhania1-1/+8
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>
2014-03-19virtio-scsi: correct srplun commentNikunj A Dadhania1-1/+1
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2014-03-18version: update to 20140318qemu-slof-20140318Alexey Kardashevskiy1-1/+1
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2014-03-18Fix kernel loadingNikunj A Dadhania1-1/+1
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>
2014-03-18Workaround to make grub2 assign server ip from dhcp ack packet onlyAvik Sil1-7/+7
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>
2014-03-18ELF: Enter LE binary in LE modeNikunj A Dadhania6-17/+63
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>
2014-03-18ELF loading should fail for virt != physNikunj A Dadhania3-9/+16
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>
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>