aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-31Added ibm,req#msi and ibm,req#msi-x to device nodesqemu-slof-20129731qemu-slof-20120731Alexey Kardashevskiy1-1/+31
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2012-07-19vscsi updates to match IBM OFW variantqemu-slof-20120719Benjamin Herrenschmidt3-40/+114
This update our vscsi to encode unit-addresses the same way as IBM proprietary OFW does, and adds support for the vscsi-report-lun method. This fixes booting with grub2 on fedora. It also means that we now support devices with LUNs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-19Fix encode/decode-unit to use a full 64-bit @xxxx valueBenjamin Herrenschmidt1-11/+24
Currently, for devices with a 2 cells address, we always use the form @hi,lo which doesn't match what pseries OFW does and is generally awkward. This changes things to use a single 64-bit number instead Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-06-29Added interrupt-map + swizzling for bridges.Alexey Kardashevskiy1-2/+23
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2012-06-29Fixes error preventing from scanning PHBs with devices type1 (bridges):Alexey Kardashevskiy1-1/+3
E3401: Aborting boot, no current instance no current instance The fix is taken from pci-device.fs.
2012-05-14Fixes to ANSI escape sequence handlingBenjamin Herrenschmidt1-5/+21
We have a couple of issues making grub2 essentially unusable when using a framebuffer console: - When we encounter a ";" in a CSI sequence, we still stop the parsing, so all the positioning sequences are broken - We made a pretty poor choice of when to use invert video, basically switching to invert whenever a "m" sequence had any non-zero value. Instead we remember the foreground and background colors set by the client and use invert when the foreground value is lower (or equal) to the background value. There is still a -lot- of improvements to do here (including proper support for colors) but at least this makes grub2 from fedora 17 usable. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-05-14Fix inverse displayBenjamin Herrenschmidt1-1/+1
Trying to display in "inverse" mode causes us to display black on black Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-04-30Fixed some bugs in the bootinfo.txt parsing codeThomas Huth1-3/+21
The bootinfo.txt parsing code assumed that the filename to the boot loader always contained a backslash. However, this is maybe not the case if the boot loader has been put into the root directory of the filesystem. For example SLES 8 used "boot &device;:1,yaboot.chrp" in its boot-script. Now we look for the &device; string instead which should always work. SLOF also failed if there were parameters after the path to the boot loader. Now we take care of the parameters, too. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-04-30Fixed ISO9660 filesystem directory parsing with a lot of entriesThomas Huth1-7/+18
According to the ISO9660/Ecma-119 standard, directory entries must not cross the boundary of a sector. That means that there might be some padding after the last directory entry that still fitted into a sector. SLOF did not take this into account yet so it failed to find files in directories which used more than one sector for its directory entries. Now we are taking the padding into account so the "file not found" problems should be gone. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-04-25Use rtas-start-cpu from common code folder.Thomas Huth1-12/+1
No need to redefine rtas-start-cpu in the board-qemu folder again, we can use the function from the common code folder instead. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-04-25Enable RTAS reboot and power-off for board-qemu, too.Thomas Huth1-0/+5
Now that QEMU supports these two RTAS calls, we can also use them on board-qemu. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-04-25Fixed typoThomas Huth1-1/+1
2012-03-16Cleaned up envvar.fs and fixed the behaviour of env-bytes config variablesThomas Huth1-50/+54
Some parts of envvar.fs were quite hard to read due to bad indentation, and the handling of env-byte variables was quite shaky. Fixed and cleaned up the code now so that it should be more maintainable now. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-03-16Always enabled nvram-debug functionThomas Huth1-4/+2
This function is also handy when we only fake a NVRAM, so let's always enable it. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-02-27Removed obsolete netflash code.Thomas Huth5-305/+4
Flashing on JS2x is done via the "update-flash" Forth code nowadays (see the file slof/fs/update_flash.fs for details), so there is no need to maintain the obsolete netflash code anymore. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-02-27Added the possibility to debug the "getprop" client interface callsThomas Huth1-3/+15
To analyze the behavior and requirements of boot loaders and OS clients, it's crucial to know which properties they try to read from our device tree. Thus we need the possibility to debug the "getprop" client interface call. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-02-23Removed unused PCI Forth functions.Thomas Huth1-12/+0
assign-bar-mapping and assigned-addresses-property are not needed anymore. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-02-22Use hv-logical-memop for blinking the screen on qemu vgaqemu-slof-20120222Benjamin Herrenschmidt1-1/+13
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-02-22Expose hv-logical-memop to forth codeBenjamin Herrenschmidt4-0/+31
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-02-22Move _FASTRMOVE implementation into headers & support new hcallBenjamin Herrenschmidt4-55/+115
This moves _FASTREMOVE to the cache.h header, 970 uses the existing code, p7 now uses the new memop hcall. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-02-22Add a proper compiler barrier between prim'sBenjamin Herrenschmidt1-1/+1
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-02-22Change RTAS checkpoint numbers to avoid overlapBenjamin Herrenschmidt1-6/+5
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-02-22Fix address masking for video cardsBenjamin Herrenschmidt2-2/+2
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-02-16Removed pci-setup.fsqemu-slof-20120217Thomas Huth2-38/+0
The file pci-setup.fs provided the basic PCI environment in the past when we did not do a full PCI scan yet. Now that we include the whole PCI scan functions via pci-scan.fs in tree.fs, the pci-setup.fs file is not needed anymore. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-02-14Fixed disk-label partition parsing to also work with single partition argumentsThomas Huth3-9/+26
The parse-partition function was not able to deal with arguments that only contained a partition number (without comma), e.g. "boot disk:1" failed. Also limited the size that we load from a PReP partition in case the hard disk is smaller than max-prep-partition-blocks. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-02-14Fixed debugger for functions with (doito)Thomas Huth2-0/+2
Functions that use the TO keyword with an instance variable need some special treatment, just like we did it with the TO for normal variables already (see the usage of <doto> in debugger.fs). Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-02-14Fixed $call-method to clean up the return stack in case of errors.Thomas Huth1-1/+5
There was a bug that occured when yaboot tried to load its configuration file via network. The net-snk tries to probe the device tree node for write and read methods (see ci_device.c), which triggers $call-method in the end. But when $call-method failed, it did not restore my-self and the return stack, which caused some bad crashes. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-02-14Added a possibility to debug the client interface callsThomas Huth1-10/+58
Set "debug-client-interface?" to TRUE to enable the debug messages. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-02-14Do not blindly scan all PCI bus IDsThomas Huth1-1/+1
We know that QEMU always starts with bus ID 0, so to speed up the boot process quite a bit, we do not have to scan all 255 bus IDs here. In full emulation mode, SLOF now boots ~20 seconds faster when there are no PCI devices attached. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-02-02New oco for JS20Thomas Huth1-0/+0
The old file did not work with new compilers anymore.
2012-01-19Add cirrus support under qemuBenjamin Herrenschmidt2-0/+337
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-19vga: Small fixesBenjamin Herrenschmidt1-4/+4
Properly clear screen and don't write to constants Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-19Add virtfs supportBenjamin Herrenschmidt14-4/+1210
Code originally written by Timothy Rule and reworked & bug fixed by myself Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-19Move virtio to a separate libraryBenjamin Herrenschmidt15-59/+135
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-13FCODE: Support for old-fashioned "local values" tokensThomas Huth2-0/+156
One of the old FCODE tokenizers uses the opcodes in the range of 0x407 to 0x41f for supporting Forth local values. To get these FCODE programs working, we have to support these opcodes, too. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-01-12Updated the documentationThomas Huth2-71/+143
Now the documentation reflect that we support KVM/QEMU, too. Also added a short section about the source code structure. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-01-12Fix ram-boot handling of 64-bit addressesqemu-slof-20120112Benjamin Herrenschmidt1-2/+2
Hex vs. decimal thinko Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-12usb-ohci: Avoid instance specific allocationsBenjamin Herrenschmidt1-10/+25
The USB stack did instance specific allocations for the various buffers, but would then assign them to package specific lists, and would generally get badly confused as soon as multiple instances of the driver got opened. This typically occurs when using a USB keyboard and booting from a USB disk. This makes everything node variables instead, with tracking of how many instances are open, with one allocation pass on the first open and one free pass on the last close. The result is a lot more reliable, I can boot with USB keyboard and a USB disk fine without hanging qemu. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-11Fixed problem in framebuffer code when erasing or inserting characters.Thomas Huth1-4/+10
When erasing characters or when inserting characters in the middle of a line, the framebuffer code did not correctly calculate the line width, since it was not taking the bit depth into account yet. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2012-01-11Support new-style PCI for qemu boardqemu-slof-20120111.1Benjamin Herrenschmidt7-28/+100
We now support populating the device-nodes ourselves when using a newer qemu which doesn't do it anymore. Note: I have removed the support for working with the existing device nodes, so qemu needs to be updated in sync with slof Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-11Fix virtio access sizeqemu-slof-20120111Benjamin Herrenschmidt1-5/+11
We don't support 8-bytes PIO Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-11Fix inline asm for ci_write_xxBenjamin Herrenschmidt1-19/+31
It was clobbering r4 and not marking it as such, causing problems among others in virtio-blk Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-11vga: support for 15bppBenjamin Herrenschmidt1-2/+3
This is the default in qemu now Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-11qemu: Allow qemu passing the boot kernel directlyBenjamin Herrenschmidt1-0/+38
We do that by replacing the word "boot-command" to return "(boot-ram)" (but we don't change the nvram env). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-12-29Add support for instance specific "my-unit" settingsThomas Huth2-15/+82
According to IEEE 1275, the "my-unit" command shall return the unit address of the current _instance_, i.e. this unit address can be set differently for each instance, it is not bound to the physical unit address like "my-space" and "my-address". This behaviour is expected by the Citrine FCODE for example, which does not set a physical unit address for the "sd" (disk) nodes, but needs the unit address to be specified when opening the device tree node instead. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2011-12-28Enabled -Wmissing-prototypes and -Wstrict-prototypes CFLAGS and cleaned upThomas Huth11-92/+62
These two compiler flags for additional warnings help to improve the quality of the source code: Removed some unused code and fixed some obvious bugs. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2011-12-28Source code beautificationThomas Huth1-46/+91
Some functions in node.fs were formatted in a very bad way, using wrong indentation or mixing spaces and tabs for indentation. Cleaned this up now, without doing any functional changes. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2011-12-28Improved "tick", postpone and $FIND commandsThomas Huth2-16/+9
When the ' (tick) or postpone commands hit an unknown function, they simply printed out "undefined word" without telling which word was not defined. These problems were quite cumbersome to debug since it was quite hard to find the right spot in the source code where such problems happened. Now the tick and postpone command store the name of the undefined word, too, so that the code which catches the ABORT also prints this information. I also fixed the $FIND command to be standard compliant right from the start (so that it leaves the string parameters on the stack in case the word has not been found). Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2011-12-22Fixed yet another bug in open-nodeThomas Huth1-12/+22
When the "open" method of the target node failed, the open-node function did not correctly restore the previous value of "my-self" (it was using my-parent of the new node to restore the previous value, but that did not work when the new node could not be opened). Now the old value of "my-self" is saved on the return stack instead and then always correctly restored. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
2011-12-21Enable 16 bit and 32 bit color depth support in QEMU VGA device driverThomas Huth1-8/+6
Now that our framebuffer code basically supports 16 and 32 bit color depths, we can also enable support for these resolutions in the QEMU VGA device driver. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>