Commit Graph

56 Commits

Author SHA1 Message Date
Andreas Färber
ce371d6307 ofmem: CIF release preparations
Add an ofmem_release() function and stub out the implementation.

Hook it up for ppc and sparc64.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@938 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-31 15:12:01 +00:00
Andreas Färber
380cd335cc Don't assume that pointer and cell size are identical, part 1
On ppc64, cell size is 32 bits but pointers are 64-bit.
Thus, direct casts result in warnings, treated as errors.

Use [u]intptr_t cast or cell2pointer and pointer2cell macros as necessary.

v2:
* Drop changes related to physical addresses since physical addresses may be
  wider than pointers (e.g., 36 bits on sparc32, as pointed out by Blue).
* Drop changes to cell2pointer() and pointer2cell() for now.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@922 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-25 20:48:45 +00:00
Andreas Färber
28516584d1 CIF: Fix trace output for claim and release
A misplaced digit 8 made it look as if some signedness issue was present
somewhere between libopenbios/client.c:of_client_interface() and
arch/ppc/qemu/methods.c:ciface_claim(). This is not the case;
despite unsigned long -> ucell -> cell -> ucell conversions,
PUSH'ing 0x81234567 and POP'ing works as expected.

Fix the format string to avoid such confusion.
Add zero-padding while at it.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@921 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-25 19:26:40 +00:00
Mark Cave-Ayland
380f978e45 Fix comment typo from r896 as pointed out by Andreas.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@913 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-17 09:13:14 +00:00
Mark Cave-Ayland
a32ba29f8b Change OFMEM so that the generated available, physical and virtual properties are passed by reference into Forth.
The previous code used the standard set_property() function which copies the new property into the dictionary each time the 
property is set. During OpenSolaris boot, this would cause OpenBIOS to run out of memory due to large number of changes to the 
memory regions.

Now for each property we have a static buffer allocated within OpenBIOS which starts from 2K and doubles in size everytime the 
memory region is exhausted, and set the address directly to the relevant buffer. This saves a great deal of memory and prevents 
the dictionary and internal memory regions from being exhausted during OpenSolaris boot.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@896 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-16 14:02:18 +00:00
Andreas Färber
b3d98a9189 Improve getprop mem dump
Currently the whole buffer supplied by the client is traced.
AIX uses buffer sizes such as 64, 256, 1024 on properties that might
not exist or contain 1 or 8 bytes.

Limit the output to the amount of data actually written into the buffer.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@893 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-09 10:16:29 +00:00
Andreas Färber
47803b04da Fix getprop return value trace
Don't trace the buffer length in place of the property size.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@889 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-09 10:16:19 +00:00
Andreas Färber
59cbed0d8a ofmem: Fix and enable ofmem_claim() trace output
A printk statement was commented out and there were format string mismatches for ppc target.
Use OFMEM_TRACE to more easily enable/disable it and use FMT_ucellx as in other trace output.
Note that this changes the alignment from decimal to hexidecimal notation.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@881 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-03 14:28:12 +00:00
Blue Swirl
b60891b683 Avoid a lot of malloc/free traffic
Each console write caused temporary buffer allocation.

Avoid allocations by changing console_draw_str() to use Forth
string parameters, which are usually readily available.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@872 f158a5a8-5612-0410-a976-696ce0be7e32
2010-09-29 20:30:51 +00:00
Blue Swirl
6cc8774764 console: fix off-by-one errror
The maximum allowed value for x axis is one less than cons.w.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@870 f158a5a8-5612-0410-a976-696ce0be7e32
2010-09-29 17:06:31 +00:00
Andreas Färber
e64c1d7bad Prettify the whitespace placement.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@869 f158a5a8-5612-0410-a976-696ce0be7e32
2010-09-29 16:28:28 +00:00
Andreas Färber
587a78d75b When DEBUG_CIF is defined, a serial message of the form "method(...) = "
is emitted by dump_service(). After successful execution the return value
and a linebreak are emitted by dump_return(). If however the method fails,
nothing is emitted, so that subsequent method calls end up in place of the
return value. Observed for getproplen with AIX.

