Age | Commit message (Collapse) | Author | Files | Lines |
|
The next-pci-mem and next-pci-mmio Forth words are completely unused,
and pci-next-io is only used in one location (which can easily be
replaced), so let's get simply rid of these legacy functions.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
If the initial boot attempt fails, for example because the file that we
downloaded via TFTP is not executable, or because the user exited grub
instead of booting a kernel, SLOF prints out the banner text twice.
This is quite ugly. Fix it by avoiding to print the banner during the
first boot attempt, i.e. by adding the ".banner" command to the "boot"
command only after we've done the first attempt via "start-it".
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1443904
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
This removes old ugly logo to save precious boot cycles and make it
easier to do automation scripts. This removes logo for both QEMU and JS2x
boards. As .banner does not call .slof-logo anymore, this also removes
redefinitions of .banner.
While we are here, this updates a year in the copyright notice for
the QEMU board. This also removes some spaces from the standard banner.
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
|
Commit 2fed5652819ad26627a8 ("Always include evaluator, move
framebuffer token init to fbuffer.fs") made sure that the FCode
evaluator is always included, during each boot cycle. The basic
idea was that we would soon be starting to support PCI cards with
FCode drivers on them. However, this has never happened, and so
this change was in vain. The bad thing is now that the inclusion
of the FCode evaluator also takes a lot of precious boot time,
e.g. when running in QEMU TCG mode, it is more than a second.
So to be able to boot faster again, disable the FCode evaluator
by default again and put it into the ROM-fs instead (so it still
can be loaded manually with "include evaluator.fs" if necessary).
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
When we want to link the network stack to other parts of the
firmware later (paflof), we've got to turn it into a proper
library first.
Note: Make sure to run "make distclean" after this patch, so that
the dependencies for the moved files get rebuilt properly.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
These functions are only used by some ancient js2x code,
so move them to that folder accordingly.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
Since slof/fs/dma-function.fs has been introduced for board-qemu,
these function definitions shadow the original js2x functions from
slof/fs/pci-config-bridge.fs, because dma-functions.fs is included
after pci-config-bridge.fs in slof/fs/pci-bridge.fs.
To restore the original behavior, move the js2x functions into
a board-specific dma-function.fs file instead and include that
one into the ROM-fs instead of the version for board-qemu.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
The recent binutils version introduces explicit definition of
a TOC symbol which points to the .toc section and enforces .toc
alignment to 256 rather than 8 bytes before.
For now the TOC symbol points to same location as it was before -
start of .toc + 0x8000; however as this might change, we should not
rely on that in the source code.
This changes __toc_start (for qemu and js2x boards), _got (for net-snk,
takeover, rtas) in linker scripts to use explicitely defined TOC if
defined and fall back to the older scheme if not.
This changes r2 (the register pointing to TOC) setup code not to add
0x8000 as linker scripts do that now.
Here is a bit more information about the change:
https://sourceware.org/ml/binutils/2015-10/msg00124.html
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=a27e685fa0a6480bdb07e3be359558524cec89b7
Tested on
1. gcc version 4.8.3 20140911 (Red Hat 4.8.3-7) (GCC)
GNU ld version 2.23.2
2. gcc version 5.2.1 20151001 (GCC)
GNU ld (GNU Binutils) 2.25.51.20150930
Reported-by: William Grant <wgrant@ubuntu.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
The PCI scan code needs the functions from the file
dma-function.fs - and this had been forgotten to be
included in the rom filesystem of board js2x. So add
it here, too, to avoid that the boot process aborts
due to the missing functions.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
The introduction of invert-region already speeded up the cursor
drawing very much. But there is still space for improvement:
So far invert-region is accessing the memory only byte by byte,
but with some additional logic that checks the alignment of the
address and the length of the area, we can also make this function
to access the memory with half-word, word or long-word accesses.
With this additional logic, invert-region-x is also no longer
necessary and thus can be removed.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
This patch simply moves the slow RX based logic from fb8-invert-screen
to board-js2x helpers and implement a fast hv-logical-memop based helper
for board-qemu. And we can drop hcall-invert-screen !
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
[aik: removed one empty line]
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
The inner loop in fb8-toggle-cursor can be implemented with hv-logical-memop
in board-qemu and get an incredible performance boost.
Let's introduce a per-board helper:
- board-js2x: slow RB based, taken from current fb8-toggle-cursor
- board-qemu: faster hv-logical-memop based
With standard graphical settings on board-qemu, we go from 512 hcall
invocations per character down to 16.
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
draw-rectangle, fill-rectangle and read-rectangle were only working
with 8-bit color depth displays so far. This is fixed now for 16-bit,
24-bit and 32-bit color depths, too, by taking the "screen-depth"
into account.
And while we're at it, consolidate all the same copies of these
functions into one common file (graphics.fs) so that we do not
have to do these modifications multiple times in different files.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
It's easier to use "device-type" instead of creating the
corresponding properties manually.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
Add a dummy version.c to please the Makefile
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
* 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>
|
|
Fix the js2x build to compile and link the usb stack.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
It can be stored in nvram. It defaults to a platform specified default
currently set to 256MB on js2x and 16K on qemu.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
Most of these errors were found by codespell:
controler -> controller
appropiate -> appropriate
devide -> divide
comming -> coming
seperate -> separate
reponsible -> responsible
initialization -> initialization
successfull -> successful
whithin -> within
recieve -> receive
wich -> which
occurence -> occurrence
beggining -> beginning
accessable -> accessible
proccess -> process
succesfuly -> successfully
immediatly -> immediately
prefered -> preferred
avaliable -> available
threshhold -> threshold
statistsics -> statistics
endianess -> endianness
positon -> position
writen -> written
occurence -> occurrence
upto -> up to
overwriten -> overwritten
availabe -> available
enviroment -> environment
intruction -> instruction
thru -> through
substract -> subtract
occured -> occurred
begining -> beginning
lenght -> length
atributes -> attributes
preceeding -> preceding
defintion -> definition
decriptor -> descriptor
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
|
|
The old file did not work with new compilers anymore.
|
|
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>
|
|
Since the FCODE evaluator can be used for more than one PCI card now, the
interpreter is now always included during boot. The framebuffer tokens are now
only initialized when the code from fbuffer.fs is being used.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
These additional files are necessary to built board-js2x, see the following
URL for details: http://www.ibm.com/developerworks/power/pa-slof-js20/
|
|
According to the PCI bus binding to Open Firmware, the uppermost byte can
contain some description bits when doing "config-l@" and the like. For
accessing the config space via MMIO, we've got to mask them away.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
The compiler flags -Wmissing-prototypes and -Wstrict-prototypes generally help
to write code with proper prototypes. This way one can avoid some ugly bugs
because it helps to identify functions that do not have prototypes in headers.
It also helps to improve performance since local functions then have to be
declared "static", so the compiler can do better optimizations.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
The code did not check whether biosemu has been executed successfully - and
this of course caused problems when SLOF has been compiled without biosemu
enabled.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
While setting up the setsupbuff, the code wrote accidentially to memory
at address 3 instead of setsupbuff+3.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
The map-in function must retriev the BAR address from the config space address
that is provided in the phys.hi parameter. We can not rely on the value in
phys.lo as we did before. This patch is needed to get the FCODE from QLOGIC
working, and it also revealed some bugs in the current version of our ATI rn50
driver (which uses map-in, too, to get the register base address).
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
According to the IEEE 1275 PCI bus binding, the config space address for the
config-xx access functions should also always contain the bus-device-function
numbers (i.e. "my-space"). The SLOF code behaved different so far by adding
my-space during the config-xx words instead. This of course caused problems
when running FCODE that expects the IEEE 1275 behaviour.
The config-xx functions have now been changed to automatically detect the
required behaviour: If the caller supplied a bus-device-function number, we
do not add "my-space" in these functions anymore.
However, our pci-bridge code for the AMD 8111 abused the old behaviour by
accessing multiple devices+functions without specifying the full unit address.
So for this device, special config-xx functions have been added to work-around
this problem.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
This driver can be used for downloading files via e1000 compatible NICs.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
The bcm57xx driver is a normal part of the SLOF firmware, so it does not make
sense that it resides in the other-licence directory. Moved it to a new
directory called "drivers" now.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
Populate the PCI device tree nodes with additional properties and words, and
provide enough of the SLOF PCI framework to be able to use the nodes with our
device specific drivers.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Replaced "make" by "$(MAKE)" to be able to built in parallel, fixed
the indentation of some rules and removed some unused targets.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
GCC 4.6 complains about unused-but-set variables - which can safely be removed
in our cases.
Also fixed a strict-aliasing problem in rtas_flash.c of board-js2x.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
Since the biosemu code is optional, the config file now determines its
availability automatically.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
Cleaned up the toc-relative assembly of net-snk, fixed the Makefiles, save the
modules as ELF files instead of raw binaries, adjust the net-snk base address
and the load-base variable... a lot of changes were required to make the net-snk
and the snk modules relocatable, too. But now it should be possible to relocate
all files so that the firmware also runs with less than 256 MiB RAM.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
It's cumbersome to maintain code twice, in Forth and in C, and now that libelf
has a new important feature (relocation), I removed most of the old Forth
functions for ELF loading and use the libelf everywhere instead.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
Split elf.c into elf32.c and elf64.c for better readability. Added relocation
code to libelf for 64-bit ELF images, modified the Paflof Makefile to link
the executable with relocation information and load Paflof now to the upper
end of the memory.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
Silenced a compiler warning that was easy to fix.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
Added a new board for SLOF running on KVM/qemu.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
There is a file called timebase.fs in the common code folder already, so there
is no need to duplicate the delay functions in the board directories, too.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|