switch-coreboot/include/device/pci_rom.h
Stefan Reinauer 31bb218552 big move orgy.
Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Acked-by: Peter Stuge <peter@stuge.se>
Acked-by: Ronald G Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@47 f3766cd6-281f-0410-b1cd-43a5c92072e9
2006-11-22 12:15:55 +00:00

58 lines
1.5 KiB
C

/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef PCI_ROM_H
#define PCI_ROM_H
#include <arch/types.h>
#include <arch/byteorder.h>
#include <stddef.h>
#define PCI_ROM_HDR 0xAA55
#define PCI_DATA_HDR (u32) ( ('R' << 24) | ('I' << 16) | ('C' << 8) | 'P' )
#define PCI_RAM_IMAGE_START 0xD0000
#define PCI_VGA_RAM_IMAGE_START 0xC0000
struct rom_header {
u16 signature;
u8 size;
u8 init[3];
u8 reserved[0x12];
u16 data;
};
struct pci_data {
u32 signature;
u16 vendor;
u16 device;
u16 reserved_1;
u16 dlen;
u8 drevision;
u8 class_lo;
u16 class_hi;
u16 ilen;
u16 irevision;
u8 type;
u8 indicator;
u16 reserved_2;
};
extern struct rom_header * pci_rom_probe(struct device *dev);
extern struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_header);
extern void pci_dev_init(struct device *dev);
#endif