Changeset 26e7d6d in mainline for boot/genarch/include/efi.h


Ignore:
Timestamp:
2011-09-19T16:31:00Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
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.
Message:

Merge mainline changes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • boot/genarch/include/efi.h

    r3842a955 r26e7d6d  
    11/*
    2  * Copyright (c) 2006 Jakub Jermar
     2 * Copyright (c) 2011 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 #ifndef KERN_FHC_H_
    30 #define KERN_FHC_H_
     29#ifndef BOOT_EFI_H_
     30#define BOOT_EFI_H_
    3131
    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>
    3633
    3734typedef 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
     50typedef union {
     51        uint8_t bytes[16];
     52        struct {
     53                uint64_t low;
     54                uint64_t high;
     55        };
     56} efi_guid_t;
    4157
    4258typedef 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;
    4762
    4863typedef 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
     79typedef 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;
    5295
    5396typedef 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;
    58103
    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
    63105
    64 extern bool ofw_fhc_map_interrupt(ofw_tree_node_t *, ofw_fhc_reg_t *,
    65     uint32_t, int *, cir_t *, void **);
     106extern void *efi_vendor_table_find(efi_system_table_t *, efi_guid_t);
    66107
    67108#endif
Note: See TracChangeset for help on using the changeset viewer.