Age | Commit message (Collapse) | Author | Files | Lines |
|
Create the missing address property for the PC serial keyboard, otherwise
pc_kbd_open() will dereference a NULL pointer when opening the serial keyboard
device.
Similarly fix up the reg property to match the PC serial port which appears to
give values matching those found in SPARC64 device trees.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1293 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Create the missing address property for the PC serial port, otherwise
pc_serial_open() will dereference a NULL pointer when opening the serial port
device.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1292 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
|
|
This is in preparation for a get-ms implementation for SPARC64.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1288 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
As we are attempting to emulate a 100MHz CPU, then in order to get a 100Hz
timer interrupt the cycle interval needs to be 1MHz and not 10MHz.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1287 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This is now handled by the section of code preceding it.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1286 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Make sure that we always compile the OFMEM_TRACE macro regardless of whether
CONFIG_DEBUG_OFMEM is set, similar to the way in which the DEBUG macros work
in QEMU. This relies on the fact that the compiler optimiser will work out
that the compile-time "if" test is always true/false and optimise the result
out if is it not required.
This ensures that we always get proper debug argument checking and means that
certain sections of code don't keep giving unused variable warnings when they
only appear in debug codepaths.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1285 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
If a client tries to free a memory range that lies within one we have already
allocated (and doesn't match exactly), split the range so that we able to just
free the part of the range requested by the client.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1284 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
It was mistakingly indicating ofmem_claim() as the source function rather than
ofmem_claim_phys().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1283 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Display the values in lower-case hex to match the rest of the debugging code.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1282 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Rework the algorithm used in remove_range_() in order to make it similar to
the algorithm used in unmap_pages(). This has several benefits: in particular
the unmap_pages()/remove_range_() functions now have the same behaviour, the
code is noticeably simpler, and it also correctly handles the case where the
start address of the range to be removed doesn't match the range exactly (such
as occurs when attempting to boot NextStep under SPARC32).
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1281 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
|
|
This is an intermediate step in preparation for allowing %BOOT to read its
load/entry addresses from the partition header, based upon an original 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@1279 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
If a partition was opened with a file argument such as "hd:2,\\:tbxi" and
no valid filesystem was detected, mac-parts would still attempt to access the
file system in order to evaluate the file argument resulting in a hang.
Make sure that we return a failure code to the caller to ensure that OpenBIOS
doesn't continue to try and access the file when the underlying filesystem is
invalid. As reported 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@1278 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Make sure that we display the entire 32-byte buffer result buffer when nextprop
returns. Based upon a test patch sent to the mailing list by Olivier Danet.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1277 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Change model name to one which is similar but supported by MorphOS and
better matches the emulated CPU.
This should be safe to change as the two models are very close and
unlikely to cause problems with other OSs but more testing is welcome.
Signed-off-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@1276 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Signed-off-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@1275 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Signed-off-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@1274 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
The handle_calls() function was accidentally using the client-call-iface return
value instead of the catch wrapping the underlying call.
Return the correct catch result, and while we're at it add some extra logging
to indicate when we've detected an error condition.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1273 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
|
|
The class-code property of PCI devices should also include the prog
interface field. This patch adds this.
Signed-off-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@1270 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
It seems that the obp_dumb_memalloc() function can be called with va == 0
which means that OpenBIOS should pick the next free virtual address itself.
Otherwise we end up accidentally mapping into zero page causing all sorts of
problems.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1269 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
NextStep appears to request an alignment of 4 for some of its large memory
ranges, and since this is an exact power of 2 then the code to ensure a
minimum alignment of PAGE_SIZE is accidentally bypassed. Move this to a
separate check so we can guarantee the minimum alignment requirement is always
observed.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1268 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
During NextStep boot, all the virtual memory is probed so freed memory must be
properly unmapped.
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@1267 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
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@1266 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
NextSTEP's bootloader for Sparc32 expects that the 32 bytes a.out header
is copied just before the start address.
Since this is a compatibility hack for an implementation detail of OBP then
implement the functionality within a #define AOUT_HEADER_COPY section so
it can easily be removed if people really need a strictly compliant firmware.
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@1265 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
|
|
romvec.pv_ticks is a pointer to an 'uptime' counter, calibrated in
milliseconds.
We use the [1st] CPU timer, running at 100Hz, to increment (+10) the counter.
This counter is used by NextStep to measure the 10 seconds delay during boot,
when asking about boot options.
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@1263 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Soon we will need to use the get_psr() and put_psr() functions, however the
header file needs some tidying up first. Here the extern C functions are
redeclared as static inline functions, and the __ASSEMBLY macro correctly
set across the relevant .S files to allow compilation to succeed as normal.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1262 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
SparcStation 5 has 1 timer and 1 per-cpu interrupt controller.
SparcStation 10/20 has 4 timers and 4 per-cpu interrupt controllers,
independently from the number of CPUs installed.
Timer and interrupt controller properties are set accordingly. This
is what Sun's OpenBOOT does and having only 1 timer/interrupt declared
on SS5 is necessary for NextSTEP.
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@1261 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Because name does not exist!
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@1260 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
* SS10/20 use 36bits addresses.
When mapping peripherals, bits [35:32] are not always tied to 0.
* The probe-set-sbus forth word expects hex numbers for slots.
SS5 uses slots 0 to 5, whereas SS10/20 uses the slot 0xF,
and triggers the bug.
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@1259 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
The keyboard property should be empty.
NetBSD accesses the keyboard property in 'kernel/arch/sparc/dev/zs.c' and
checks this :
(prom_getproplen(zsc->zsc_node, "keyboard") == 0)
...which is true only when the property exists but has no value. It
matches Sun's OpenBOOT behavior.
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@1258 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Previously we would try and set safe values for the romvec properties list
rather than calculating them. This should provide older clients with a more
accurate representation of the memory areas they are allowed to use.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1257 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
The go word should just execute the current program context, otherwise the
romvec contents will get altered if called by a client.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1256 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Not only does this match the behaviour of the other routines, but it also
fixes a bug whereby the first free physical memory location was 0x0 and
so page zero was being returned for use by SUNW,retain clients. Due to the
way in which PCI/ISA devices are mapped in QEMU (e.g. IDE ioports) then
clients could inadvertantly start writing to device registers.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1255 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
The FCode start address was set to bypass the FCode header rather than just
executing the first word which does this automatically (and may even one
day verify the payload contents/length).
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1254 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
|
|
Clients that incorrectly requested too many return arguments for a client
interface call could cause a Forth stack underflow (this was discovered due
to a bug in NetBSD SPARC64).
Ensure that we can never POP() beyond the original position of the stack from
before the client interface call.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1250 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@1249 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
On PReP machines, IDE controller is really on the pc87312 Super I/O chip,
but we currently don't detect it.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1248 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
The +2 offset comes from the PCI IDE controllers, where control
status must be accessed at BAR1+2 and BAR3+2.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1247 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Since QEMU 1.7, the OpenBIOS TCX framebuffer FCode ROM is made available to
Open Firmware upon boot. However, this causes a boot failure for people who
use a Sun OBP firmware with QEMU since the FCode throws an exception trying
to access some OpenBIOS-specific variables. This causes an invalid device
node to be created in the tree, causing a crash on boot as reported by Peter
Bartoli and Artyom Tarasenko.
Fix both drivers so that if OpenBIOS is not detected, we fall back to the QEMU
framebuffer defaults of 1024x768x8 which should generate a valid device node
and avoid the crash.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1246 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
specified
The code to interpose ufs-file-system similar to OBP would always interpose the
package if it existed, causing Solaris ufsboot to fail when the package was
subsequently opened on a raw disk device without a filename. Fix the code so that
interposition only occurs when a filename is passed as an argument, which enables
us to complete the load and start executing the Solaris 9 kernel on SPARC64.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1245 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Currently the low-level SPARC entry routine reserves the top of physical RAM
which is also where we happen to store our retained memory structure; because
of the way this memory is mapped, a fault is generated when trying to access
the retained memory area outside of OpenBIOS.
Move the retained area into a static variable for the moment; the existing
routine is unlikely to survive a reboot anyhow but at least we can store the
requested information for analysis later.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1244 f158a5a8-5612-0410-a976-696ce0be7e32
|