Commit Graph

230 Commits

Author SHA1 Message Date
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
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
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
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
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
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
ad3d1b5332 ide.c: cleanup traces
git-svn-id: svn://coreboot.org/openbios/openbios-devel@441 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-04 11:47:13 +00:00
Blue Swirl
7fbbf2d6eb Add #defines for PCI classes and subclasses
git-svn-id: svn://coreboot.org/openbios/openbios-devel@439 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-02 17:40:29 +00:00
Blue Swirl
c39ebf65f7 Add #defines for PCI vendor and device IDs for all devices, taken from Linux
and pciids.sourceforge.net.

Also fix a confusion between Sabre and Simba device IDs.


git-svn-id: svn://coreboot.org/openbios/openbios-devel@437 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-01 11:25:16 +00:00
Blue Swirl
36bab875b8 Refactor QEMU firmware confguration device handling (based on patch by
Aurelien Jarno)


git-svn-id: svn://coreboot.org/openbios/openbios-devel@432 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-31 08:49:16 +00:00
Laurent Vivier
d474d768b1 Add mac-io IDE driver
git-svn-id: svn://coreboot.org/openbios/openbios-devel@431 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-30 07:44:48 +00:00
Blue Swirl
eea3589cb9 Use RAM for SMP init instead of NVRAM
git-svn-id: svn://coreboot.org/openbios/openbios-devel@426 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-25 12:20:12 +00:00
Blue Swirl
3fae06cd81 Add support for floppy boot on Sparc32
git-svn-id: svn://coreboot.org/openbios/openbios-devel@425 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-25 09:56:08 +00:00
Blue Swirl
7a00116a9f Add slavioconfig only for SS-4, SS-5 and S3GX
git-svn-id: svn://coreboot.org/openbios/openbios-devel@421 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-24 07:31:45 +00:00
Blue Swirl
6fd0d0dfcf Send key on key press, not release: closes #26
git-svn-id: svn://coreboot.org/openbios/openbios-devel@418 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-17 20:39:12 +00:00
Blue Swirl
0560ab5941 Fix PCI I/O ports allocation (Aurelien Jarno)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@416 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-17 19:02:38 +00:00
Blue Swirl
f5f46f28f5 Use aliases for console device selection
git-svn-id: svn://coreboot.org/openbios/openbios-devel@413 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-17 10:15:13 +00:00
Blue Swirl
95183db81e Fix Sparc32 nographic mode
git-svn-id: svn://coreboot.org/openbios/openbios-devel@412 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-17 09:55:09 +00:00
Laurent Vivier
f336ed1793 ide: allow to have multiple instances
git-svn-id: svn://coreboot.org/openbios/openbios-devel@411 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-15 12:55:31 +00:00
Laurent Vivier
33b98e5c5f ide: improve ide aliases management
git-svn-id: svn://coreboot.org/openbios/openbios-devel@410 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-15 02:18:58 +00:00
Laurent Vivier
00ed6db419 ide: improve support of MMIO ide controller
git-svn-id: svn://coreboot.org/openbios/openbios-devel@409 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-15 02:17:00 +00:00
Laurent Vivier
60c755b54f macio.c: remove unused functions
git-svn-id: svn://coreboot.org/openbios/openbios-devel@408 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-14 23:30:09 +00:00
Laurent Vivier
f89783c5e4 CONFIG_SERIAL_PORT to 0 select ch-a (0x20 offset), other value select ch-b (0x00 offset). Idea from Blue Swirl
git-svn-id: svn://coreboot.org/openbios/openbios-devel@406 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 20:24:52 +00:00
Laurent Vivier
c254d42e4c ESCC: correctly use CONFIG_SERIAL_PORT
git-svn-id: svn://coreboot.org/openbios/openbios-devel@400 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 16:42:29 +00:00
Laurent Vivier
53c56562ce escc: add "AAPL," and "reg" properties (allow to use it with linux)
git-svn-id: svn://coreboot.org/openbios/openbios-devel@398 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 08:05:51 +00:00
Laurent Vivier
7dac2248ea Add aliases for ch-a and ch-b: ttya, ttyb for oldworld, and scca and sccb for all
git-svn-id: svn://coreboot.org/openbios/openbios-devel@397 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-13 07:49:44 +00:00
Blue Swirl
e43da79c51 Fix wrong property
git-svn-id: svn://coreboot.org/openbios/openbios-devel@395 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-12 19:49:10 +00:00