aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2012-12-05 16:33:26 -0500
committerBjorn Helgaas <bhelgaas@google.com>2012-12-05 16:33:26 -0500
commitdd5fc854de5fd37adfcef8a366cd21a55aa01d3d (patch)
tree48658057b6a005c93dfb54072585f432a96e934a /include
parent8f0d8163b50e01f398b14bcd4dc039ac5ab18d64 (diff)
EFI: Stash ROMs if they're not in the PCI BAR
EFI provides support for providing PCI ROMs via means other than the ROM BAR. This support vanishes after we've exited boot services, so add support for stashing copies of the ROMs in setup_data if they're not otherwise available. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Seth Forshee <seth.forshee@canonical.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/efi.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 8670eb1eb8cd..8eb1be17c801 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -196,6 +196,77 @@ typedef struct {
196 void *create_event_ex; 196 void *create_event_ex;
197} efi_boot_services_t; 197} efi_boot_services_t;
198 198
199typedef enum {
200 EfiPciIoWidthUint8,
201 EfiPciIoWidthUint16,
202 EfiPciIoWidthUint32,
203 EfiPciIoWidthUint64,
204 EfiPciIoWidthFifoUint8,
205 EfiPciIoWidthFifoUint16,
206 EfiPciIoWidthFifoUint32,
207 EfiPciIoWidthFifoUint64,
208 EfiPciIoWidthFillUint8,
209 EfiPciIoWidthFillUint16,
210 EfiPciIoWidthFillUint32,
211 EfiPciIoWidthFillUint64,
212 EfiPciIoWidthMaximum
213} EFI_PCI_IO_PROTOCOL_WIDTH;
214
215typedef enum {
216 EfiPciIoAttributeOperationGet,
217 EfiPciIoAttributeOperationSet,
218 EfiPciIoAttributeOperationEnable,
219 EfiPciIoAttributeOperationDisable,
220 EfiPciIoAttributeOperationSupported,
221 EfiPciIoAttributeOperationMaximum
222} EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION;
223
224
225typedef struct {
226 void *read;
227 void *write;
228} efi_pci_io_protocol_access_t;
229
230typedef struct {
231 void *poll_mem;
232 void *poll_io;
233 efi_pci_io_protocol_access_t mem;
234 efi_pci_io_protocol_access_t io;
235 efi_pci_io_protocol_access_t pci;
236 void *copy_mem;
237 void *map;
238 void *unmap;
239 void *allocate_buffer;
240 void *free_buffer;
241 void *flush;
242 void *get_location;
243 void *attributes;
244 void *get_bar_attributes;
245 void *set_bar_attributes;
246 uint64_t romsize;
247 void *romimage;
248} efi_pci_io_protocol;
249
250#define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001
251#define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002
252#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO 0x0004
253#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY 0x0008
254#define EFI_PCI_IO_ATTRIBUTE_VGA_IO 0x0010
255#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO 0x0020
256#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO 0x0040
257#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080
258#define EFI_PCI_IO_ATTRIBUTE_IO 0x0100
259#define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200
260#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400
261#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED 0x0800
262#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000
263#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE 0x2000
264#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM 0x4000
265#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000
266#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16 0x10000
267#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000
268#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 0x40000
269
199/* 270/*
200 * Types and defines for EFI ResetSystem 271 * Types and defines for EFI ResetSystem
201 */ 272 */