Commit Graph

206 Commits

Author SHA1 Message Date
Blue Swirl
c0ee565d88 Sparc64: add upa-portid properties
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@768 f158a5a8-5612-0410-a976-696ce0be7e32
2010-05-02 20:08:43 +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
Alexander Graf
41dd5272ca [PPC] Make mac-io ata interrupts depend on local, not global index
In commit r680 I incorrectly made the interrupt number of the mac-io ata
device depend on its global index. Of course the interrupt only depends on
its index inside the mac-io chip.

So let's fix that up and make Qemu's oldworld emulation work again!

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@721 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-01 23:40:21 +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
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
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
b2036c0313 PPC: Fix interrupt numbers
We changed several interrupt numbers in Qemu to better reflect real
world hardware. Also, since we're now using proper interrupt maps, we
need to make sure we specify interrupts in the way the respective map
requires it.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@680 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-22 18:52:28 +00:00
Alexander Graf
81605d775a PPC: Create interrupt map for PCI
There is a draft spec that defines how interrupts are supposed to be mapped
from one bus to another, down to the PIC and CPU interrupt line.

So far we don't implement that spec. But PPC64 Linux requires us to for PCI
devices. So let's create a map here.

Draft: http://playground.sun.com/1275/practice/imap/imap0_9d.pdf

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@679 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-22 18:52:26 +00:00
Blue Swirl
37f12143ba Add "reg" property to kb_ps2, fix device_type
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@676 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-07 20:25:32 +00:00
Blue Swirl
a20a8cc176 Fix wrong device_type for non-PCI bridge devices, like EBUS
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@675 f158a5a8-5612-0410-a976-696ce0be7e32
2010-02-07 20:25:30 +00:00
Blue Swirl
dec920ff08 Sparc64: Add interrupt properties to Sabre
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@672 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-30 20:58:40 +00:00
Blue Swirl
9e7cb441f2 ESP: fix breakage by r667, status getting erased by interrupt register read
Reading the interrupt status register clears also status register, therefore
the interrupt status must be read only after reading the status.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@666 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-16 10:35:58 +00:00
Blue Swirl
d3aebe27d3 ESP: fix spurious guest interrupts during boot
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@665 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-16 08:47:39 +00:00
Blue Swirl
2478d67d9e Sparc64: fix Sabre properties
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@664 f158a5a8-5612-0410-a976-696ce0be7e32
2010-01-10 18:26:34 +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
Blue Swirl
f5dbe735cd Sparc64: fix Linux error about inconsistent console
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@653 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-30 09:49:40 +00:00
Blue Swirl
e979d432cc Map VGA buffer at client accessible location (Igor Kovalenko)
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@652 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-30 09:49:38 +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
Alexander Graf
5e50d351e8 I accidently set props[0] twice instead of going through both elements.
Signed-off-by: Alexander Graf <agraf@suse.de>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@647 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-21 09:57:53 +00:00
Alexander Graf
181acb9043 When running qemu in -M mac99 mode, interrupts failed on me all the
time.

I finally managed to track things down and it seems like we're missing 
some properties in several devices.

While at it, I also bumped the ESCC IRQs to 0x24 / 0x25, as that's what 
qemu now maps them on.

This patch (plus the qemu set) gets PPC64 Linux booting with 
console=ttyPZ0.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@646 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-18 23:38:08 +00:00
Michael S. Tsirkin
1f94ed5998 VGA adapters need to claim memory and i/o
transactions even if they do not have any
i/o or memory bars. E.g. PCI spec, page 297,
gives an example of such a device:

    Programming interface 0000 0000b
    VGA-compatible controller. Memory
    addresses 0A 0000h through 0B
    FFFFh. I/O addresses 3B0h to 3BBh
    and 3C0h to 3DFh and all aliases of
    these addresses.

