Commit Graph

659 Commits

Author SHA1 Message Date
Blue Swirl
11adcd5539 Don't try to configure non-existent BARs of bridge devices
QEMU commit b7ee1603c16c1feb0d439d2ddf6cf824119d0aab improved the PCI bridge
device handling. PCI bridges use different header format from ordinary PCI
devices, especially BAR registers do not exist. OpenBIOS tried to configure
the bridges based on the non-BAR data which was assumed to be BARs.


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@505 f158a5a8-5612-0410-a976-696ce0be7e32
2009-07-05 18:32:50 +00:00
Blue Swirl
cd72008966 Enable -Werror for Sparc32 and Sparc64
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@504 f158a5a8-5612-0410-a976-696ce0be7e32
2009-06-14 16:05:27 +00:00
Blue Swirl
ffc2bb1fda sparc64 video.pal fix memory corruption (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@503 f158a5a8-5612-0410-a976-696ce0be7e32
2009-06-13 07:36:56 +00:00
Blue Swirl
0d8df65985 Don't add padding spaces when evaluating headerless words (Mark Cave-Ayland)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@502 f158a5a8-5612-0410-a976-696ce0be7e32
2009-06-06 14:57:25 +00:00
Blue Swirl
a6c558cbf2 Improve client interface debugging
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@501 f158a5a8-5612-0410-a976-696ce0be7e32
2009-06-06 09:58:11 +00:00
Blue Swirl
b5b8d3c039 sparc64: clear unused registers when calling client image (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@500 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-30 07:43:58 +00:00
Blue Swirl
c1a48cf75c Fix b(field) Fcode evaluation (Mark Cave-Ayland)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@499 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-30 07:41:48 +00:00
Blue Swirl
14cdca306d Fix b(case)...b(of)...b(endof)...b(endcase) (Mark Cave-Ayland)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@498 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-24 11:15:48 +00:00
Blue Swirl
0ac767a200 Implement push-package/pop-package (Mark Cave-Ayland)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@497 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-24 11:04:06 +00:00
Blue Swirl
047609e0fa Add claim and release client methods
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@496 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-23 16:03:20 +00:00
Blue Swirl
f13e795c12 Implement /x FCode (Mark Cave-Ayland)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@495 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-23 15:31:31 +00:00
Igor Kovalenko
17594b70b8 forth: add more pockets
This changes pocket index calculation to support more than two pockets.
As an example default number of pockets is set to 4.
This should ease nesting more than two levels using pockets as
temporary storage.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@494 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-22 17:15:48 +00:00
Igor Kovalenko
02130e8240 Fix regprop int encoding (Igor Kovalenko)
Wrong encoding of "#address-cells" property can lead to a failure
fetching correct value in my-#acells method. According to docs
properties must be encoded with "encode-int". I spent some time
looking at the docs and it is clear that encode-int produces
quad-sized result (of size /l bytes).

This patch fixes pci helpers to encode to 32bit instead of 64bit values,
and correctes my-address and my-unit methods to read 32bit data
to match encode-int rules
modules/bindings.c: also fixed set_int_property and get_int_property
to match encode-int rules

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@493 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-22 17:14:10 +00:00
Blue Swirl
0ba0e77ecd Fix b(do) ... b(leaves) ... b(loop)/b(+loop) (Mark Cave-Ayland)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@492 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-22 17:09:52 +00:00
Blue Swirl
50d363515e Read the diagnostic mode setting from NVRAM (Mark Cave-Ayland)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@491 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-22 17:09:05 +00:00
Blue Swirl
8c883ca477 Fix stack protector problems with newer GCC versions
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@490 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-20 18:07:09 +00:00
Laurent Vivier
9611192b8d Author: Pavel Roskin <proski@gnu.org>
struct ata_sector was meant to facilitate taking upper and lower byte of
the sector.  However, the implementation is incorrect, as "struct" and
"union" are swapped in the definition.  What's worse, it's an overkill
for that simple task.  The code should be transparent without knowing
how struct ata_sector is defined.

[laurent: Original patch modified to remove useless "& 0xff"]


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@489 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-17 18:59:32 +00:00
Laurent Vivier
45caaecfa6 Author: Pavel Roskin <proski@gnu.org>
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
2009-05-17 17:14:01 +00:00
Blue Swirl
57733636ae Fix typo (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@487 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-12 18:38:03 +00:00
Blue Swirl
b464c960b4 Fix device_type property
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@486 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-05 17:57:18 +00:00
Blue Swirl
a924d32bcc Fix various bugs in bbranch and b?branch implementations (Mark Cave-Ayland)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@485 f158a5a8-5612-0410-a976-696ce0be7e32
2009-04-28 16:40:49 +00:00
Blue Swirl
7948face2b Display more information when ?fcode-verbose enabled (Mark Cave-Ayland)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@484 f158a5a8-5612-0410-a976-696ce0be7e32
2009-04-13 17:05:41 +00:00
Blue Swirl
604f68deaf Correct b?branch for negative offset branches (Mark Cave-Ayland)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@483 f158a5a8-5612-0410-a976-696ce0be7e32
2009-04-12 18:53:37 +00:00
Blue Swirl
a0c398f24b Delete some unused macros detected with -Wp,-Wunused-macros use
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@482 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-28 14:28:16 +00:00
Blue Swirl
e44d994605 Fix PPC nographic mode
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@481 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-22 16:49:34 +00:00
Blue Swirl
4ac211438c Fix build error log problem, spotted by Rob Landley
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@480 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-19 17:51:02 +00:00
Blue Swirl
b098842b5b Use firmware configuration instead of NVRAM (initial patch by Aurelien Jarno)
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
2009-03-08 09:45:25 +00:00
Aurelien Jarno
b73bf5229a Add new entries to firmware configuration device
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@478 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-08 09:39:53 +00:00
Blue Swirl
bac77c47d6 Move openbios-devel under /trunk
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@470 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-08 07:51:18 +00:00
Alexander Graf
4702c219f3 Author: Alexander Graf <alex@csgraf.de>
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
2009-03-08 01:06:56 +00:00
Alexander Graf
4578c8ae20 Author: Alexander Graf <alex@csgraf.de>
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
2009-03-08 01:03:17 +00:00
Alexander Graf
5973871ed2 Author: Alexander Graf <alex@csgraf.de>
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
2009-03-08 00:54:06 +00:00
Blue Swirl
2da21531b5 Version 1.0
git-svn-id: svn://coreboot.org/openbios/openbios-devel@463 f158a5a8-5612-0410-a976-696ce0be7e32
2009-03-01 20:07:47 +00:00
Alexander Graf
d257db6033 Make OpenBIOS interrupt handlers 64bit aware v2
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
2009-02-28 18:38:55 +00:00
Alexander Graf
189c9077a1 This patch enables OpenBIOS to initialize on PPC64, enabling support for -cpu 970fx.
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
2009-02-27 22:13:34 +00:00
Blue Swirl
7563abe630 Fix fcode-offset sign extension problem (Mark Cave-Ayland)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@460 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-27 21:04:01 +00:00
Blue Swirl
3e926b99ce Postpone serial console use until PCI probe, fixes reset
git-svn-id: svn://coreboot.org/openbios/openbios-devel@459 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-21 17:13:41 +00:00
Blue Swirl
ef41834dc2 Fix b?branch (Mark Cave-Ayland)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@458 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-21 16:27:51 +00:00
Blue Swirl
0c9a399601 Clear TLBs on reset
git-svn-id: svn://coreboot.org/openbios/openbios-devel@457 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-21 11:11:56 +00:00
Laurent Vivier
21507bfb5b Extract "bootargs" from "boot" command line.
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
2009-02-18 13:58:35 +00:00
Laurent Vivier
d95cb61e29 remove unused function timer_calib_start
git-svn-id: svn://coreboot.org/openbios/openbios-devel@455 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-17 22:45:41 +00:00
Blue Swirl
aa0441b762 Fix gcc 4.3 warning
git-svn-id: svn://coreboot.org/openbios/openbios-devel@454 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-16 18:38:07 +00:00
Laurent Vivier
f0daea0151 In "<boot-script>", from bootinfo.txt, decode all bootinfo entities: device,
partition, directory, filename, full-path.

(as defined in "PowerPC Microprocessor CHRP binding r1.8", chapter 3.1.6.1.)



git-svn-id: svn://coreboot.org/openbios/openbios-devel@453 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-15 20:20:55 +00:00
Blue Swirl
9020fb5fa1 Support for Qemu -nographic flag
git-svn-id: svn://coreboot.org/openbios/openbios-devel@452 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-14 09:44:55 +00:00
Blue Swirl
a837cf70f8 Increase Forth memory for FCode tables
git-svn-id: svn://coreboot.org/openbios/openbios-devel@451 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-12 19:39:47 +00:00
Blue Swirl
a72df592da Fix endianess bug in Rock Ridge extensions
git-svn-id: svn://coreboot.org/openbios/openbios-devel@450 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-08 15:45:15 +00:00
Blue Swirl
c6040cb8a0 Add basic Mac99 machine support
git-svn-id: svn://coreboot.org/openbios/openbios-devel@449 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-08 12:22:04 +00:00
Laurent Vivier
14e9b11e1f Set disk-label information when no partition map is used
git-svn-id: svn://coreboot.org/openbios/openbios-devel@448 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-05 21:37:26 +00:00
Laurent Vivier
21f5eb3c1a disk-label: retrieve block-size on open
git-svn-id: svn://coreboot.org/openbios/openbios-devel@447 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-05 21:33:23 +00:00
Laurent Vivier
0b01355058 Reset curfs to &dummy_fs on mount (fs_grubfs_open())
git-svn-id: svn://coreboot.org/openbios/openbios-devel@446 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-05 21:21:59 +00:00