Emit an error indication and a linebreak when DEBUG_CIF is defined.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@868 f158a5a8-5612-0410-a976-696ce0be7e32
2010-09-29 16:27:42 +00:00
Blue Swirl
7ec1ce2826 Fix x86 target build
OFmem is not available on x86.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@860 f158a5a8-5612-0410-a976-696ce0be7e32
2010-09-06 20:56:52 +00:00
Blue Swirl
c18674a4f7 Claim memory areas used by ELF loader
Can't enable Sparc32 yet, there is no ofmem_claim().

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@858 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-24 19:45:57 +00:00
Blue Swirl
655510e514 Fix load breakage by r828
If a loader succeeds, don't try the others.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@847 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-09 20:41:45 +00:00
Blue Swirl
988f780aa5 loaders: fix open_ih return value checks
open_ih() returns -1 on error and 0 is a valid return value.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@839 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-07 12:49:52 +00:00
Blue Swirl
482249e794 Use standard types
Replace uchar, uint, ulong, u_char, u_int, u_long, u_int* with
their standard equivalents.

Fixes warnings like these on OpenBSD:
 CC    target/arch/unix/unix.o
In file included from ../arch/unix/unix.c:29:
../include/config.h:26: warning: redefinition of `ulong'
/usr/include/sys/types.h:56: warning: `ulong' previously declared here
../include/config.h:26: warning: redundant redeclaration of `ulong' in same scope

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@830 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-01 21:25:08 +00:00
Blue Swirl
626c95da21 Fix Unix target build
Fix build failure:
  LINK  openbios-unix
libopenbios.a(load.o)(.text+0xe0): In function `load':
../libopenbios/load.c:58: undefined reference to `elf_boot_notes'
libopenbios.a(load.o)(.text+0xe8):../libopenbios/load.c:58: undefined reference to `elf_boot_notes'

Move elf_boot_notes variable to load.c to make it also available on
Unix build. Also fix a spurious sys_info variable definition.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@829 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-01 21:15:14 +00:00
Mark Cave-Ayland
f9bdcf050c Rework the OpenBIOS internals so that boot, load and init-program now all use the unified libopenbios loader code with improved
IEEE-1275 spec compliance.

This patch implements the following:

1) Fix bootpath/bootargs handling so that default values are read from NVRAM, and allow multiple space-separated values to be 
specified.
2) With correct bootargs handling in place, move the ELF loader over to the new libopenbios unified loaders.
3) Remove all the loader code from all architecture directories sine we don't need it anymore.
4) Simplify the boot word so it invokes platform-specific code where required, then calls load and go as per the specification.

Tested on all my available images for SPARC32, SPARC64 and PPC, and compile-tested on x86.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@828 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-01 15:13:48 +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
Mark Cave-Ayland
da46f5ab8d Fix the bootinfo loader so that it will correctly accept device strings with no partition id, e.g. load cdrom:,\path\to\file.
Also add a little bootscript debugging for those people that may need it.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@823 f158a5a8-5612-0410-a976-696ce0be7e32
2010-07-31 22:46:00 +00:00
Mark Cave-Ayland
43fe2ac4e8 Move a.out loader into the new C load implementation (also fix up the header includes in load.c).
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@801 f158a5a8-5612-0410-a976-696ce0be7e32
2010-06-27 14:00:37 +00:00
Mark Cave-Ayland
db474e634c Move Forth loader into the new C load implementation.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@800 f158a5a8-5612-0410-a976-696ce0be7e32
2010-06-27 13:14:03 +00:00
Mark Cave-Ayland
78863dfcc9 Switch Forth loader over to using an ihandle rather than a direct path reference.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@799 f158a5a8-5612-0410-a976-696ce0be7e32
2010-06-27 13:06:38 +00:00
Mark Cave-Ayland
3d7832bba9 Implement a basic C loader function in load.c that tries to load each supported executable file format. Now that the ihandle
hierarchy is correct, we can simply pass an ihandle into the loader and it will work correctly regardless of whether it is being 
invoked on an entire disk, partition or individual file.

