Commit Graph

379 Commits

Author SHA1 Message Date
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
6dd0574272 Switch the loaders for x86, sparc64 and sparc32 over to use the new saved-program-state in boot() rather than try to execute the
device payload directly. This is the first stage in isolating the OF "load" and "go" words, and in preparation for moving the 
majority of the loaders into libopenbios.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@709 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-26 22:33:50 +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
4bc97b7c9f Fix PPC build - it seems that changing the headers around was masking the fact that virt_offset was not being defined within
ppc/qemu.c compared to the other PPC builds.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@700 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 21:14:04 +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
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
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
da4cc1d0bd Move the driver header files into include/drivers 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@692 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 15:19:41 +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
259edb2d3b Finish move of architecture-specific header files, with modifications to the header paths as required.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@688 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 13:54:45 +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
0d5f749065 Fix Unix target build on PPC host
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@684 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-07 16:36:30 +00:00
Alexander Graf
82639976aa PPC: Set Uninorth interrupt numbers to new Qemu values
We changed the uninorth interrupt mapping to better reflect real
hardware. OpenBIOS obviously needs to know about that.

Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@682 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-22 18:52:32 +00:00
Alexander Graf
88679e07e4 PPC: Add U3 based Mac machine
Linux on PPC64 knows only so many chipsets. One of the is the U3. So
we can use that when we're emulating a PPC64 machine, making Linux happy.

Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@681 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-22 18:52:30 +00:00
Alexander Graf
50d1f0e78e PPC: Get timebase and clock speed from fw_cfg
When running on Qemu (TCG) time goes by at a constant frequency which
accidently happens to match with Linux's fallback value.

As soon as we go to KVM, the time base suddenly starts going as fast as
the host CPU's time base. So we need to make sure Linux knows about
it, so it can do its timekeeping properly.

Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@678 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-22 18:52:25 +00:00
Alexander Graf
63e7a89932 PPC: Increase instruction cache size
A real 970FX has more icache, so we should reflect that.

Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@677 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-22 18:52:23 +00:00
Blue Swirl
305168fb73 sparc64: implement reset
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@673 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-31 12:16:46 +00:00
Blue Swirl
bdf1f6ce72 QEMU changed PCI/IO port byte swapping, adapt OpenBIOS to new way
This requires an updated QEMU.

Also use little endian access ASIs.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@671 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-29 18:46:38 +00:00
Blue Swirl
dc3b5cc5f2 Sparc64: more generic method for display and keyboard selection
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@669 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-24 13:38:28 +00:00
Blue Swirl
01e48a6f39 Sparc64: fix native Unix version build
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@668 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-23 14:43:02 +00:00
Blue Swirl
a40a92653f Sparc64: use firmware configuration device for command line storage
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@663 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-09 21:28:28 +00:00
Blue Swirl
592138f390 Sparc64: clear timer interrupt disable bit (NPT bit when reading tick)
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@662 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-05 20:49:50 +00:00
Blue Swirl
4d0214e2bf Sparc64: fix Linux error about inconsistent console also for serial console
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@654 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-30 10:54:52 +00:00
Igor V. Kovalenko
c0b4bb8002 sparc64: claim memory mapped by startup code
- claim both physical and virtual address ranges
  while walking boot memory mappings

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@651 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-29 17:36:05 +00:00
Blue Swirl
8fde0b100a Postpone mapping of the memory
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@650 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-29 17:36:03 +00:00
Blue Swirl
2b5a61fc6c Map VGA buffer only during PCI probe
Also pass physical addresses instead of bus addresses to VGA init.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@648 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-28 10:15:33 +00:00
igor.v.kovalenko
384b8c7614 Revert r639, fix mem_claim (Igor Kovalenko) and mem_release
Signed-off-by: igor.v.kovalenko@gmail.com
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@640 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-05 10:13:17 +00:00
Blue Swirl
3068b8763d Sparc64: fix mmu_map
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@639 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-04 22:01:12 +00:00
Mark Cave-Ayland
ba52470cce In the IEEE 1275-1994 specification the parameters for Client Interface calls
are not in forth stack order but in reversed (heh!) order. Our implementation
confused this.

