Add support to run SMM handler in TSEG instead of ASEG
[coreboot.git] / src / include / device / pci_rom.h
1 #ifndef PCI_ROM_H
2 #define PCI_ROM_H
3 #include <arch/byteorder.h>
4 #include <stddef.h>
5
6 #define PCI_ROM_HDR 0xAA55
7 #define PCI_DATA_HDR (uint32_t) ( ('R' << 24) | ('I' << 16) | ('C' << 8) | 'P' )
8
9 #define PCI_RAM_IMAGE_START 0xD0000
10 #define PCI_VGA_RAM_IMAGE_START 0xC0000
11
12 struct rom_header {
13         uint16_t        signature;
14         uint8_t         size;
15         uint8_t         init[3];
16         uint8_t         reserved[0x12];
17         uint16_t        data;
18 };
19
20 struct  pci_data {
21         uint32_t        signature;
22         uint16_t        vendor;
23         uint16_t        device;
24         uint16_t        reserved_1;
25         uint16_t        dlen;
26         uint8_t         drevision;
27         uint8_t         class_lo;
28         uint16_t        class_hi;
29         uint16_t        ilen;
30         uint16_t        irevision;
31         uint8_t         type;
32         uint8_t         indicator;
33         uint16_t        reserved_2;
34 };
35
36 struct rom_header *pci_rom_probe(struct device *dev);
37 struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_header);
38 u32 __attribute__((weak)) map_oprom_vendev(u32 vendev);
39
40 #endif