1322039Simp/*-
2322039Simp * Copyright (c) 2016 Eric McCorkle
3322039Simp * All rights reserved.
4322039Simp *
5322039Simp * Redistribution and use in source and binary forms, with or without
6322039Simp * modification, are permitted provided that the following conditions
7322039Simp * are met:
8322039Simp * 1. Redistributions of source code must retain the above copyright
9322039Simp *    notice, this list of conditions and the following disclaimer.
10322039Simp * 2. Redistributions in binary form must reproduce the above copyright
11322039Simp *    notice, this list of conditions and the following disclaimer in the
12322039Simp *    documentation and/or other materials provided with the distribution.
13322039Simp *
14322039Simp * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15322039Simp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16322039Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17322039Simp * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18322039Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19322039Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20322039Simp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21322039Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22322039Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23322039Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24322039Simp * SUCH DAMAGE.
25322039Simp *
26322039Simp * $FreeBSD: stable/11/stand/efi/include/efizfs.h 344371 2019-02-20 18:34:20Z kevans $
27322039Simp */
28322039Simp
29322039Simp#include <stdint.h>
30329129Skevans#include <stdbool.h>
31322039Simp
32322039Simp#ifndef _EFIZFS_H_
33322039Simp#define _EFIZFS_H_
34322039Simp
35322039Simp#ifdef EFI_ZFS_BOOT
36322039Simptypedef STAILQ_HEAD(zfsinfo_list, zfsinfo) zfsinfo_list_t;
37322039Simp
38322039Simptypedef struct zfsinfo
39322039Simp{
40322039Simp	STAILQ_ENTRY(zfsinfo) zi_link;
41322039Simp	EFI_HANDLE zi_handle;
42322039Simp        uint64_t zi_pool_guid;
43322039Simp} zfsinfo_t;
44322039Simp
45322039Simpextern uint64_t pool_guid;
46322039Simp
47344371Skevansvoid efi_zfs_probe(void);
48344371SkevansEFI_HANDLE efizfs_get_handle_by_guid(uint64_t);
49344371Skevansbool efizfs_get_guid_by_handle(EFI_HANDLE, uint64_t *);
50344371Skevanszfsinfo_list_t *efizfs_get_zfsinfo_list(void);
51344371Skevansvoid efizfs_set_preferred(EFI_HANDLE);
52322039Simp
53322039Simp#endif
54322039Simp
55322039Simp#endif
56