~ubuntu-branches/debian/experimental/linux-tools/experimental

« back to all changes in this revision

Viewing changes to include/linux/efi.h

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2014-02-02 16:57:49 UTC
  • mfrom: (1.1.10) (0.1.21 sid)
  • Revision ID: package-import@ubuntu.com-20140202165749-tw94o9t1t0a8txk6
Tags: 3.13-1~exp2
Merge changes from sid up to 3.12.6-3

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
typedef unsigned long efi_status_t;
40
40
typedef u8 efi_bool_t;
41
41
typedef u16 efi_char16_t;               /* UNICODE character */
 
42
typedef u64 efi_physical_addr_t;
 
43
typedef void *efi_handle_t;
42
44
 
43
45
 
44
46
typedef struct {
96
98
#define EFI_MEMORY_DESCRIPTOR_VERSION   1
97
99
 
98
100
#define EFI_PAGE_SHIFT          12
 
101
#define EFI_PAGE_SIZE           (1UL << EFI_PAGE_SHIFT)
99
102
 
100
103
typedef struct {
101
104
        u32 type;
157
160
        efi_table_hdr_t hdr;
158
161
        void *raise_tpl;
159
162
        void *restore_tpl;
160
 
        void *allocate_pages;
161
 
        void *free_pages;
162
 
        void *get_memory_map;
163
 
        void *allocate_pool;
164
 
        void *free_pool;
 
163
        efi_status_t (*allocate_pages)(int, int, unsigned long,
 
164
                                       efi_physical_addr_t *);
 
165
        efi_status_t (*free_pages)(efi_physical_addr_t, unsigned long);
 
166
        efi_status_t (*get_memory_map)(unsigned long *, void *, unsigned long *,
 
167
                                       unsigned long *, u32 *);
 
168
        efi_status_t (*allocate_pool)(int, unsigned long, void **);
 
169
        efi_status_t (*free_pool)(void *);
165
170
        void *create_event;
166
171
        void *set_timer;
167
172
        void *wait_for_event;
171
176
        void *install_protocol_interface;
172
177
        void *reinstall_protocol_interface;
173
178
        void *uninstall_protocol_interface;
174
 
        void *handle_protocol;
 
179
        efi_status_t (*handle_protocol)(efi_handle_t, efi_guid_t *, void **);
175
180
        void *__reserved;
176
181
        void *register_protocol_notify;
177
182
        void *locate_handle;
181
186
        void *start_image;
182
187
        void *exit;
183
188
        void *unload_image;
184
 
        void *exit_boot_services;
 
189
        efi_status_t (*exit_boot_services)(efi_handle_t, unsigned long);
185
190
        void *get_next_monotonic_count;
186
191
        void *stall;
187
192
        void *set_watchdog_timer;
404
409
        unsigned long table;
405
410
} efi_config_table_t;
406
411
 
 
412
typedef struct {
 
413
        efi_guid_t guid;
 
414
        const char *name;
 
415
        unsigned long *ptr;
 
416
} efi_config_table_type_t;
 
417
 
407
418
#define EFI_SYSTEM_TABLE_SIGNATURE ((u64)0x5453595320494249ULL)
408
419
 
409
420
#define EFI_2_30_SYSTEM_TABLE_REVISION  ((2 << 16) | (30))
488
499
        unsigned long unload;
489
500
} efi_loaded_image_t;
490
501
 
491
 
typedef struct {
492
 
        u64 revision;
493
 
        void *open_volume;
494
 
} efi_file_io_interface_t;
495
502
 
496
503
typedef struct {
497
504
        u64 size;
504
511
        efi_char16_t filename[1];
505
512
} efi_file_info_t;
506
513
 
507
 
typedef struct {
 
514
typedef struct _efi_file_handle {
508
515
        u64 revision;
509
 
        void *open;
510
 
        void *close;
 
516
        efi_status_t (*open)(struct _efi_file_handle *,
 
517
                             struct _efi_file_handle **,
 
518
                             efi_char16_t *, u64, u64);
 
519
        efi_status_t (*close)(struct _efi_file_handle *);
511
520
        void *delete;
512
 
        void *read;
 
521
        efi_status_t (*read)(struct _efi_file_handle *, unsigned long *,
 
522
                             void *);
513
523
        void *write;
514
524
        void *get_position;
515
525
        void *set_position;
516
 
        void *get_info;
 
526
        efi_status_t (*get_info)(struct _efi_file_handle *, efi_guid_t *,
 
527
                        unsigned long *, void *);
517
528
        void *set_info;
518
529
        void *flush;
519
530
} efi_file_handle_t;
520
531
 
 
532
typedef struct _efi_file_io_interface {
 
533
        u64 revision;
 
534
        int (*open_volume)(struct _efi_file_io_interface *,
 
535
                           efi_file_handle_t **);
 
536
} efi_file_io_interface_t;
 
537
 
521
538
#define EFI_FILE_MODE_READ      0x0000000000000001
522
539
#define EFI_FILE_MODE_WRITE     0x0000000000000002
523
540
#define EFI_FILE_MODE_CREATE    0x8000000000000000
552
569
        efi_get_next_high_mono_count_t *get_next_high_mono_count;
553
570
        efi_reset_system_t *reset_system;
554
571
        efi_set_virtual_address_map_t *set_virtual_address_map;
 
572
        struct efi_memory_map *memmap;
555
573
} efi;
556
574
 
557
575
static inline int
587
605
}
588
606
#endif
589
607
extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
 
608
extern int efi_config_init(efi_config_table_type_t *arch_tables);
590
609
extern u64 efi_get_iobase (void);
591
610
extern u32 efi_mem_type (unsigned long phys_addr);
592
611
extern u64 efi_mem_attributes (unsigned long phys_addr);
782
801
        struct efi_variable var;
783
802
        struct list_head list;
784
803
        struct kobject kobj;
 
804
        bool scanning;
 
805
        bool deleting;
 
806
};
 
807
 
 
808
 
 
809
struct efi_simple_text_output_protocol {
 
810
        void *reset;
 
811
        efi_status_t (*output_string)(void *, void *);
 
812
        void *test_string;
785
813
};
786
814
 
787
815
extern struct list_head efivar_sysfs_list;
840
868
#if defined(CONFIG_EFI_VARS) || defined(CONFIG_EFI_VARS_MODULE)
841
869
int efivars_sysfs_init(void);
842
870
 
 
871
#define EFIVARS_DATA_SIZE_MAX 1024
 
872
 
843
873
#endif /* CONFIG_EFI_VARS */
844
874
 
845
875
#endif /* _LINUX_EFI_H */