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