While bios could check for these devices and special-case them, it is
easier to fix this by enabling i/o and memory space unconditionally:
devices that do not support it will just ignore this setting.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@643 f158a5a8-5612-0410-a976-696ce0be7e32
2009-12-10 00:17:17 +00:00
Laurent Vivier
b45c197d16 Define methods get-time and set-time of /pci/mac-io/via-cuda/rtc.
We can now have date&time from our openbios command line interface...

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@606 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-10 21:57:00 +00:00
Laurent Vivier
739db05755 Remove broken and useless cuda unit decode/encode methods.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@605 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-10 21:52:40 +00:00
Laurent Vivier
dbe983062e Define methods to decode/encode mac-io units.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@604 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-10 21:50:36 +00:00
Laurent Vivier
d6365bca24 Fully decode PCI unit name attribute.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@603 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-10 21:39:42 +00:00
Laurent Vivier
a1cc7db948 Move "bind_func("poweroff", ppc32_poweroff)" from ob_cuda_initialize()
to cuda_init() because it is a global word and if it is binded into 
the node initialization it breaks some other words ("decode-unit", 
"encode-unit").

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@601 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-09 19:39:26 +00:00
Laurent Vivier
0dd8e42f39 ADB: Manage arrow keys and more.
Manage more keyboard keys by emiting escape sequences.
This allows to manage key up, key down, key left, key right, home, end ...
(F1 to F16, HELP, ... are not tested)

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@597 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-06 21:23:32 +00:00
Laurent Vivier
6c9288e4b1 Add management of "ctrl-" for ADB keyboard.
On PPC, allow to navigate through command line history and current line 
with:
ctrl-p, ctrl-n, ctrl-f, ctrl-b, ctrl-d, ctrl-c, ctrl-k, ctrl-y...

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@595 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-05 20:51:15 +00:00
Laurent Vivier
fb3518132e printk() needs openbios/config.h
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@594 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-05 20:22:21 +00:00
Blue Swirl
b6c69cc18e Fix gcc 4.4 warnings about strict aliasing
Rather than cast char arrays to other types, use correct types and cast
them to char pointers when needed.

Author: Pavel Roskin <proski@gnu.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@568 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-23 12:40:22 +00:00
igor.v.kovalenko
11bb993385 Do not call close-deblocker since ob_pci_open did not open it.
Fix an issue with ob_pci_close; it calls close-deblocker method without
deblocker being open. This leads to multiple references to wrong cells,
including ones in zero page.

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@553 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-13 19:11:02 +00:00
Blue Swirl
c803a121b7 Sparc64: configure screen size from QEMU command line options
Configure the screen size from QEMU command line options using FW_CFG
interface, like r538 for PPC.

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

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@539 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-08 10:52:59 +00:00
Laurent Vivier
a3970b12b7 Allows to configure screen size from Qemu command line options using FW_CFG
interface.
Only enabled for PPC/QEMU and VGA/VBE.



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@538 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-04 21:08:37 +00:00
Laurent Vivier
7f8103fac8 Allows to configure screen size from the configuration files using
CONFIG_VGA_WIDTH, CONFIG_VGA_HEIGHT, CONFIG_VGA_DEPTH.
For the moment, only enabled for PPC/QEMU and VGA VBE interface.



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@537 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-04 21:04:32 +00:00
Blue Swirl
12fda803f3 Fix build errors with debugging enabled
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@512 f158a5a8-5612-0410-a976-696ce0be7e32
2009-07-20 06:52:23 +00:00
Blue Swirl
9fc5e54819 Handle ide model name string (Igor Kovalenko)
This handles fixed-size ide model name string without trailing zero.


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@509 f158a5a8-5612-0410-a976-696ce0be7e32
2009-07-12 08:15:38 +00:00
igor.v.kovalenko
853aec9291 Improve PCI BAR handling (Igor Kovalenko)
Signed-off-by: igor.v.kovalenko@gmail.com


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@507 f158a5a8-5612-0410-a976-696ce0be7e32
2009-07-11 12:23:24 +00:00
Blue Swirl
c83135ba7a Revert r505
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@506 f158a5a8-5612-0410-a976-696ce0be7e32
2009-07-11 12:20:20 +00:00
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
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
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
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
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