Age | Commit message (Collapse) | Author | Files | Lines |
|
BenH still need to ACK this though.
From: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
* Determines size of the flash using device tree.
* Provides nvram access functions for RTAS_NVRAM
* Allocates temporary buffer of nvram in SLOF code and use that in C.
(sbrk not available)
* NVRAM_LENGTH is used at various places, make sure it is well guarded
and also use dynamically determined size once an RTAS-NVRAM is
found.
* Use NVRAM_LENGTH as a variable in case of RTAS_NVRAM, not very
elegant though
Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
--
Changelog from v1:
* #define cleanups suggested by Thomas/Benh
* Fix makefile which missed passing $FLAG for building llfw
* renamed vio-nvram.fs as rtas-nvram.fs
|
|
This is a hack to work around some stupid behaviour in the SLES11
installer. It expects a node named simply "disk" under the VIO SCSI
device node, rather than individual disk@XXX devices. pHyp doesn't
enumerate the disks, and so provides such a node with the disk only probed
when the device is actually opened. SLOF does enumerate the disks and so
provides the nodes with specific unit addresses instead, breaking the
installer.
The installer doesn't actually use anything in the "disk" node however, it
just expects it to be there, so this hack provides a dummy node to make
the installer happy.
Signed-off-by: Ben Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
|
This updates a number of .gitignore files to ignore generated targets of
various sorts.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
|
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
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>
|
|
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>
|
|
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
E3401: Aborting boot, no current instance
no current instance
The fix is taken from pci-device.fs.
|
|
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>
|
|
Trying to display in "inverse" mode causes us to display black on black
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
assign-bar-mapping and assigned-addresses-property are not needed anymore.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
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>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Set "debug-client-interface?" to TRUE to enable the debug messages.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
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>
|
|
The old file did not work with new compilers anymore.
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Properly clear screen and don't write to constants
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Code originally written by Timothy Rule and reworked &
bug fixed by myself
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
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>
|
|
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>
|
|
Hex vs. decimal thinko
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
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>
|
|
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>
|
|
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>
|
|
We don't support 8-bytes PIO
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
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>
|
|
This is the default in qemu now
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|