In order to test the new code, start by switching the Fcode loader over to the new infrastructure for testing on SPARC64. Note 
this patch also contains a correction to load-base on SPARC which was being set to a value other than 0x4000 which is the 
documented default.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@798 f158a5a8-5612-0410-a976-696ce0be7e32
2010-06-25 20:42:00 +00:00
Igor V. Kovalenko
317816c4ba pci: bus scan amendment
- refactor scan procedure to start with PCI host controller
- initiate scan of subordinate PCI bus from PCI host and PCI-to-PCI bridges
- find out PCI subordinate bus numbers and write them to bride devices
- automated assignment of "reg", "ranges", and "bus-range" properties

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@786 f158a5a8-5612-0410-a976-696ce0be7e32
2010-05-27 20:12:11 +00:00
Mark Cave-Ayland
12eab86f39 Move creation of MMU translation property entries into architecture-specific files, rather than in ofmem_common.c. This is because different architectures have
different translation entries described within the OF platform bindings. With thanks to Andreas Färber and Igor Kovalenko.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@772 f158a5a8-5612-0410-a976-696ce0be7e32
2010-05-21 11:07:53 +00:00
Mark Cave-Ayland
389529217e Move the retained magic block to the top of physical RAM and implement code that should do the right thing. Probably needs more
testing though.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@771 f158a5a8-5612-0410-a976-696ce0be7e32
2010-05-03 11:29:38 +00:00
Mark Cave-Ayland
ca0f9c5a03 Commit partial implementation of SUNW,retain for SPARC64 based upon the existing physical allocation routines. I've been unable
to finish the code and test retention after a restart since the OpenBIOS words reset and reset-all don't seem to work at the 
moment. However, it enables OpenSolaris boot to get further in the meantime.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@766 f158a5a8-5612-0410-a976-696ce0be7e32
2010-05-02 19:26:29 +00:00
Mark Cave-Ayland
d183b53338 Promote out of memory messages from debug level to standard console messages. This makes it possible to determine that you've
not allocated enough memory in qemu without having to rebuild with CONFIG_DEBUG_OFMEM enabled.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@763 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-30 21:56:29 +00:00
Blue Swirl
2864f104c5 Fix NULL pointer dereferences, spotted by clang analyzer
Fix clang warnings:
../packages/disk-label.c:83:6: warning: Dereference of null pointer
        if( *s == '-' || isdigit(*s) ||
../libopenbios/elf_load.c:267:5: warning: Null pointer passed as an argument to a 'nonnull' parameter
    memcpy(addr, name, nhdr.n_namesz);

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@752 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-25 12:53:39 +00:00
Blue Swirl
183f3f9b00 Fix dead variable assignment, spotted by clang analyzer
Fix clang warnings:
../kernel/dict.c:289:2: warning: Value stored to 'len' is never read
        len -= sizeof(dictionary_header_t);
../packages/cmdline.c:181:8: warning: Value stored to 'buf' during its
      initialization is never read
        char *buf = ci->buf;
../libopenbios/elf_info.c:126:2: warning: Value stored to 'name' is never read
        name = addr;
../libopenbios/elf_load.c:277:5: warning: Value stored to 'addr' is never read
    addr += pad;
../drivers/ide.c:209:3: warning: Value stored to 'err' is never read
                err = ob_ide_pio_readb(drive, IDEREG_ERROR);
../drivers/ide.c:219:17: warning: Value stored to 'old_cdb' during its initialization is never read
                unsigned char old_cdb = cmd->cdb[0];
../drivers/ide.c:222:4: warning: Value stored to 'old_cdb' is never read
                        old_cdb = cmd->old_cdb;
../drivers/pci.c:103:2: warning: Value stored to 'ss' is never read
        ss = 0;
../drivers/pci.c:100:2: warning: Value stored to 'dev' is never read
        dev = 0;
../drivers/pci.c:212:2: warning: Value stored to 'bus' is never read
        bus = (hi >> 16) & 0xFF;
../drivers/pci.c:953:4: warning: Value stored to 'rev' is never read
                        rev = pci_config_read8(addr, PCI_REVISION_ID);
../packages/video.c:331:2: warning: Value stored to 's' is never read
        s = video.fb.mphys - s;
../packages/video.c:330:2: warning: Value stored to 'size' is never read
        size = ((video.fb.h * video.fb.rb + s) + 0xfff) & ~0xfff;
../fs/hfsplus/btree.c:229:5: warning: Value stored to 'p' is never read
    p = btree_readhead(&bt->head, p);
../fs/hfsplus/volume.c:149:2: warning: Value stored to 'p' is never read
        p = volume_readfork(p, &vh->start_file );

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@751 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-25 12:53:37 +00:00
Mark Cave-Ayland
2f18dff299 Revert r739 since the update translations code only updates the OpenBIOS properties and not the real MMU translations.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@740 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-12 10:03:05 +00:00
Mark Cave-Ayland
35a7ef00a2 Don't try and update the MMU mappings when claiming physical memory. This is probably related to r737 and seems to solve an
issue whereby Forth starts doing strange things just after attemping a claim on physical memory resource.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@739 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-10 11:08:57 +00:00
Mark Cave-Ayland
b265b42d58 Slight correct to r736 so that the number of getprop arguments is correctly displayed.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@738 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-08 21:31:44 +00:00
Mark Cave-Ayland
e5e7d12503 Fix bug when DEBUG_CIF is enabled and getprop is called with nret set to zero. Originally the code tried to use the size
returned from the CIF, but with nret set to zero then the size argument is never pushed onto the stack and so the size would be 
set to whatever junk was left in the argument block. Change the code to use the size expected by the client instead.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@736 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-08 21:19:09 +00:00
Mark Cave-Ayland
a757d43d04 Another couple of client interface fixes:
i) Ensure that the CIF caller's idea of pb->nret is always respected, but if there is a mismatch then log a warning if DEBUG_CIF 
is enabled, then correct the stack and continue.

