Author: mcayland Date: Sun Mar 14 16:19:41 2010 New Revision: 692 URL: http://tracker.coreboot.org/trac/openbios/changeset/692
Log: 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
Added: trunk/openbios-devel/include/drivers/ trunk/openbios-devel/include/drivers/drivers.h (props changed) - copied unchanged from r689, trunk/openbios-devel/include/openbios/drivers.h trunk/openbios-devel/include/drivers/pci.h (props changed) - copied unchanged from r689, trunk/openbios-devel/include/openbios/pci.h Deleted: trunk/openbios-devel/include/openbios/drivers.h trunk/openbios-devel/include/openbios/pci.h Modified: trunk/openbios-devel/arch/ppc/qemu/console.c trunk/openbios-devel/arch/ppc/qemu/init.c trunk/openbios-devel/arch/ppc/qemu/methods.c trunk/openbios-devel/arch/ppc/qemu/qemu.c trunk/openbios-devel/arch/sparc32/boot.c trunk/openbios-devel/arch/sparc32/console.c trunk/openbios-devel/arch/sparc32/openbios.c trunk/openbios-devel/arch/sparc32/romvec.c trunk/openbios-devel/arch/sparc64/console.c trunk/openbios-devel/arch/sparc64/openbios.c trunk/openbios-devel/arch/x86/openbios.c trunk/openbios-devel/drivers/cuda.c trunk/openbios-devel/drivers/escc.c trunk/openbios-devel/drivers/esp.c trunk/openbios-devel/drivers/floppy.c trunk/openbios-devel/drivers/ide.c trunk/openbios-devel/drivers/iommu.c trunk/openbios-devel/drivers/macio.c trunk/openbios-devel/drivers/obio.c trunk/openbios-devel/drivers/pc_kbd.c trunk/openbios-devel/drivers/pc_serial.c trunk/openbios-devel/drivers/pci.c trunk/openbios-devel/drivers/pci_database.c trunk/openbios-devel/drivers/sbus.c trunk/openbios-devel/drivers/vga_vbe.c trunk/openbios-devel/packages/video.c
Modified: trunk/openbios-devel/arch/ppc/qemu/console.c ============================================================================== --- trunk/openbios-devel/arch/ppc/qemu/console.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/arch/ppc/qemu/console.c Sun Mar 14 16:19:41 2010 (r692) @@ -13,7 +13,7 @@
#include "openbios/config.h" #include "libopenbios/bindings.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h"
#ifdef CONFIG_DEBUG_CONSOLE /* ******************************************************************
Modified: trunk/openbios-devel/arch/ppc/qemu/init.c ============================================================================== --- trunk/openbios-devel/arch/ppc/qemu/init.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/arch/ppc/qemu/init.c Sun Mar 14 16:19:41 2010 (r692) @@ -22,9 +22,9 @@
#include "openbios/config.h" #include "libopenbios/bindings.h" -#include "openbios/pci.h" +#include "drivers/pci.h" #include "openbios/nvram.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "qemu/qemu.h" #include "libopenbios/ofmem.h" #include "openbios-version.h"
Modified: trunk/openbios-devel/arch/ppc/qemu/methods.c ============================================================================== --- trunk/openbios-devel/arch/ppc/qemu/methods.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/arch/ppc/qemu/methods.c Sun Mar 14 16:19:41 2010 (r692) @@ -20,7 +20,7 @@
#include "openbios/config.h" #include "libopenbios/bindings.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "libc/string.h" #include "qemu/qemu.h" #include "libopenbios/ofmem.h"
Modified: trunk/openbios-devel/arch/ppc/qemu/qemu.c ============================================================================== --- trunk/openbios-devel/arch/ppc/qemu/qemu.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/arch/ppc/qemu/qemu.c Sun Mar 14 16:19:41 2010 (r692) @@ -20,7 +20,7 @@ #include "kernel/kernel.h" #include "openbios/nvram.h" #include "libopenbios/bindings.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "libc/vsprintf.h" #include "libc/string.h" #include "libc/byteorder.h"
Modified: trunk/openbios-devel/arch/sparc32/boot.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/boot.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/arch/sparc32/boot.c Sun Mar 14 16:19:41 2010 (r692) @@ -6,7 +6,7 @@ #include "libopenbios/bindings.h" #include "libopenbios/elfload.h" #include "openbios/nvram.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "libc/diskio.h" #include "libc/vsprintf.h" #include "sys_info.h"
Modified: trunk/openbios-devel/arch/sparc32/console.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/console.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/arch/sparc32/console.c Sun Mar 14 16:19:41 2010 (r692) @@ -7,7 +7,7 @@
#include "openbios/config.h" #include "kernel/kernel.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "openbios.h" #include "video_subr.h" #include "libopenbios/ofmem.h"
Modified: trunk/openbios-devel/arch/sparc32/openbios.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/openbios.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/arch/sparc32/openbios.c Sun Mar 14 16:19:41 2010 (r692) @@ -8,7 +8,7 @@
#include "openbios/config.h" #include "libopenbios/bindings.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "asm/types.h" #include "dict.h" #include "kernel/kernel.h"
Modified: trunk/openbios-devel/arch/sparc32/romvec.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/romvec.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/arch/sparc32/romvec.c Sun Mar 14 16:19:41 2010 (r692) @@ -10,7 +10,7 @@ #include "openprom.h" #include "openbios/config.h" #include "libopenbios/bindings.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "sys_info.h" #include "boot.h"
Modified: trunk/openbios-devel/arch/sparc64/console.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/console.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/arch/sparc64/console.c Sun Mar 14 16:19:41 2010 (r692) @@ -8,7 +8,7 @@ #include "openbios/config.h" #include "libopenbios/bindings.h" #include "kernel/kernel.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "libopenbios/fontdata.h" #include "openbios.h" #include "video_subr.h"
Modified: trunk/openbios-devel/arch/sparc64/openbios.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/openbios.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/arch/sparc64/openbios.c Sun Mar 14 16:19:41 2010 (r692) @@ -8,12 +8,12 @@
#include "openbios/config.h" #include "libopenbios/bindings.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "dict.h" #include "openbios/nvram.h" #include "sys_info.h" #include "openbios.h" -#include "openbios/pci.h" +#include "drivers/pci.h" #include "asm/pci.h" #include "boot.h" #include "../../drivers/timer.h" // XXX
Modified: trunk/openbios-devel/arch/x86/openbios.c ============================================================================== --- trunk/openbios-devel/arch/x86/openbios.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/arch/x86/openbios.c Sun Mar 14 16:19:41 2010 (r692) @@ -12,8 +12,8 @@ #include "dict.h" #include "kernel/kernel.h" #include "kernel/stack.h" -#include "openbios/drivers.h" -#include "openbios/pci.h" +#include "drivers/drivers.h" +#include "drivers/pci.h" #include "sys_info.h" #include "openbios.h" #include "relocate.h"
Modified: trunk/openbios-devel/drivers/cuda.c ============================================================================== --- trunk/openbios-devel/drivers/cuda.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/drivers/cuda.c Sun Mar 14 16:19:41 2010 (r692) @@ -1,6 +1,6 @@ #include "openbios/config.h" #include "libopenbios/bindings.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "libc/byteorder.h" #include "libc/vsprintf.h"
Modified: trunk/openbios-devel/drivers/escc.c ============================================================================== --- trunk/openbios-devel/drivers/escc.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/drivers/escc.c Sun Mar 14 16:19:41 2010 (r692) @@ -2,7 +2,7 @@ #include "libopenbios/bindings.h" #include "libc/byteorder.h" #include "libc/vsprintf.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "libopenbios/ofmem.h"
#include "escc.h"
Modified: trunk/openbios-devel/drivers/esp.c ============================================================================== --- trunk/openbios-devel/drivers/esp.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/drivers/esp.c Sun Mar 14 16:19:41 2010 (r692) @@ -19,7 +19,7 @@ #include "libc/byteorder.h" #include "libc/vsprintf.h"
-#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "asm/io.h" #include "scsi.h" #include "asm/dma.h"
Modified: trunk/openbios-devel/drivers/floppy.c ============================================================================== --- trunk/openbios-devel/drivers/floppy.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/drivers/floppy.c Sun Mar 14 16:19:41 2010 (r692) @@ -4,7 +4,7 @@ #include "libc/byteorder.h" #include "libc/vsprintf.h"
-#include "openbios/drivers.h" +#include "drivers/drivers.h"
#include "timer.h"
Modified: trunk/openbios-devel/drivers/ide.c ============================================================================== --- trunk/openbios-devel/drivers/ide.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/drivers/ide.c Sun Mar 14 16:19:41 2010 (r692) @@ -19,7 +19,7 @@ #include "libc/byteorder.h" #include "libc/vsprintf.h"
-#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "ide.h" #include "hdreg.h" #include "timer.h"
Modified: trunk/openbios-devel/drivers/iommu.c ============================================================================== --- trunk/openbios-devel/drivers/iommu.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/drivers/iommu.c Sun Mar 14 16:19:41 2010 (r692) @@ -6,7 +6,7 @@ **/ #include "openbios/config.h" #include "libopenbios/bindings.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "iommu.h" #include "libopenbios/ofmem.h"
Modified: trunk/openbios-devel/drivers/macio.c ============================================================================== --- trunk/openbios-devel/drivers/macio.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/drivers/macio.c Sun Mar 14 16:19:41 2010 (r692) @@ -14,11 +14,11 @@ #include "libc/byteorder.h" #include "libc/vsprintf.h"
-#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "macio.h" #include "cuda.h" #include "escc.h" -#include "openbios/pci.h" +#include "drivers/pci.h"
#define OW_IO_NVRAM_SIZE 0x00020000 #define OW_IO_NVRAM_OFFSET 0x00060000
Modified: trunk/openbios-devel/drivers/obio.c ============================================================================== --- trunk/openbios-devel/drivers/obio.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/drivers/obio.c Sun Mar 14 16:19:41 2010 (r692) @@ -16,7 +16,7 @@ #include "libc/byteorder.h" #include "libc/vsprintf.h"
-#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "openbios/nvram.h" #include "libopenbios/ofmem.h" #include "obio.h"
Modified: trunk/openbios-devel/drivers/pc_kbd.c ============================================================================== --- trunk/openbios-devel/drivers/pc_kbd.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/drivers/pc_kbd.c Sun Mar 14 16:19:41 2010 (r692) @@ -8,7 +8,7 @@ #include "openbios/config.h" #include "libopenbios/bindings.h" #include "kernel/kernel.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "libc/vsprintf.h"
/* ******************************************************************
Modified: trunk/openbios-devel/drivers/pc_serial.c ============================================================================== --- trunk/openbios-devel/drivers/pc_serial.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/drivers/pc_serial.c Sun Mar 14 16:19:41 2010 (r692) @@ -8,7 +8,7 @@ #include "openbios/config.h" #include "libopenbios/bindings.h" #include "kernel/kernel.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "libc/vsprintf.h"
/* ******************************************************************
Modified: trunk/openbios-devel/drivers/pci.c ============================================================================== --- trunk/openbios-devel/drivers/pci.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/drivers/pci.c Sun Mar 14 16:19:41 2010 (r692) @@ -18,11 +18,11 @@ #include "openbios/config.h" #include "libopenbios/bindings.h" #include "kernel/kernel.h" -#include "openbios/pci.h" +#include "drivers/pci.h" #include "libc/byteorder.h" #include "libc/vsprintf.h"
-#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "video_subr.h" #include "timer.h" #include "pci.h"
Modified: trunk/openbios-devel/drivers/pci_database.c ============================================================================== --- trunk/openbios-devel/drivers/pci_database.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/drivers/pci_database.c Sun Mar 14 16:19:41 2010 (r692) @@ -1,6 +1,6 @@ #include "openbios/config.h" #include "libopenbios/bindings.h" -#include "openbios/pci.h" +#include "drivers/pci.h" #include "libc/vsprintf.h"
#include "pci_database.h"
Modified: trunk/openbios-devel/drivers/sbus.c ============================================================================== --- trunk/openbios-devel/drivers/sbus.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/drivers/sbus.c Sun Mar 14 16:19:41 2010 (r692) @@ -15,7 +15,7 @@ #include "kernel/kernel.h" #include "libc/byteorder.h" #include "libc/vsprintf.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "libopenbios/ofmem.h"
#define SBUS_REGS 0x28
Modified: trunk/openbios-devel/drivers/vga_vbe.c ============================================================================== --- trunk/openbios-devel/drivers/vga_vbe.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/drivers/vga_vbe.c Sun Mar 14 16:19:41 2010 (r692) @@ -19,8 +19,8 @@ #include "openbios/config.h" #include "kernel/kernel.h" #include "libopenbios/bindings.h" -#include "openbios/pci.h" -#include "openbios/drivers.h" +#include "drivers/pci.h" +#include "drivers/drivers.h" #include "libopenbios/fontdata.h" #include "asm/io.h" #include "libc/vsprintf.h"
Copied: trunk/openbios-devel/include/drivers/drivers.h (from r689, trunk/openbios-devel/include/openbios/drivers.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/openbios-devel/include/drivers/drivers.h Sun Mar 14 16:19:41 2010 (r692, copy of r689, trunk/openbios-devel/include/openbios/drivers.h) @@ -0,0 +1,127 @@ +/* + * OpenBIOS driver prototypes + * + * (C) 2004 Stefan Reinauer stepan@openbios.org + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 + * + */ +#ifndef OPENBIOS_DRIVERS_H +#define OPENBIOS_DRIVERS_H + +#include "openbios/config.h" + +#ifdef CONFIG_DRIVER_PCI +/* drivers/pci.c */ +int ob_pci_init(void); +#endif + +#if defined(CONFIG_DRIVER_PCI) || defined(CONFIG_DRIVER_ESCC) +#ifdef CONFIG_PPC +extern int is_apple(void); +extern int is_oldworld(void); +extern int is_newworld(void); +#else +static inline int is_apple(void) +{ + return 0; +} +static inline int is_oldworld(void) +{ + return 0; +} +static inline int is_newworld(void) +{ + return 0; +} +#endif +#define AAPL(_cmd) do { if (is_apple()) _cmd; } while(0) +#define OLDWORLD(_cmd) do { if (is_oldworld()) _cmd; } while(0) +#define NEWWORLD(_cmd) do { if (is_newworld()) _cmd; } while(0) +#endif +#ifdef CONFIG_DRIVER_SBUS +/* drivers/sbus.c */ +int ob_sbus_init(uint64_t base, int machine_id); + +/* arch/sparc32/console.c */ +void tcx_init(uint64_t base); +void kbd_init(uint64_t base); +#endif +#ifdef CONFIG_DRIVER_IDE +/* drivers/ide.c */ +int ob_ide_init(const char *path, uint32_t io_port0, uint32_t ctl_port0, + uint32_t io_port1, uint32_t ctl_port1); +int macio_ide_init(const char *path, uint32_t addr, int nb_channels); +#endif +#ifdef CONFIG_DRIVER_ESP +/* drivers/esp.c */ +int ob_esp_init(unsigned int slot, uint64_t base, unsigned long espoffset, + unsigned long dmaoffset); +#endif +#ifdef CONFIG_DRIVER_OBIO +/* drivers/obio.c */ +int ob_obio_init(uint64_t slavio_base, unsigned long fd_offset, + unsigned long counter_offset, unsigned long intr_offset, + unsigned long aux1_offset, unsigned long aux2_offset); +int start_cpu(unsigned int pc, unsigned int context_ptr, unsigned int context, + int cpu); + +/* drivers/iommu.c */ +void ob_init_iommu(uint64_t base); +void *dvma_alloc(int size, unsigned int *pphys); + +/* drivers/sbus.c */ +extern uint16_t graphic_depth; + +/* drivers/obio.c */ +extern volatile unsigned char *power_reg; +extern volatile unsigned int *reset_reg; +extern volatile struct sun4m_timer_regs *counter_regs; + +void ob_new_obio_device(const char *name, const char *type); +unsigned long ob_reg(uint64_t base, uint64_t offset, unsigned long size, int map); +void ob_intr(int intr); + +/* arch/sparc32/romvec.c */ +extern const char *obp_stdin_path, *obp_stdout_path; +extern char obp_stdin, obp_stdout; + +/* arch/sparc32/boot.c */ +extern uint32_t kernel_image; +extern uint32_t kernel_size; +extern uint32_t qemu_cmdline; +extern uint32_t cmdline_size; +extern char boot_device; +#endif +#ifdef CONFIG_DRIVER_FLOPPY +int ob_floppy_init(const char *path, const char *dev_name, + unsigned long io_base, unsigned long mmio_base); +#endif +#ifdef CONFIG_DRIVER_PC_KBD +void ob_pc_kbd_init(const char *path, const char *dev_name, uint64_t base, + uint64_t offset, int intr); +int pc_kbd_dataready(void); +unsigned char pc_kbd_readdata(void); +#endif +#ifdef CONFIG_DRIVER_PC_SERIAL +void ob_pc_serial_init(const char *path, const char *dev_name, uint64_t base, + uint64_t offset, int intr); +int uart_init(int port, unsigned long speed); +int uart_charav(int port); +char uart_getchar(int port); +void serial_putchar(int c); +#endif +#ifdef CONFIG_DRIVER_ESCC +int uart_init(uint64_t port, unsigned long speed); +int uart_charav(int port); +char uart_getchar(int port); +void serial_putchar(int c); +void serial_cls(void); +#ifdef CONFIG_DRIVER_ESCC_SUN +int keyboard_dataready(void); +unsigned char keyboard_readdata(void); +#endif +#endif +#endif /* OPENBIOS_DRIVERS_H */
Copied: trunk/openbios-devel/include/drivers/pci.h (from r689, trunk/openbios-devel/include/openbios/pci.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/openbios-devel/include/drivers/pci.h Sun Mar 14 16:19:41 2010 (r692, copy of r689, trunk/openbios-devel/include/openbios/pci.h) @@ -0,0 +1,210 @@ +#ifndef _H_PCI +#define _H_PCI + +typedef uint32_t pci_addr; + +typedef struct pci_arch_t pci_arch_t; + +struct pci_arch_t { + const char * name; + uint16_t vendor_id; + uint16_t device_id; + unsigned long cfg_addr; + unsigned long cfg_data; + unsigned long cfg_base; + unsigned long cfg_len; + unsigned long mem_base; + unsigned long mem_len; + unsigned long io_base; + unsigned long io_len; + unsigned long rbase; + unsigned long rlen; + uint8_t irqs[4]; +}; + +extern const pci_arch_t *arch; + +/* Device tree offsets */ + +#define PCI_INT_MAP_PCI0 0 +#define PCI_INT_MAP_PCI1 1 +#define PCI_INT_MAP_PCI2 2 +#define PCI_INT_MAP_PCI_INT 3 +#define PCI_INT_MAP_PIC_HANDLE 4 +#define PCI_INT_MAP_PIC_INT 5 +#define PCI_INT_MAP_PIC_POL 6 + +/* Device classes and subclasses */ + +#define PCI_BASE_CLASS_STORAGE 0x01 +#define PCI_SUBCLASS_STORAGE_SCSI 0x00 +#define PCI_SUBCLASS_STORAGE_IDE 0x01 +#define PCI_SUBCLASS_STORAGE_FLOPPY 0x02 +#define PCI_SUBCLASS_STORAGE_IPI 0x03 +#define PCI_SUBCLASS_STORAGE_RAID 0x04 +#define PCI_SUBCLASS_STORAGE_ATA 0x05 +#define PCI_SUBCLASS_STORAGE_SAS 0x07 +#define PCI_SUBCLASS_STORAGE_OTHER 0x80 + +#define PCI_BASE_CLASS_NETWORK 0x02 +#define PCI_SUBCLASS_NETWORK_ETHERNET 0x00 +#define PCI_SUBCLASS_NETWORK_TOKEN_RING 0x01 +#define PCI_SUBCLASS_NETWORK_FDDI 0x02 +#define PCI_SUBCLASS_NETWORK_ATM 0x03 +#define PCI_SUBCLASS_NETWORK_ISDN 0x04 +#define PCI_SUBCLASS_NETWORK_WORDFIP 0x05 +#define PCI_SUBCLASS_NETWORK_PICMG214 0x06 +#define PCI_SUBCLASS_NETWORK_OTHER 0x80 + +#define PCI_BASE_CLASS_DISPLAY 0x03 +#define PCI_SUBCLASS_DISPLAY_VGA 0x00 +#define PCI_SUBCLASS_DISPLAY_XGA 0x01 +#define PCI_SUBCLASS_DISPLAY_3D 0x02 +#define PCI_SUBCLASS_DISPLAY_OTHER 0x80 + +#define PCI_BASE_CLASS_MULTIMEDIA 0x04 +#define PCI_SUBCLASS_MULTIMEDIA_VIDEO 0x00 +#define PCI_SUBCLASS_MULTIMEDIA_AUDIO 0x01 +#define PCI_SUBCLASS_MULTIMEDIA_PHONE 0x02 +#define PCI_SUBCLASS_MULTIMEDIA_OTHER 0x80 + +#define PCI_BASE_CLASS_MEMORY 0x05 +#define PCI_SUBCLASS_MEMORY_RAM 0x00 +#define PCI_SUBCLASS_MEMORY_FLASH 0x01 + +#define PCI_BASE_CLASS_BRIDGE 0x06 +#define PCI_SUBCLASS_BRIDGE_HOST 0x00 +#define PCI_SUBCLASS_BRIDGE_ISA 0x01 +#define PCI_SUBCLASS_BRIDGE_EISA 0x02 +#define PCI_SUBCLASS_BRIDGE_MC 0x03 +#define PCI_SUBCLASS_BRIDGE_PCI 0x04 +#define PCI_SUBCLASS_BRIDGE_PCMCIA 0x05 +#define PCI_SUBCLASS_BRIDGE_NUBUS 0x06 +#define PCI_SUBCLASS_BRIDGE_CARDBUS 0x07 +#define PCI_SUBCLASS_BRIDGE_RACEWAY 0x08 +#define PCI_SUBCLASS_BRIDGE_PCI_SEMITP 0x09 +#define PCI_SUBCLASS_BRIDGE_IB_PCI 0x0a +#define PCI_SUBCLASS_BRIDGE_OTHER 0x80 + +#define PCI_BASE_CLASS_COMMUNICATION 0x07 +#define PCI_SUBCLASS_COMMUNICATION_SERIAL 0x00 +#define PCI_SUBCLASS_COMMUNICATION_PARALLEL 0x01 +#define PCI_SUBCLASS_COMMUNICATION_MULTISERIAL 0x02 +#define PCI_SUBCLASS_COMMUNICATION_MODEM 0x03 +#define PCI_SUBCLASS_COMMUNICATION_GPIB 0x04 +#define PCI_SUBCLASS_COMMUNICATION_SC 0x05 +#define PCI_SUBCLASS_COMMUNICATION_OTHER 0x80 + +#define PCI_BASE_CLASS_SYSTEM 0x08 +#define PCI_SUBCLASS_SYSTEM_PIC 0x00 +#define PCI_SUBCLASS_SYSTEM_DMA 0x01 +#define PCI_SUBCLASS_SYSTEM_TIMER 0x02 +#define PCI_SUBCLASS_SYSTEM_RTC 0x03 +#define PCI_SUBCLASS_SYSTEM_PCI_HOTPLUG 0x04 +#define PCI_SUBCLASS_SYSTEM_OTHER 0x80 + +#define PCI_BASE_CLASS_INPUT 0x09 +#define PCI_SUBCLASS_INPUT_KEYBOARD 0x00 +#define PCI_SUBCLASS_INPUT_PEN 0x01 +#define PCI_SUBCLASS_INPUT_MOUSE 0x02 +#define PCI_SUBCLASS_INPUT_SCANNER 0x03 +#define PCI_SUBCLASS_INPUT_GAMEPORT 0x04 +#define PCI_SUBCLASS_INPUT_OTHER 0x80 + +#define PCI_BASE_CLASS_DOCKING 0x0a +#define PCI_SUBCLASS_DOCKING_GENERIC 0x00 +#define PCI_SUBCLASS_DOCKING_OTHER 0x80 + +#define PCI_BASE_CLASS_PROCESSOR 0x0b +#define PCI_SUBCLASS_PROCESSOR_386 0x00 +#define PCI_SUBCLASS_PROCESSOR_486 0x01 +#define PCI_SUBCLASS_PROCESSOR_PENTIUM 0x02 +#define PCI_SUBCLASS_PROCESSOR_ALPHA 0x10 +#define PCI_SUBCLASS_PROCESSOR_POWERPC 0x20 +#define PCI_SUBCLASS_PROCESSOR_MIPS 0x30 +#define PCI_SUBCLASS_PROCESSOR_CO 0x40 + +#define PCI_BASE_CLASS_SERIAL 0x0c +#define PCI_SUBCLASS_SERIAL_FIREWIRE 0x00 +#define PCI_SUBCLASS_SERIAL_ACCESS 0x01 +#define PCI_SUBCLASS_SERIAL_SSA 0x02 +#define PCI_SUBCLASS_SERIAL_USB 0x03 +#define PCI_SUBCLASS_SERIAL_FIBER 0x04 +#define PCI_SUBCLASS_SERIAL_SMBUS 0x05 +#define PCI_SUBCLASS_SERIAL_IB 0x06 +#define PCI_SUBCLASS_SERIAL_IPMI 0x07 +#define PCI_SUBCLASS_SERIAL_SERCOS 0x08 +#define PCI_SUBCLASS_SERIAL_CANBUS 0x09 + +#define PCI_BASE_CLASS_WIRELESS 0x0d +#define PCI_SUBCLASS_WIRELESS_IRDA 0x00 +#define PCI_SUBCLASS_WIRELESS_CIR 0x01 +#define PCI_SUBCLASS_WIRELESS_RF_CONTROLLER 0x10 +#define PCI_SUBCLASS_WIRELESS_BLUETOOTH 0x11 +#define PCI_SUBCLASS_WIRELESS_BROADBAND 0x12 +#define PCI_SUBCLASS_WIRELESS_OTHER 0x80 + +#define PCI_BASE_CLASS_SATELLITE 0x0f +#define PCI_SUBCLASS_SATELLITE_TV 0x00 +#define PCI_SUBCLASS_SATELLITE_AUDIO 0x01 +#define PCI_SUBCLASS_SATELLITE_VOICE 0x03 +#define PCI_SUBCLASS_SATELLITE_DATA 0x04 + +#define PCI_BASE_CLASS_CRYPT 0x10 +#define PCI_SUBCLASS_CRYPT_NETWORK 0x00 +#define PCI_SUBCLASS_CRYPT_ENTERTAINMENT 0x01 +#define PCI_SUBCLASS_CRYPT_OTHER 0x80 + +#define PCI_BASE_CLASS_SIGNAL_PROCESSING 0x11 +#define PCI_SUBCLASS_SP_DPIO 0x00 +#define PCI_SUBCLASS_SP_PERF 0x01 +#define PCI_SUBCLASS_SP_SYNCH 0x10 +#define PCI_SUBCLASS_SP_MANAGEMENT 0x20 +#define PCI_SUBCLASS_SP_OTHER 0x80 + +#define PCI_CLASS_OTHERS 0xff + +/* Vendors and devices. */ + +#define PCI_VENDOR_ID_ATI 0x1002 +#define PCI_DEVICE_ID_ATI_RAGE128_PF 0x5046 + +#define PCI_VENDOR_ID_DEC 0x1011 +#define PCI_DEVICE_ID_DEC_21154 0x0026 + +#define PCI_VENDOR_ID_IBM 0x1014 +#define PCI_DEVICE_ID_IBM_OPENPIC 0x0002 +#define PCI_DEVICE_ID_IBM_OPENPIC2 0xffff + +#define PCI_VENDOR_ID_MOTOROLA 0x1057 +#define PCI_DEVICE_ID_MOTOROLA_MPC106 0x0002 +#define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801 + +#define PCI_VENDOR_ID_APPLE 0x106b +#define PCI_DEVICE_ID_APPLE_343S1201 0x0010 +#define PCI_DEVICE_ID_APPLE_343S1211 0x0017 +#define PCI_DEVICE_ID_APPLE_UNI_N_I_PCI 0x001e +#define PCI_DEVICE_ID_APPLE_UNI_N_PCI 0x001f +#define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020 +#define PCI_DEVICE_ID_APPLE_UNI_N_KEYL 0x0022 +#define PCI_DEVICE_ID_APPLE_U3_AGP 0x004b + +#define PCI_VENDOR_ID_SUN 0x108e +#define PCI_DEVICE_ID_SUN_EBUS 0x1000 +#define PCI_DEVICE_ID_SUN_SIMBA 0x5000 +#define PCI_DEVICE_ID_SUN_PBM 0x8000 +#define PCI_DEVICE_ID_SUN_SABRE 0xa000 + +#define PCI_VENDOR_ID_CMD 0x1095 +#define PCI_DEVICE_ID_CMD_646 0x0646 + +#define PCI_VENDOR_ID_REALTEK 0x10ec +#define PCI_DEVICE_ID_REALTEK_RTL8029 0x8029 + +#define PCI_VENDOR_ID_QEMU 0x1234 +#define PCI_DEVICE_ID_QEMU_VGA 0x1111 + +#define PCI_VENDOR_ID_INTEL 0x8086 +#define PCI_DEVICE_ID_INTEL_82441 0x1237 + +#endif /* _H_PCI */
Modified: trunk/openbios-devel/packages/video.c ============================================================================== --- trunk/openbios-devel/packages/video.c Sun Mar 14 16:05:53 2010 (r691) +++ trunk/openbios-devel/packages/video.c Sun Mar 14 16:19:41 2010 (r692) @@ -18,7 +18,7 @@ #include "libopenbios/bindings.h" #include "libc/diskio.h" #include "libopenbios/ofmem.h" -#include "openbios/drivers.h" +#include "drivers/drivers.h" #include "video_subr.h"
typedef struct osi_fb_info {