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
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
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
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
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
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
(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
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
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
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
comments.
This as been reported by Steven Noonan.
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@573 f158a5a8-5612-0410-a976-696ce0be7e32
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
for instance we can use "dev /cpus/@0" instead of "dev
/cpus/PowerPC,750". This notation is used in Fedora bootscript
to know if the CPU is 64-bit or 32-bit: it looks at "64-bit" property
of first available CPUS ("@0").
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@559 f158a5a8-5612-0410-a976-696ce0be7e32
Make forthstrap quiet by default. Use generic rules when possible, unify
the rules and cleanup white space. Use ld flag --whole-archive to avoid
some local rule use. We can also remove some hacks introduced to avoid
missing symbols.
Fix problems brought in by ld flag --whole-archive:
* x86: fix missing nvram symbols
* PPC: disable misc.S build for qemu (conflicts with our libgcc)
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@556 f158a5a8-5612-0410-a976-696ce0be7e32
using "boot hd:%BOOT"
As explained in:
"PowerPC Microprocessor Common Hardware Reference Platform (CHRP)
System binding to:
IEEE Std 1275-1994 Standard for Boot (Initialization, Configuration)
Firmware
Revision: 1.8"
"Chapter 11.1.2. Open Method Algorith"
Signed-off-by: Laurent Vivier <Laurent@vivier.info>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@552 f158a5a8-5612-0410-a976-696ce0be7e32
sense, because the loader does not use ELF binaries or is not
directly involved in loading them.
Created a generic SUBSYS_PRINTF macro, as well as loader-specific
ELF_DPRINTF, CHRP_DPRINTF, and YABOOT_DPRINTF macros.
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@545 f158a5a8-5612-0410-a976-696ce0be7e32
script to be loaded and parsed. It will also terminate parsing on
the '</chrp-boot>' tag, which makes locating embedded data after
the script easier.
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
(laurent: remove XCOFF placeholder)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@544 f158a5a8-5612-0410-a976-696ce0be7e32
This is needed on Fedora 11 (GNU ld 2.19.51.0.2). Otherwise, qemu
reports on statup:
invalid/unsupported opcode: 00 - 18 - 01 (00004070) 00000004 1
invalid/unsupported opcode: 00 - 04 - 17 (000095c8) 000095ec 0
I checked Linux sources (arch/powerpc/kernel/vmlinux.lds.S) and I see
that .sbss is put to the .bss section in front of .bss itself.
The problem is discussed at
https://bugzilla.redhat.com/show_bug.cgi?id=494075
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@488 f158a5a8-5612-0410-a976-696ce0be7e32
Use firmware configuration device for boot device, kernel, initrd and
kernel command line parameters on PPC, Sparc32 and Sparc64.
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@479 f158a5a8-5612-0410-a976-696ce0be7e32
Expose PCI controller information
Linux tries to detect which PCI controller it's supposed to work with.
On PPC32 there is fallback code that doesn't get compiled with
CONFIG_PPC64, so we really have to expose a controller or we don't have
pci config space accessor functions.
Let's expose a un3-agp if we have a mac99 model, as that's what is
supposed to be in there anyways.
Signed-off-by: Alexander Graf <alex@csgraf.de>
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>
git-svn-id: svn://coreboot.org/openbios/openbios-devel@466 f158a5a8-5612-0410-a976-696ce0be7e32
Expose NVRAM compatibility
Linux requires the NVRAM to expose a 'nvram,flash' compatibility
in the device tree. Let's expose it so it's happy.
v2 adds a NEWWORLD macro to protect nvram,flash getting exposed in
oldworld macs.
Signed-off-by: Alexander Graf <alex@csgraf.de>
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>
git-svn-id: svn://coreboot.org/openbios/openbios-devel@465 f158a5a8-5612-0410-a976-696ce0be7e32
PPC64: Switch to 32-bit mode in interrupts
All the code in OpenBIOS runs in 32 bits, which is fine. Now, when
an interrupt arrives, the 970 CPU automatically sets the MSR_SF bit,
making us run in 64 bit mode.
That breaks address calculation, because 'lis' and 'ba' get sign
extended.
In order to circumvent that mess, let's just go back to 32 bit mode
whenever we get an interrupt.
Signed-off-by: Alexander Graf <alex@csgraf.de>
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>
git-svn-id: svn://coreboot.org/openbios/openbios-devel@464 f158a5a8-5612-0410-a976-696ce0be7e32
While booting a 64bit kernel, there is a small timeframe where OF and the kernel communicate with each other. Within that timeframe, DSI/ISI interrupts may occur, because some memory is not mapped yet.
Right now in case that happens, we jump into the DSI/ISI interrupt handler which clobbers the high 32 bits of the kernel's registers. In order to circumvent that, let's save/restore all 64 bits of all kernel registers when we get a DSI/ISI interrupt.
This patch enables a PPC64 Linux kernel to boot up to the point where it tries to set up the SLB entries (slbmte), which is not yet implemented in qemu.
v2 implements handling for the HIOR register, bringing interrupt handlers to RAM.
Signed-off-by: Alexander Graf <alex@csgraf.de>
git-svn-id: svn://coreboot.org/openbios/openbios-devel@462 f158a5a8-5612-0410-a976-696ce0be7e32
It gets up to the boot prompt and works rather good so far, though I haven't been able to run a kernel yet.
For more recent PowerPC CPUs the PTE layout has changed, so we need to take that into account and create PTEs according to the new layout and at the new physical positions.
Signed-off-by: Alexander Graf <alex@csgraf.de>
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>
git-svn-id: svn://coreboot.org/openbios/openbios-devel@461 f158a5a8-5612-0410-a976-696ce0be7e32
It is needed to boot Fedora-10 as we must specify the path to the yaboot.conf.
To boot Fedora:
boot cd: conf=cd:,\ppc\ppc32\yaboot.conf
so "bootpath" is "cd:", and "bootargs" is "conf=cd:,\ppc\ppc32\yaboot.conf"
git-svn-id: svn://coreboot.org/openbios/openbios-devel@456 f158a5a8-5612-0410-a976-696ce0be7e32
To keep compatibility with yaboot (tested with debian install CD),
put in bootpath a fully qualified path (<device>:<partition>,<filename>)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@442 f158a5a8-5612-0410-a976-696ce0be7e32