Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This enables them to be launched from a native context.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
And switch start_elf() over to use it.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
And switch start_elf() over to use it.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
And switch start_elf() over to use it.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
And switch start_elf() over to use it.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
And switch start_elf() over to use it.
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>
|
|
Make sure that __context points to it to potentially allow state to
be viewed/altered beforehand.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
implementations
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>
|
|
This also requires aligning the CPU context struct as defined in cpustate.h.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This will enable Forth executed in CIF calls to be able to modify its
own context and return.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
A few of the CPU registers were included in the *_WINDOW_STATE macros.
Split them out so that they can be used on their own without altering the
window state.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Use the new macro in places where an empty register window set is required.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Otherwise we end up in the wrong trap level after saving the CPU
state.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This is because some loaders expect to be able to resume execution at an
alternative location by altering %pc from within Forth.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Since we switch to a separate stack when entering the CIF, store the globals
at known offsets beneath it. This saves having to alter the stack pointer
during CIF entry.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Make sure that the whole CPU state is saved/restored during switch_to()
to enable a clean context switch and return. Since we have this logic we
can also re-use it for initial entry into OpenBIOS.
Finally also update context.h to reflect the new CPU state stucture.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
If we are running on an Apple PPC platform, enable bus mastering for this card.
This is because it seems that Apple's OF implementation enables bus mastering
for rtl8139 cards by default with the result that several drivers forget to
explicitly enable it, causing them to fail under QEMU.
This has been reported necessary for various rtl8139 drivers under OS 9,
OS X and MorphOS.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This is taken from a patch submitted earlier by BALATON Zoltan <balaton@eik.bme.hu>.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This will activate the bus mastering bit for the device represented by the given
PCI configuration.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
It seems that the VGA option ROM isn't mapped on SPARC64 which causes
a fault upon access.
Temporarily handle this by surrounding the code in #ifdef CONFIG_PPC
guards until the proper solution can be implemented.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
For some reason the HFS+ code will ignore the startup folder chosen by the user
and force the OS 9 startup folder if it exists. This can break OS X installations
with Classic, making it impossible to boot back into the OS.
Removing the code to force the use of the OS 9 startup folder allows switching
the startup disk between OS 9/OS X using the Disk Startup Utility in each OS
as expected.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Switch arch didn't get the right long size
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Some old bootloaders specifically look for the keyboard device via the
kbd alias, so add this to keep them happy.
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>
|
|
They are created by the MacOS ROM and in some cases MacOS X to contain
the *virtual* addresses of the BARs as mapped by the kernel.
Having these already there with the wrong values causes the hangs
with MacOS X 10.5 and the video driver.
The reason is that the IONDRVFramebuffer code in OS X 10.5 won't replace
those properties if they already exist, so the driver ends up accessing
the addresses put in there by OpenBIOS which aren't valid mapped virtual
addresses under OS X.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This fixes this warning (which escalates as an error):
roms/openbios/libc/string.c: In function ‘strdup’:
roms/openbios/libc/string.c:353:4: error: nonnull argument ‘str’ compared to NULL [-Werror=nonnull-compare]
if( !str )
^
cc1: all warnings being treated as errors
rules.mak:122: recipe for target 'target/libc printf("stdout is %s\n", stdout->name);
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
We currently overwrite the escc aliases with legacy ones.
This causes us to use a legacy one as a stdout path.
Linux doesn't parse the legacy ones very well causing problems detecting
the default serial console when using a mac model with a serial console.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
When CONFIG_SERIAL_PORT is 1 we use port B otherwise port A
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
The legacy addresses were incorrect for both ports, fix them.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
The ROM is not on BAR 1 but BAR 6, I'm not sure what that code ever
did, Qemu uses BAR 6, and I think MOL does too.
Additionally, support using a raw PEF binary without a made up
header.
Eventually we need to support f-code from the ROM but that is not
for today.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
The main IDE interrupt and the PCI LSIs are level sensitive
which is represented by a "1" in the device-tree.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
The COPYING file is in the main directory, not in the
Documentation folder.
Signed-off-by: Thomas Huth <thuth@redhat.com>
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>
|
|
A recent attempt to restrict the use of rfi on 64bit cpus in qemu
broke 32bit OpenBIOS when run under a 970.
This patches memory to replace rfi instructions with rfid in the
vector code.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Suggested-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
volatile
As discovered with the previous ppc patchset, the saved context pointer must be
marked as volatile, otherwise the compiler may decide to optimise away saving
the pointer to the local stack.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Solaris 9 installs its root filesystem into the first logical slice rather than
the first physical slice on the disk, so add disk:a to boot-device to attempt
a boot from the first logical slice before falling back to the first physical
slice as before.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This makes it possible to define a Forth structure in future that can access
the contents of either context directly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Separate out the context switch code into a separate file, similar as to how
is already done with the other architectures.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
The current code always picks slot 0 in the reuse case. (This doesn't seem
to matter in the cases I've tested, though.)
Signed-off-by: Alyssa Milburn <fuzzie@fuzzie.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|