aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-10-09Update device tree returned by CAS hypercallqemu-slof-20131009listNikunj A Dadhania2-9/+71
Add device tree parsing code and setting properties. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-09fdt: introduce fdt-initNikunj A Dadhania1-6/+13
Current fdt.fs takes device-tree start address from fdt-start, this needs to be made generic for parsing device tree at later point Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-09Add ibm,client-architecture-support methodNikunj A Dadhania6-1/+44
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Kernel parameter passed from qemu commandline ignoredNikunj A Dadhania1-4/+4
Commit ec5c9e8b (Use root.fs on qemu as well) would set the bootargs/bootpath to null string even in case when the /chosen node exist, the /chosen and boot property were populated during fdt parsing so do not change in case its already set. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Allow more than one client to open net devices simultaneouslyAvik Sil4-9/+9
When multiple clients are active simultaneously, they might open network devices that is already opened by other clients. This results in failure to transfer packets since obp-tftp package is not instantiated on each open. This patch resolves it by instantiating obp-tftp on each open. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04ci: add missing close in else conditionNikunj A Dadhania1-0/+2
The code in close for calling quiesce looks if there is stdin and checks whether is being closed. That condition was being used to call quiesce. So in case when the ihandle is not that of stdin, close-dev was missing. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Add GPT supportAvik Sil1-10/+106
Add support for booting from a GPT partitioned disk. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04pci: fix interrupt-map for bridgesAlexey Kardashevskiy1-10/+19
The previous scheme always put 0 as a parent slot#. However it is not always the case and QEMU's PCI bridge does not support putting device at slot#0 as it claims SHPC support for hotplug. This modifies the interrups map to let the linux guest resolve XICS global interrupt number correctly. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04usb-ohci: preserve the toggleCarry bit in EDNikunj A Dadhania1-1/+2
Endpoint descriptors toggleCarry bit needs to be preserved when using DataToggle bit in transfer descriptor is set to 0. Also zero the bulk_curr_ed Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04usb-ohci: done_head processing fixesNikunj A Dadhania2-36/+42
Return error code like STALL back, so it can be handled effectively. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04usb-ohci: update init and rationalize timingsNikunj A Dadhania2-13/+17
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04usb-msc: handle stall and other fixesNikunj A Dadhania3-4/+29
* Add Reset Recovery procedure * Zero cbw and csw memory everytime * Add delays during cbw, data and csw stage * Increment tag after every command Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04scsi: make probe more error resilientNikunj A Dadhania3-13/+36
* Some usb devices do not like report-luns, assume it as single lun device and move further. * Make inquiry of the device first for 36bytes and then determine what is the additional size to read. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04usb-core: Add CLEAR FEATURE apiNikunj A Dadhania2-0/+22
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Implement range allocatorNikunj A Dadhania7-21/+321
Use the allocator with dma-map-in so it does not create duplicate TCE entries. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Remove bcm57xx network driver as moduleAvik Sil11-3989/+1
The driver has been moved to libbcm Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Remove e1000 network driver as moduleAvik Sil7-1211/+2
The driver has been moved to libe1k Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Remove virtio-net network driver as moduleAvik Sil8-592/+1
The driver has been moved to libvirtio Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Remove veth network driver as moduleAvik Sil6-418/+1
The driver has been moved to libveth Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Add missing close-dev in pingAvik Sil1-0/+2
Without the close-dev successive ping command fails to get the arguments, because the net device is not instantiated as the open-count is not decremented. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Remove lodable network driver modules and related functionsAvik Sil1-93/+0
All network drivers have been moved to library Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Add bcm57xx network driver in libbcmAvik Sil11-6/+4019
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Add e1000 network driver in libe1kAvik Sil11-6/+1379
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Add virtio-net driver in libvirtioAvik Sil7-10/+503
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Add veth driver in libvethAvik Sil11-10/+492
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Get MAC address for client interface moduleAvik Sil1-1/+2
The network drivers ported to library get interfaced with net-snk through client interface module. Hence the ci module should set the MAC address during initialization. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Add SLOF usleep wrapperAvik Sil2-0/+7
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-10-04Add SLOF pci wrapper functionsAvik Sil2-0/+40
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-09-26Fix 'canon' client interfaceAvik Sil1-1/+12
As per 1275 standard, canon converts the possibly ambiguous device-specifier to a fully qualified pathname (see 6.3.2.2). It is kind of find-alias for clients. Earlier canon implementation was not complete, it was not at all returning the full path name. So grub was not getting the alias path by calling canon and it was breaking. In this patch I'm checking if the passed string is already a full path by comparing the first character with '/'. In that case I return the passed string as is. Otherwise I return the find-alias. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-23usb-ohci: Convert td-phys every time to td-virtqemu-slof-20130827Nikunj A Dadhania1-1/+4
next_td is phys pointer as well, convert that to virt Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-23usb-storage: Fix cbwflags fieldNikunj A Dadhania1-0/+6
SCSI layer represents DIR as TRUE or FALSE, and for SLOF TRUE is -1 and FALSE is 0, convert that to proper direction when building the CBW Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-23Add -fno-strict-aliasing in global CFLAGSqemu-slof-20130823Nikunj A Dadhania4-4/+4
This solves the bad checksum issue in udp header. The fill_udp_checksum() function suffers from "strict aliasing" problem as it is doing quite a bit of pointer casting. Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-21usb: fix various issues found with js2xNikunj A Dadhania4-36/+125
* JS20 exposed various timing related issues that were not apparent in the emulated environment. * Reset the USB Bus * JS20 overrides the frame_interval and periodic_start on setting the controller to USB operational. Reprogram them. * ohci fix the data-toggle bits. * Robust error handling Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-21Move hex64-{decode,encode}-unit to node.fsNikunj A Dadhania2-22/+22
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-21usb: Use separate in-memory endian swapNikunj A Dadhania3-32/+33
Convert pending in-memory byteswaps to accessors Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-21usb-ohci: collect TDs from done listNikunj A Dadhania2-14/+133
OHCI HC after using the TDs queues them back to hccaDoneHead. Until this event the TDs cannot be reused, as there might be references in the host controller still pending. Recycle all the TDs from the queue and acknowledge it by clearing the WD bit in interrupt status register. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-21js2x: more fixesNikunj A Dadhania7-40/+30
* Build fixes to include scsi files * Move usb-setup-hcidev out of board-qemu * Fix pci-bridge-probe to assign temporary ranges Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-06js2x: Fix build of takeover imageBenjamin Herrenschmidt1-62/+0
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-08-06js2x: use new usb stackNikunj A Dadhania2-15/+12
Fix the js2x build to compile and link the usb stack. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-06usb-ohci: Use proper memory barriers alwaysBenjamin Herrenschmidt1-2/+2
Compiler barriers are not useful for ordering memory accesses. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-08-06usb: Fix a couple of warningsBenjamin Herrenschmidt2-1/+5
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-08-06Fix $cat-instance-unitBenjamin Herrenschmidt1-1/+15
We were incorrectly checking ig instance>#units was 0 (forgot to actually load the value before testing it) and then didn't properly fallback to printing the node unit in that case. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-08-06Cache phandle of /chosenBenjamin Herrenschmidt1-2/+10
We constantly access /chosen, among other in the console I/O routines so instead of doing a path walk every time, cache the phandle Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-08-06Use root.fs on qemu as wellBenjamin Herrenschmidt3-56/+38
We had lots of duplication of code between root.fs and fdt.fs The reason we didn't use root.fs in the first place is that it tried to create the root node and the chosen node which we already have via the fdt. Instead, modify root.fs to check for their presence and only "extend" them in that case. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-08-06usb-ehci: Add ehci handshakeNikunj A Dadhania2-6/+43
After removal of the QTD, the device driver needs to make sure that the host controller is really done with this QTD, and does not have any local/cached copy of this. This is achieved by employing a 3-bit handshake as explained in the echi spec 4.8.2 and Fig 4-10 Also add missing memory barrier. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-06usb: add mb for write accessorsNikunj A Dadhania1-0/+5
Introduce mb() in all the variants of write_reg* before the hcall Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-06usb-ohci: add missing memory barriersNikunj A Dadhania1-0/+8
* Start the control/bulk processing after ed is written * Clear the content of control_head_ed and bulk_head_ed once done using them. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-06usb-ohci: suspend the controller in exit code pathNikunj A Dadhania3-29/+3
Moreover ehci already suspends the controller in the hcd_exit path. So we can remove hc-suspend from the cleanup path. Also, count mechanism is not needed anymore, as quiesce is called only once. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2013-08-06usb-ohci: Add a reset when closing the OHCIBenjamin Herrenschmidt1-0/+1
Or it will continue DMA'ing which is not a good idea. On recent qemu's that add proper DMA error handling, it will get into error state. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-08-06usb: Use proper accessors for MMIO and separate in-memory endian swapBenjamin Herrenschmidt3-129/+131
We cannot just access MMIO like that. On KVM for example, this has to be hypercalls. On js2x, we need to use special cache-inhibited loads and stores. We have accessors in cache.h, we just need to use them. However that means that read/write_reg() are no longer suitable for in-memory byteswaps. We need to use the accessors in byteorder.h for that While at it, we also fix the code to use mb() instead of barrier() as a full memory barrier is needed to actually order things. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>