Commit Graph

30 Commits

Author SHA1 Message Date
Edward Betts 35db803f25 Fix spelling mistakes
Signed-off-by: Edward Betts <edward@4angle.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2017-02-10 13:29:12 +00:00
Mark Cave-Ayland c5542f226c libopenbios: remove address parameter from start_elf()
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>
2016-09-11 12:53:50 +01:00
Mark Cave-Ayland 0d405091db elf: set boot notes in elf_load() if supplied
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>
2016-09-11 10:32:17 +01:00
Mark Cave-Ayland f275232fd4 amd64: introduce arch_init_program() implementation
And switch start_elf() over to use it.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-09-11 10:32:17 +01:00
Mark Cave-Ayland 871ade5668 all: create client program context once at startup
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>
2016-09-11 10:32:17 +01:00
Mark Cave-Ayland 7d046816c9 Ensure saved context pointers in switch_to() for all archs are marked as 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>
2016-07-08 22:28:40 +01:00
Hervé Poussineau bea5edba95 ide: change ob_ide_init() to take usual control base addresses
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
2014-01-13 08:57:51 +00:00
Mark Cave-Ayland d66a99db5f libopenbios: move console selection from compile-time to runtime
Some architectures require different console configurations depending upon the
machine type. This commit moves the console handlers into a struct _console_ops
structure held within libopenbios and switches all our supported architectures
over to use it.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
CC: Andreas Färber <afaerber@suse.de>
CC: Hervé Poussineau <hpoussin@reactos.org>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1230 f158a5a8-5612-0410-a976-696ce0be7e32
2013-10-25 10:38:08 +00:00
Mark Cave-Ayland c1e9917aeb x86/SPARC64/PPC/amd64: switch VGA driver over to FCode
Currently we cannot read the FCode from the card, so for the moment simply
execute the bytecode directly.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1194 f158a5a8-5612-0410-a976-696ce0be7e32
2013-07-27 11:22:06 +00:00
Andreas Färber c3b33b6610 Introduce forth_init() for trampoline initialization
Use init_trampoline() for trampoline variable initialization.

Add calls to a new forth_init() function for each architecture
to invoke it. Idea courtesy of Blue.

This fixes ppc64 compilation by avoiding a casted self-reference.

v2:
* Share init_trampoline() with kernel/bootstrap.c, suggested by Mark.
* Adopt QEMU coding style for new functions.

Cc: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Acked-by: Blue Swirl <blauwirbel@gmail.com>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@954 f158a5a8-5612-0410-a976-696ce0be7e32
2010-11-13 13:04:34 +00:00
Blue Swirl 9daf539c27 Fix Unix target build
Move sys_info to load.c to make it also available on Unix build.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@826 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-01 11:03:45 +00:00
Igor V. Kovalenko 2d74db1de3 Commit revised version of Igor Kovalenko's patch for detecting whether dictionary allocations have overrun the memory
buffer allocated for them.

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@741 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-12 20:02:53 +00:00
Mark Cave-Ayland 9661f91432 Create an initialisation function called openbios_init(), similar to modules_init(), for use by libopenbios and make sure all
architectures are updated to use it. This is required to allow binding of C functions into Forth by libopenbios (i.e. cross 
architecture) rather than having to update everything in every arch/*/ initialisation file.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@725 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-02 11:41:35 +00:00
Mark Cave-Ayland 1264ad95d2 Create a brand new ELF loader based upon arch/*/elfload.c and libopenbios/elfload.c combined together in libopenbios. This means
that each arch no longer needs its own ELF loader implementation.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@710 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-27 10:57:03 +00:00
Mark Cave-Ayland 8a6d445d38 Introduce the concept of the OF saved-program-state structure and modify all of the loaders (except PPC) to make use of it.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@708 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-26 21:17:32 +00:00
Mark Cave-Ayland d66540542d Remove loadfs.c and loadfs.h from all of the various architectures. They appear to be almost non-existent wrappers which add an
extra layer of indirection without much benefit.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@707 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-26 20:25:04 +00:00
Mark Cave-Ayland 553344a5da Change the location of the function prototype for collect_sys_info() so that it both works for x86 and is the same location as
for the amd64 build.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@703 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-17 22:20:12 +00:00
Mark Cave-Ayland 92f8310ff7 Split nvram.h into its proper two components - one for the arch-specific functions and another for the package functions.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@698 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 20:34:01 +00:00
Mark Cave-Ayland 1dbe55b8e4 Move the basic OpenBIOS configuration header files from include/openbios to include/.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@695 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 17:19:58 +00:00
Mark Cave-Ayland 02896c11fd Move the a.out, ELF and XCOFF header files down into include/arch/common.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@694 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 17:06:20 +00:00
Mark Cave-Ayland f84dd73af4 Fix the sys_info.h header file so it doesn't reference functions both inside and outside of libopenbios, and move the firmware
configuration header file to include/arch/common. Following through the code showed that elfnote.c and linuxbios.c were being 
used by sys_info and so these are also renamed to elf_info.c and linuxbios_info.c for clarity.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@693 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 16:09:44 +00:00
Mark Cave-Ayland 4a2c065e4f Move the libopenbios header files into include/libopenbios to synchronise with the code directory structure.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@691 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 15:05:53 +00:00
Mark Cave-Ayland c112720b01 Move the kernel header files into include/kernel to synchronise with the code directory structure.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@689 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 14:21:02 +00:00
Mark Cave-Ayland dbf16392cc Refactoring of the OpenBIOS source code, as discussed on the mailing list. The primary aim of this process is to try and arrange
the source files into a structure whereby it is easier to find the relationship between a forth package word and its C 
implementation, while also creating a libopenbios library into which more common code from the arch/ tree can eventually be 
moved.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> 


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@685 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-13 10:58:19 +00:00
Blue Swirl edafcf6e86 IDE fixes for PPC (Laurent Vivier)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@292 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-20 14:48:40 +00:00
Blue Swirl a757800a01 Remove unnecessary trailing newlines
git-svn-id: svn://coreboot.org/openbios/openbios-devel@285 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-13 09:26:41 +00:00
Blue Swirl 58ca864765 Delete extra whitespace at the end of line, which annoys quilt
git-svn-id: svn://coreboot.org/openbios/openbios-devel@284 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-11 20:30:53 +00:00
Blue Swirl c77259ec3a Change uses of sprintf to snprintf
git-svn-id: svn://coreboot.org/openbios/openbios-devel@277 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-30 13:44:38 +00:00
Stefan Reinauer 2eaec36c50 drop io from bootstrap and exception stuff from non-bootstrap compiles.
git-svn-id: svn://coreboot.org/openbios/openbios-devel@28 f158a5a8-5612-0410-a976-696ce0be7e32
2006-05-22 22:36:01 +00:00
Stefan Reinauer 5c9eb9b45b initial import of openbios--main--1.0--patch-26
git-svn-id: svn://coreboot.org/openbios/openbios-devel@1 f158a5a8-5612-0410-a976-696ce0be7e32
2006-04-26 15:08:19 +00:00