efilib.h revision 201941
1218885Sdim/*- 2218885Sdim * Copyright (c) 2000 Doug Rabson 3218885Sdim * Copyright (c) 2006 Marcel Moolenaar 4218885Sdim * All rights reserved. 5218885Sdim * 6218885Sdim * Redistribution and use in source and binary forms, with or without 7218885Sdim * modification, are permitted provided that the following conditions 8218885Sdim * are met: 9218885Sdim * 1. Redistributions of source code must retain the above copyright 10218885Sdim * notice, this list of conditions and the following disclaimer. 11218885Sdim * 2. Redistributions in binary form must reproduce the above copyright 12218885Sdim * notice, this list of conditions and the following disclaimer in the 13218885Sdim * documentation and/or other materials provided with the distribution. 14249423Sdim * 15249423Sdim * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16218885Sdim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17218885Sdim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18218885Sdim * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19218885Sdim * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20218885Sdim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21218885Sdim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22218885Sdim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23218885Sdim * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24218885Sdim * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25218885Sdim * SUCH DAMAGE. 26218885Sdim * 27218885Sdim * $FreeBSD: head/sys/boot/efi/include/efilib.h 201941 2010-01-09 22:54:29Z marcel $ 28218885Sdim */ 29218885Sdim 30218885Sdim#include <stand.h> 31218885Sdim 32218885Sdimextern EFI_HANDLE IH; 33218885Sdimextern EFI_SYSTEM_TABLE *ST; 34218885Sdimextern EFI_BOOT_SERVICES *BS; 35extern EFI_RUNTIME_SERVICES *RS; 36 37extern struct devsw efipart_dev; 38extern struct devsw efinet_dev; 39extern struct netif_driver efinetif; 40 41void *efi_get_table(EFI_GUID *tbl); 42void efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table); 43 44int efi_register_handles(struct devsw *, EFI_HANDLE *, int); 45EFI_HANDLE efi_find_handle(struct devsw *, int); 46int efi_handle_lookup(EFI_HANDLE, struct devsw **, int *); 47 48int efi_status_to_errno(EFI_STATUS); 49time_t efi_time(EFI_TIME *); 50 51EFI_STATUS main(int argc, CHAR16 *argv[]); 52void exit(EFI_STATUS status); 53