Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
obp_dumb_mmap() needs to call ofmem_map() rather than the low-level
ofmem_arch_map_pages() function otherwise the specified area is mapped directly
on the CPU without being recorded in the relevant memory node properties.
This fixes Solaris 2.6 which uses obp_dumb_mmap() to map the kernel msgbuf and
would otherwise trap on boot as the mapping was lost once the kernel had taken
over memory management from OpenBIOS.
While we're here, add a missing DPRINTF() to obp_dumb_mmap() and provide the
corresponding obp_dumb_munmap() implementation.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Currently all PCI devices except display devices are initialised with
simple open and close words that are effectively a no-op, but enable
the device to be accessed.
Unfortunately this means that if devices have custom open and close words
then the existing ones are overwritten causing OpenBIOS to emit warnings
such as "open isn't unique" on the console.
Resolve this by defaulting all PCI devices to the empty PCI node template
ob_pci_empty_node and then adding the simple open and close words after
the device has been initialised if they do not already exist.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Implement fw-cfg-read-file Forth word as a simple wrapper around
fw_cfg_read_file().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
These allow OpenBIOS to locate fw_cfg files by name and then read
them via the fw_cfg interface.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This is in preparation for calling fw_cfg_read_bytes() separately when
reading data from the fw_cfg interface.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
The current PCI implementation is designed for a 32-bit PCI bus. When
a 64-bit BAR is encountered during PCI bus enumeration, currently we
treat the MSB BAR the same as a standard 32-bit BAR, attempting to guess
its size by setting to 0xffffffff and reading back the response which
returns back an invalid size of 0 and fails.
This has the effect of setting the MSB BAR to 0xffffffff meaning that
64-bit BARs are mapped at the top of PCI memory in the wrong location.
Handle this case by ignoring the MSB BAR when we detect a 64-bit BAR
leaving it at its default value of zero. This solves the issue by
ensuring that all 64-bit BARs are mapped within 32-bit PCI space which
is fine for the PPC/SPARC64 machines we care about.
Most noticeably this solves the issue of virtio modern devices (which
use 64-bit BARs under QEMU) causing a kernel panic upon startup on
qemu-system-sparc64 because they are mapped at the wrong address by OpenBIOS.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Early versions of MacOS X don't correctly set the partition status flags when
creating the OS partition. Relax the status flag checks so they are only applied
to CHRP partitions which allows us to both meet the intention of the CHRP
specification and also enable OpenBIOS to boot OS partitions from OSs such as
MacOS X DPs.
With thanks to Steven Troughton-Smith <steve@highcaffeinecontent.com> for the
in-depth investigation.
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>
|
|
Only the first CPU shall clear the RAM.
Signed-off-by: Olivier Danet <odanet@caramail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
SparcStation 5 can only use one CPU.
Signed-off-by: Olivier Danet <odanet@caramail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Milax (OpenSolaris) checks to see if this is the case, and panics on boot
if the E bit isn't set for PROM mappings.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Milax (OpenSolaris) expects the RTC to be mapped by the PROM and faults
on boot if the mapping is not present.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
These perform reads using the given ASI and are used by the Milax
startup code.
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 when trying to boot Milax with a debugger we run out of
memory.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Debugging under kmdb is constantly switching context upon entry/exit which causes
a lot of noise on the console.
This matches all other archs which don't emit a similar message upon switch.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
During I/D MMU traps, the CPU switches to the alternate memory globals. Hence
we must manually switch to the original globals when saving/restoring state.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
This means we can remove the client_tba hack in the CIF prologue and
also use the full SAVE_CPU_STATE() macro for entry.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
64-bit Solaris appears to overflow in its memory list calculations if the
entire virtual memory space is represented in the available memory list.
Enforcing the upper limit from the previous patch enables 64-bit Solaris
9 boot to get beyond the "VAC too big!" error message upon boot.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Comparing with real device trees, the maximum virtual memory address
available for allocation on sun4u machines is 0xff000000.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
In preparation for applying the ofmem_arch_get_virt_top() restriction to the
virtual memory region, fix up the calculation of the available list tail plus
increase the virtual memory region to cover the IO memory.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Part of commit 070ea60 created a new stack within the virtual image for use by
the startup context. Unfortunately the current implementations of virt_to_phys()
as used by some drivers are incorrect which causes issues with some parts of
OpenBIOS, notably the USB stack.
Revert back to using the initial stack in start.S which ensures a 1:1 mapping
between virtual and physical addresses to avoid such problems.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
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>
|
|
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
The displayed output is only correct after a valid load, and so with
subsequent enter/exits the information is noisy and actually wrong.
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 previous context patch series accidentally omitted adding __context
to openbios-unix causing a link failure.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Now that each loader sets up its own context, there is no need to pass
in the address or set up the context ourselves.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Now that each loader sets up its own context, there is no longer any need
for conditional logic in go().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
load should place the file at load-base, whilst init-program should parse
the memory at load-base and set up the context accordingly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
load should place the file at load-base, whilst init-program should parse
the memory at load-base and set up the context accordingly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
load should place the file at load-base, whilst init-program should parse
the memory at load-base and set up the context accordingly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
load should place the file at load-base, whilst init-program should parse
the memory at load-base and set up the context accordingly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
load should place the file at load-base, whilst init-program should parse
the memory at load-base and set up the context accordingly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
load should place the file at load-base, whilst init-program should parse
the memory at load-base and set up the context accordingly.
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>
|
|
Also fix up the incorrect x86 prototype which is missing the volatile qualifier.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Since the client context is now set by arch_init_program(), start_elf() and
start_client_image() are now identical so the latter can be removed.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Since the parameter is now already available to arch_init_program(), there is
no need to supply it separately to start_elf().
Remove the second parameter and fix up the callers, including standardising
the prototype of start_elf() across all architectures.
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>
|