Home | History | Annotate | Line # | Download | only in include
      1  1.7  riastrad /*	$NetBSD: efi.h,v 1.7 2022/08/20 10:55:27 riastradh Exp $	*/
      2  1.1    cherry 
      3  1.1    cherry /*-
      4  1.1    cherry  * Copyright (c) 2004 Marcel Moolenaar
      5  1.1    cherry  * All rights reserved.
      6  1.1    cherry  *
      7  1.1    cherry  * Redistribution and use in source and binary forms, with or without
      8  1.1    cherry  * modification, are permitted provided that the following conditions
      9  1.1    cherry  * are met:
     10  1.1    cherry  *
     11  1.1    cherry  * 1. Redistributions of source code must retain the above copyright
     12  1.1    cherry  *    notice, this list of conditions and the following disclaimer.
     13  1.1    cherry  * 2. Redistributions in binary form must reproduce the above copyright
     14  1.1    cherry  *    notice, this list of conditions and the following disclaimer in the
     15  1.1    cherry  *    documentation and/or other materials provided with the distribution.
     16  1.1    cherry  *
     17  1.1    cherry  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     18  1.1    cherry  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     19  1.1    cherry  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     20  1.1    cherry  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     21  1.1    cherry  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     22  1.1    cherry  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     23  1.1    cherry  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     24  1.1    cherry  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     25  1.1    cherry  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     26  1.1    cherry  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27  1.1    cherry  *
     28  1.1    cherry  * $FreeBSD$
     29  1.1    cherry  */
     30  1.1    cherry 
     31  1.1    cherry #ifndef _MACHINE_EFI_H_
     32  1.1    cherry #define _MACHINE_EFI_H_
     33  1.1    cherry 
     34  1.1    cherry #include <sys/uuid.h>
     35  1.1    cherry 
     36  1.7  riastrad #include <dev/efi/efi.h>
     37  1.7  riastrad 
     38  1.1    cherry #define	EFI_PAGE_SHIFT		12
     39  1.1    cherry #define	EFI_PAGE_SIZE		(1 << EFI_PAGE_SHIFT)
     40  1.1    cherry #define	EFI_PAGE_MASK		(EFI_PAGE_SIZE - 1)
     41  1.1    cherry 
     42  1.1    cherry #define	EFI_TABLE_ACPI20			\
     43  1.1    cherry 	{0x8868e871,0xe4f1,0x11d3,0xbc,0x22,{0x00,0x80,0xc7,0x3c,0x88,0x81}}
     44  1.1    cherry #define	EFI_TABLE_SAL				\
     45  1.1    cherry 	{0xeb9d2d32,0x2d88,0x11d3,0x9a,0x16,{0x00,0x90,0x27,0x3f,0xc1,0x4d}}
     46  1.1    cherry 
     47  1.1    cherry void efi_boot_finish(void);
     48  1.1    cherry int efi_boot_minimal(uint64_t);
     49  1.1    cherry void *efi_get_table(struct uuid *);
     50  1.1    cherry void efi_get_time(struct efi_tm *);
     51  1.1    cherry struct efi_md *efi_md_first(void);
     52  1.1    cherry struct efi_md *efi_md_next(struct efi_md *);
     53  1.1    cherry void efi_reset_system(void);
     54  1.1    cherry efi_status efi_set_time(struct efi_tm *);
     55  1.1    cherry 
     56  1.1    cherry #endif /* _MACHINE_EFI_H_ */
     57