| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Add parse-nhex word reusing existing parse-ints and use that in
parse-hex instead of an independent implementation. The parse-nhex
name matches Apple OF, while SLOF calls the same operation
hex-decode-unit so adding this word increases compatibility with other
OF implementations.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
| |
Some device trees can contain large chunks of binary data that result
in .properties output to get lost in the dump of all binary bytes. Put
an upper limit of the bytes dumped.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
| |
OpenBSD uses the addr word to retrieve the address of several framebuffer
variables during initialisation. Provide an implementation of addr which
allows OpenBSD to initialise the framebuffer correctly on SPARC32 and SPARC64.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
To help reading property listing also format assigned-addresses
property the same way as reg was already formatted.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
|
|
|
|
| |
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables disk drivers to call the dma-* words as required by the
specification, and in particular fixes the failing dma-alloc warnings
emitted by NetBSD PPC on boot.
Note that we also add these methods to any partition/file packages via a
new is-call-parent helper word to ensure that the dma-* words are
available at all levels of interposition.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
Whilst there is an existing implementation of dma-alloc, it is currently unused
so we can make this change now.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
This is a Sun-specific service which is only enabled for the SPARC64
architecture.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
| |
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The IEEE-1275 interpose specification suggests that interposed packages should
not be visible unless an interpose-aware Forth word is used.
Commit 247c6169 "Fix for interpose problem" realised this by converting the romvec
obp_inst2pkg() function over to use ihandle>non-interposed-phandle but didn't make
the same change to the equivalent CIF call instance-to-path (which is presumably
correct since the interpose specification also states that interposed packages are
only visible to a new instance-to-interposed-path CIF call).
Here we add a new instance-to-package word as a wrapper to
ihandle>non-interposed-phandle and update obp_inst2pkg() and instance-to-path to
use it accordingly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
| |
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the fw_cfg interface provides a MacOS VGA PPC NDRV binary driver then
install it into the "driver,AAPL,MacOS,PowerPC" property of the QEMU VGA
package.
The installation of the binary is configured via the NVRAM configuration
variable "vga-ndrv?" (which is set to true by default for PPC) and also the
presence of the NDRV binary driver file within the QEMU fw_cfg interface
itself.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some versions of Solaris assume that the foreground color is stored in palette
index 255 and the background color is stored in index 0. Make sure we do the
same otherwise the Solaris video driver picks the background color for console
text which ends up being invisible.
Note that this already matches the default palettes in cgthree.fs and tcx.fs
which were obtained from Sun documentation.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
Loops in Forth are described using a limit and start value. Fix the limit so
palette entry 255 is actually set.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
| |
Signed-off-by: Edward Betts <edward@4angle.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
| |
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
| |
Add an (arch-go) hook for architectures that need to do their own thing before
starting an image, and switch the callers over to use it.
Also clarify the state-valid check: any non-zero value is considered true.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
This is in case we need to pass elf-boot parameters into the client
executable.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
The per-arch context is held via __context, so what we hold here is
effectively just information about the last loaded file.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
| |
Old OS X bootloaders need this in order to execute without throwing an
exception.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
| |
Otherwise the Forth intepreter fails due to lack of buffer space when
trying to execute large boot scripts on platforms that use CR instead
of LF for line endings (particularly MacOS 9).
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Cormac O'Brien <cormac@c-obrien.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an evaluate string is split across a newline, the current string
position is assumed to be the top-most item on the stack. However
in the case of yaboot, items are left on the stack to be used by a
subsequent line within the same evaluate statement and so subsequent
lines are parsed incorrectly.
Fix this by saving the current string position on the r-stack across calls to
(evaluate) so the stack remains correct for subsequent lines.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
| |
The OS 9 boot loader uses the r-stack outside of a word in interpret mode.
Provide an r-stack implementation which allows r-stack accesses in
interpret mode using a separate pseudo stack.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
|
|
|
|
|
|
|
|
|
| |
interpreter
This allows us to optionally intercept and execute code before returning back
to the Forth interactive console.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1383 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
| |
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1380 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Solaris 9 relies on an undocumented feature that calling "child" with
a NULL phandle is equivalent to using the phandle of the device tree
root node.
Make sure that we emulate the same behaviour to avoid a crash when
dereferencing a NULL pointer.
This patch fixes Solaris 9 boot on SPARC32 and is based upon a
proof-of-concept patch submitted by Artyom Tarasenko <atar4qemu@gmail.com>.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1328 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
| |
SPARC64 *BSDs accidentally call test-method with an ihandle rather than a
phandle which causes OpenBIOS to crash. Work around this by checking to
ensure that the phandle exists within the tree before trying to use it.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1297 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
| |
Now that all platforms have at least some implementation of get-msecs we can
just call it in order to implement the milliseconds service.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1291 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
| |
Rather than mess with [IFDEF]s, just have one implementation which falls back
to a simple incrementing dummy counter if a pointer to a real counter hasn't
been configured.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1290 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
| |
This is currently based upon the %tick register, although at some point it
should be moved to a per-CPU timer.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1289 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bring the bootcode loader in line with all of the other existing loaders,
making use of our new get-bootcode-info word to pass the parameters instead
of creating global variables for them all.
Here we remove all global variables and references to the fixed load address
used by the quik bootcode loader as this is handled by get-bootcode-info. This
exposes a minor bug where we need to return success as soon as a valid
bootcode is detected; otherwise we inadvertently drop into the filesystem
detection code which is invalid.
Based upon a patch by Andrei E. Warkentin <andrey.warkentin@gmail.com>.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1280 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
obp_nextprop(node,name) calls the Forth word "next-property" then pops the
result. "next-property" should therefore always return something:
* A string when the property provided is not the last one of the node.
* Zero when the property provided is the last one of the node.
* Zero when the property provided does not exist in the current node.
Previously, next-property returned nothing when the property didn't exist.
"next-property" behavior with last and nonexistant properties differs
between implementations of OF.
This problem was found with NetBSD on Sparc32. It ennumerates peripherals
when starting X11 and asks for the "name" and "device_type" property of many
nodes, including some which have neither "name" nor "device_type" properties.
Signed-off-by: Olivier Danet <odanet@caramail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1272 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously nextprop would always write a 0 length string to the output buffer
before calling the underlying property words, with the assumption that this
would be the default return value in the case of an error.
MorphOS breaks this assumption by specifying buf == prev when calling nextprop
which caused the prev value to be overwritten before it could be used, and so
nextprop would always return an (error) exit code of -1.
Fix nextprop so that the 0 length string is only written into the output buffer
when an error exit code of -1 or 0 is returned, as per the IEEE1275
specification. As reported by BALATON Zoltan <balaton@eik.bme.hu>.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1271 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
|
| |
Switch obp_ticks over to be a pointer to the counter rather than its value, then
point this to the contents of a new Forth obp-ticks variable. This allows a
simple get-msecs word to be implemented for SPARC32 which simply reads the value
of the obp-ticks variable and places it on the stack.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1264 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
| |
As per the IEEE1275 specification, end0 should set fcode-end to true in
both FCode evaluation and execution modes.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1253 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
|
|
| |
If invalid FCode has been executed, the FCode interpreter may have exited
whilst still in compile mode, causing OpenBIOS internals to become corrupted.
Detect this condition and switch back to immediate mode to prevent subsequent
random internal errors within OpenBIOS.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1252 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
| |
Currently it is only compiled for PPC, but at least *BSD on SPARC64 try to
make use of it too.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1251 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
| |
Change the SBus logic so that we first probe each slot and attempt to execute any
FCode if present. Only if no FCode is found do we fall back to the internal
(hardwired) device node generation.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1223 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
| |
Add hooks for hardware specific fault handlers for the peek and poke commands.
Signed-off-by: Bob Breuer <breuerr@mc.net>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1219 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
| |
Since all of the colour state is now held in Forth, remove the hack
that was video_set_color(). Anything that needs to change the pallette
(including MOL) can just call "color!" on the driver package.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1216 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
|
| |
Finally we can now fix up setup_video() so that it has no knowledge of fixed
addresse but simply refers to the underlying Forth variables as per the
specification. Touch up various places as a result of this, but we can now
remove the bogus openbios-video-addr and just use frame-buffer-adr instead.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1215 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This means we can remove this code from vga_vbe_init() and move it
in to the generic display system. As part of this, we alter the
"input" and "output" words so that they update the stdin/stdout
handles under /chosen.
While we are here, fix up the various architectures so that they
don't call "input" and "output" themselves - this is now handled
by the Forth console.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1210 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This now leaves just the MOL code in packages/molvideo.c and so now we no
longer have a mixture of MOL and non-MOL methods in this packages. As a
result of this, we can now conditionally build molvideo.c only if CONFIG_MOL
is defined.
(Note: I have no way of testing this as I gather that OpenBIOS was pulled from
MOL due to compatibility issues at some point in the past. Perhaps one day
someone will try and update and see what happens?)
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1206 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Annex B.2 of the IEEE1275 specification mentions that this code moves the
cursor one position to the left on the current line (i.e. it shouldn't
attempt to redraw any characters).
Remove the character redraw code to bring in line with the specification
which also has the side-effect of fixing the spinner used by quik.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1198 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
|
|
| |
NULL is defined as a no-op, so make sure that we detect it and exit (term-emit)
immediately. Otherwise we fall through to the default code which redraws the
character and advances the column by 1.
This fixes the staggered line output that appear in quik.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1197 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
| |
When processing a control code, make sure we exit (term-emit) immediately
rather than falling through to the end of the function. Otherwise we still
call draw-character and advance the column as per normal character codes.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1196 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that the second half of the display rework is complete, the qemu-video-*
words are no longer QEMU-specific. This is because we now initialise the
defaults to the value of the VGA_DEFAULT_* constants and only attempt to
override them with the values supplied by the QEMU firmware interface if
built with CONFIG_QEMU enabled.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1195 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
| |
These words always output to the debug (serial) port even if video mode is
enabled. This makes debugging the video routines much easier when starting
QEMU with the -serial stdio option.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1189 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead if having a large #ifdef .. #endif section in video_set_color(), move
the device-specific hardware setters into each display device package.
To do this, we keep track of the display ihandle in the video structure and
use it to invoke the low-level hardware setter routine (and optional palette
refresh) if required.
Also since the display-ih isn't called until is-install, defer the colour
palette initialisation from init_video() to is-install.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1184 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Leave per-device work in init_video() for the moment.
As part of this commit we fix up switch-arch so that CONFIG_QEMU works for
SPARC32 - if we are given the framebuffer information via the QEMU firmware
interface we use it. Otherwise fall back to the values of the VGA_DEFAULT_*
constants.
This commit requires a corresponding patch for QEMU as currently the
framebuffer width/height are not passed via the firmware interface for
SPARC32.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1182 f158a5a8-5612-0410-a976-696ce0be7e32
|