ii) Correct the code path for call-method and interpret to ensure they ignore the extra status variable pushed onto the stack by 
client-call-iface.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@733 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-03 13:03:39 +00:00
Mark Cave-Ayland
3111a2293b Fix two errors related to argument passing in the client interface:
i) client-call-iface did not set a return value of 0 on success; hence the top stack argument was dropped as part of the status 
check causing an off-by-one error.

ii) instead of setting pb->nret to be the number of arguments returned, the (random) value being passed in was being used to 
control the number of arguments being returned.


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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@732 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-03 08:25:47 +00:00
Mark Cave-Ayland
1b273803c2 The new loader APIs in libopenbios already have routines to detect the type of executable at a given address and react
accordingly. Hence since the loaders are currently written in C, it makes more sense to drop down into C and re-use the same 
code rather than have a second implementation in Forth.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@726 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-02 13:01:10 +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
075e485628 Finish the use of saved-program-state within the loaders. This involves 2 changes: firstly ensure that the saved-program-state
is being set correctly in all of the loaders, and secondly we change the bootinfo loader so that the bootscript is executed as 
part of init-program and not go. This seems to reflect the idea of execute-buffer in OpenBOOT that any Forth code is executed 
directly during init-program, rather than being deferred to go.

Note: the latter change is fairly simple, but I have been unable to test it myself other than verifying it compiles.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@724 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-02 10:28:48 +00:00
Mark Cave-Ayland
de891e0244 Move the bootinfo loader into libopenbios, refactoring and adding the new CONFIG_LOADER_BOOTINFO as appropriate.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@723 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-02 09:18:51 +00:00
Mark Cave-Ayland
d4451ae216 Move the *_init_program() functions into the main loader source files so that everything is in one place. Part of this
involves taking the existing parts of the XCOFF loader and putting them into a new loader file xcoff_load.c. Also fix a 
dependency order change these changes introduce when building openbios-unix.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@720 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-28 23:47:36 +00:00
Mark Cave-Ayland
c60fad9646 Add is_fcode(), is_forth() and is_aout() functions which take a pointer to an area of memory which may contain a valid loader
image.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@719 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-28 20:55:10 +00:00
Mark Cave-Ayland
f78fec5713 Introduce a set of CONFIG_LOADER_* configuration options to allow each architecture to specify the loaders that are to be used.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@717 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-28 20:18:30 +00:00
Mark Cave-Ayland
0933f8c540 Move the Fcode loader from arch/*/fcodeload.c to libopenbios/fcode_load.c.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@714 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-27 12:09:16 +00:00
Mark Cave-Ayland
126f9ee43e Move the Forth loader forthload.c from arch/*/forthload.c to libopenbios/forth_load.c. While the Forth loader source was
included and built as part of the SPARC64 and SPARC32 builds, it was never actually invoked in the boot sequence. Hence this 
patch maintains the existing behaviour in that only X86 builds included the Forth loader.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@712 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-27 11:53:59 +00:00
Mark Cave-Ayland
f02d2bde53 Move the a.out loader from arch/*/aoutload.c into libopenbios as aout_load.c.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@711 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-27 11:30:14 +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
bf897f1619 Split video_subr.h into its separate components so that they can live in the right places, rather than placing the definitions
from lots of different C files into a single header.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@696 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 20:10:01 +00:00