This second patch is fairly straightforward; probably the only unexpected part is
the need to rename the existing /openprom/client-services "claim" and
"release" words to "cif-claim" and "cif-release" respectively. This is
because we need to use the "claim" and "release" words in
forth/system/ciface.fs to reverse the argument order before calling the real
underlying words.

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



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@637 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-02 10:44:35 +00:00
Laurent Vivier
8d752aaf26 Change link edition order to move libc after libfs, allowing libfs to
use functions from libc.

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@629 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-22 09:53:54 +00:00
Blue Swirl
d6aac5ffe2 Reworked version of Forth Source debugger (Mark Cave-Ayland)
This patch implements the following Forth words:

   debug <xt> - Mark word for debugging
   debug-off  - Unmark all words for debugging
   resume     - Return from subordinate Forth interpreter

The source debugger also implements the following commands when it has
been activated:

   Up - Unmark current word for debugging, mark parent and continue
   Down - Mark next word for debugging
   Trace - Continue execution until end of word displaying
           debug information
   Rstack - Display contents of the Rstack
   Forth - Launch subordinate Forth interpreter

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@611 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-15 21:03:51 +00:00
Laurent Vivier
8fd9a7d4af Add "64-bit" property for PowerPC 970fx.
(allows Fedora bootloader to load the good kernel, 32-bit or 64-bit)

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@607 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-10 22:13:54 +00:00
Laurent Vivier
5398f1f5e3 Correct typo
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@600 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-08 23:43:19 +00:00
Laurent Vivier
657daacde8 ppc/qemu: correctly manage property "available" of package "/memory"
Instead of hardcoding values during init, call ofmem_register() with "/memory" phandle.

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@599 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-07 21:53:45 +00:00
Laurent Vivier
e76492313a ppc: replace ofmem_claim_phys() + ofmem_claim_virt() by ofmem_map().
This is needed by haiku-ppc bootloader (but it is not enough).

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@591 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-01 23:27:35 +00:00
Laurent Vivier
b9486926d9 ppc: if "\\:tbxi" (mac) fails, try "ppc\bootinfo.txt" (chrp).
This is needed to load the bootloader of OpenBSD.

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@590 f158a5a8-5612-0410-a976-696ce0be7e32
2009-10-19 23:02:10 +00:00
Laurent Vivier
6e47ae9e09 ppc: simplify boot by using load and go.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@589 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-21 23:12:02 +00:00
Laurent Vivier
719271835f Add bootinfo-loader.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@584 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-20 20:15:46 +00:00
Laurent Vivier
1a93a83480 Allows to boot openSUSE from install CD-ROM
Implements "init-program" using loader packages
Write a first loader package: elf-loader

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@578 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-18 22:59:30 +00:00
Laurent Vivier
38283e32ac Use the load method to load and execute CHRP script.
This adds a better support of Apple BootX script.
However, "init-program" and "go" are always missing to be able to really boot with BootX.

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@576 f158a5a8-5612-0410-a976-696ce0be7e32
2009-09-01 23:44:24 +00:00
Laurent Vivier
a58190e204 Define load-base to follow memory mapping defined in the BootX source
comments.

This as been reported by Steven Noonan.



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@573 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-29 21:09:21 +00:00
Laurent Vivier
2db781a446 Replace yaboot_startup() by newworld_boot() which implements generic
CHRP boot method.
It finds the CHRP bootscript using the file attribute 'tbxi' and 
the blessed directory.

This method allows to boot easily Fedora (the bitness detection is done
by the script and yaboot is called with the according yaboot.conf) but
openSUSE is broken (you have to use "boot cd:,\suseboot\yaboot")
Debian works well (as usual...).
The openSUSE needs the missing forth words: "load" and "go".
The MacOS bootloader (BootX) is also loaded automatically but forth 
script is too complex to be executed correctly.

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@571 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-29 15:43:00 +00:00
Laurent Vivier
1ced7923e7 For mac-parts, when no partition number is provided, open the first HFS
partition (type is "Apple_HFS").

Signed-off-by: Laurent Vivier <Laurent@vivier.eu>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@570 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-29 15:24:49 +00:00
igor.v.kovalenko
f13fecfb60 v1 Preliminary support for softint handler with trap to bug on other irqs
v0->v1: removed extra instructions

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@566 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-22 06:04:00 +00:00
igor.v.kovalenko
6433c74bf7 Enable timer after trap table is initialized
Signed-off-by: igor.v.kovalenko@gmail.com
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@563 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-21 19:15:55 +00:00