Changeset 26e7d6d in mainline for boot/genarch/include/efi.h
- Timestamp:
- 2011-09-19T16:31:00Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a347a11
- Parents:
- 3842a955 (diff), 086290d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
boot/genarch/include/efi.h
r3842a955 r26e7d6d 1 1 /* 2 * Copyright (c) 20 06Jakub Jermar2 * Copyright (c) 2011 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 #ifndef KERN_FHC_H_30 #define KERN_FHC_H_29 #ifndef BOOT_EFI_H_ 30 #define BOOT_EFI_H_ 31 31 32 #include <genarch/ofw/ofw_tree.h> 33 #include <typedefs.h> 34 #include <ddi/irq.h> 35 #include <typedefs.h> 32 #include <arch/types.h> 36 33 37 34 typedef struct { 38 uint64_t addr; 39 uint32_t size; 40 } __attribute__ ((packed)) ofw_fhc_reg_t; 35 uint64_t signature; 36 uint32_t revision; 37 uint32_t header_size; 38 uint32_t crc32; 39 uint32_t reserved; 40 } efi_table_header_t; 41 42 #define SAL_SYSTEM_TABLE_GUID \ 43 { \ 44 { \ 45 0x32, 0x2d, 0x9d, 0xeb, 0x88, 0x2d, 0xd3, 0x11, \ 46 0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d \ 47 } \ 48 } 49 50 typedef union { 51 uint8_t bytes[16]; 52 struct { 53 uint64_t low; 54 uint64_t high; 55 }; 56 } efi_guid_t; 41 57 42 58 typedef struct { 43 uint64_t child_base; 44 uint64_t parent_base; 45 uint32_t size; 46 } __attribute__ ((packed)) ofw_fhc_range_t; 59 efi_guid_t guid; 60 void *table; 61 } efi_configuration_table_t; 47 62 48 63 typedef struct { 49 uint64_t addr; 50 uint32_t size; 51 } __attribute__ ((packed)) ofw_central_reg_t; 64 efi_table_header_t hdr; 65 char *fw_vendor; 66 uint32_t fw_revision; 67 void *cons_in_handle; 68 void *cons_in; 69 void *cons_out_handle; 70 void *cons_out; 71 void *cons_err_handle; 72 void *cons_err; 73 void *runtime_services; 74 void *boot_services; 75 sysarg_t conf_table_entries; 76 efi_configuration_table_t *conf_table; 77 } efi_system_table_t; 78 79 typedef enum { 80 EFI_RESERVED, 81 EFI_LOADER_CODE, 82 EFI_LOADER_DATA, 83 EFI_BOOT_SERVICES_CODE, 84 EFI_BOOT_SERVICES_DATA, 85 EFI_RUNTIME_SERVICES_CODE, 86 EFI_RUNTIME_SERVICES_DATA, 87 EFI_CONVENTIONAL_MEMORY, 88 EFI_UNUSABLE_MEMORY, 89 EFI_ACPI_RECLAIM_MEMORY, 90 EFI_ACPI_MEMORY_NVS, 91 EFI_MEMORY_MAPPED_IO, 92 EFI_MEMORY_MAPPED_IO_PORT_SPACE, 93 EFI_PAL_CODE 94 } efi_memory_type_t; 52 95 53 96 typedef struct { 54 uint64_t child_base; 55 uint64_t parent_base; 56 uint32_t size; 57 } __attribute__ ((packed)) ofw_central_range_t; 97 uint32_t type; 98 uint64_t phys_start; 99 uint64_t virt_start; 100 uint64_t pages; 101 uint64_t attribute; 102 } efi_v1_memdesc_t; 58 103 59 extern bool ofw_fhc_apply_ranges(ofw_tree_node_t *, ofw_fhc_reg_t *, 60 uintptr_t *); 61 extern bool ofw_central_apply_ranges(ofw_tree_node_t *, ofw_central_reg_t *, 62 uintptr_t *); 104 #define EFI_PAGE_SIZE 4096 63 105 64 extern bool ofw_fhc_map_interrupt(ofw_tree_node_t *, ofw_fhc_reg_t *, 65 uint32_t, int *, cir_t *, void **); 106 extern void *efi_vendor_table_find(efi_system_table_t *, efi_guid_t); 66 107 67 108 #endif
Note:
See TracChangeset
for help on using the changeset viewer.