efi.h revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
/* $NetBSD: efi.h,v 1.1 2006/04/07 14:21:18 cherry Exp $ */
/*-
* Copyright (c) 2004 Marcel Moolenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef _MACHINE_EFI_H_
#define _MACHINE_EFI_H_
#define EFI_PAGE_SHIFT 12
#define EFI_TABLE_ACPI20 \
{0x8868e871,0xe4f1,0x11d3,0xbc,0x22,{0x00,0x80,0xc7,0x3c,0x88,0x81}}
#define EFI_TABLE_SAL \
{0xeb9d2d32,0x2d88,0x11d3,0x9a,0x16,{0x00,0x90,0x27,0x3f,0xc1,0x4d}}
enum efi_reset {
};
typedef unsigned long efi_status;
struct efi_cfgtbl {
};
struct efi_md {
#define EFI_MD_TYPE_NULL 0
void *md_virt;
#define EFI_MD_ATTR_UC 0x0000000000000001UL
#define EFI_MD_ATTR_WC 0x0000000000000002UL
#define EFI_MD_ATTR_WT 0x0000000000000004UL
#define EFI_MD_ATTR_WB 0x0000000000000008UL
#define EFI_MD_ATTR_UCE 0x0000000000000010UL
#define EFI_MD_ATTR_WP 0x0000000000001000UL
#define EFI_MD_ATTR_RP 0x0000000000002000UL
#define EFI_MD_ATTR_XP 0x0000000000004000UL
#define EFI_MD_ATTR_RT 0x8000000000000000UL
};
struct efi_tm {
};
struct efi_tmcap {
};
struct efi_tblhdr {
};
struct efi_rt {
struct efi_tblhdr rt_hdr;
struct efi_tm *);
struct efi_md *);
u_long *, void *);
u_long, void *);
efi_char *);
};
struct efi_systbl {
struct efi_tblhdr st_hdr;
#define EFI_SYSTBL_SIG 0x5453595320494249UL
void *st_cin;
void *st_cinif;
void *st_cout;
void *st_coutif;
void *st_cerr;
void *st_cerrif;
void *st_bs;
};
void efi_boot_finish(void);
int efi_boot_minimal(uint64_t);
void *efi_get_table(struct uuid *);
void efi_get_time(struct efi_tm *);
struct efi_md *efi_md_first(void);
void efi_reset_system(void);
#endif /* _MACHINE_EFI_H_ */