1264095Semaste/*-
2264095Semaste * Copyright (c) 2013 The FreeBSD Foundation
3264095Semaste * All rights reserved.
4264095Semaste *
5264095Semaste * This software was developed by Benno Rice under sponsorship from
6264095Semaste * the FreeBSD Foundation.
7264095Semaste * Redistribution and use in source and binary forms, with or without
8264095Semaste * modification, are permitted provided that the following conditions
9264095Semaste * are met:
10264095Semaste * 1. Redistributions of source code must retain the above copyright
11264095Semaste *    notice, this list of conditions and the following disclaimer.
12264095Semaste * 2. Redistributions in binary form must reproduce the above copyright
13264095Semaste *    notice, this list of conditions and the following disclaimer in the
14264095Semaste *    documentation and/or other materials provided with the distribution.
15264095Semaste *
16264095Semaste * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17264095Semaste * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18264095Semaste * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19264095Semaste * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20264095Semaste * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21264095Semaste * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22264095Semaste * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23264095Semaste * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24264095Semaste * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25264095Semaste * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26264095Semaste * SUCH DAMAGE.
27264095Semaste *
28264095Semaste * $FreeBSD: releng/11.0/sys/boot/efi/loader/loader_efi.h 293724 2016-01-12 02:17:39Z smh $
29264095Semaste */
30264095Semaste
31280950Sandrew#ifndef	_LOADER_EFI_COPY_H_
32280950Sandrew#define	_LOADER_EFI_COPY_H_
33264095Semaste
34293724Ssmh#include <stand.h>
35293724Ssmh
36280950Sandrewint	efi_autoload(void);
37264095Semaste
38280950Sandrewint	efi_getdev(void **vdev, const char *devspec, const char **path);
39280950Sandrewchar	*efi_fmtdev(void *vdev);
40280950Sandrewint	efi_setcurrdev(struct env_var *ev, int flags, const void *value);
41264095Semaste
42280950Sandrewint	efi_copy_init(void);
43264095Semaste
44280950Sandrewssize_t	efi_copyin(const void *src, vm_offset_t dest, const size_t len);
45280950Sandrewssize_t	efi_copyout(const vm_offset_t src, void *dest, const size_t len);
46280950Sandrewssize_t	efi_readin(const int fd, vm_offset_t dest, const size_t len);
47280950Sandrewvoid * efi_translate(vm_offset_t ptr);
48264095Semaste
49280950Sandrewvoid	efi_copy_finish(void);
50280950Sandrew
51280950Sandrew#endif	/* _LOADER_EFI_COPY_H_ */
52