diff options
Diffstat (limited to 'lib/libefivar')
| -rw-r--r-- | lib/libefivar/ProcessorBind.h | 3 | ||||
| -rw-r--r-- | lib/libefivar/efi-osdep.h | 110 | ||||
| -rw-r--r-- | lib/libefivar/efivar-dp-format.c | 3 | ||||
| -rw-r--r-- | lib/libefivar/efivar-dp-parse.c | 3 | ||||
| -rw-r--r-- | lib/libefivar/efivar-dp-xlate.c | 3 | ||||
| -rw-r--r-- | lib/libefivar/uefi-dplib.h | 1 | ||||
| -rw-r--r-- | lib/libefivar/uefi-dputil.c | 3 |
7 files changed, 1 insertions, 125 deletions
diff --git a/lib/libefivar/ProcessorBind.h b/lib/libefivar/ProcessorBind.h deleted file mode 100644 index 46abe715d38f..000000000000 --- a/lib/libefivar/ProcessorBind.h +++ /dev/null @@ -1,3 +0,0 @@ -/* File in public domain */ -/* Brings in the glue for UEFI/EDK2 Tianocore code to run on this OS */ -#include "efi-osdep.h" diff --git a/lib/libefivar/efi-osdep.h b/lib/libefivar/efi-osdep.h deleted file mode 100644 index e91d7405da97..000000000000 --- a/lib/libefivar/efi-osdep.h +++ /dev/null @@ -1,110 +0,0 @@ -/*- - * Copyright (c) 2017 Netflix, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef _EFI_OSDEP_H_ -#define _EFI_OSDEP_H_ - -/* - * Defines to adjust the types that EDK2 uses for FreeBSD so we can - * use the code and headers mostly unchanged. The headers are imported - * all into one directory to avoid case issues with filenames and - * included. The actual code is heavily modified since it has too many - * annoying dependencies that are difficult to satisfy. - */ - -#include <sys/cdefs.h> -#include <stdlib.h> -#include <stdint.h> -#include <uuid.h> - -typedef int8_t INT8; -typedef int16_t INT16; -typedef int32_t INT32; -typedef int64_t INT64; -typedef intptr_t INTN; -typedef uint8_t UINT8; -typedef uint16_t UINT16; -typedef uint32_t UINT32; -typedef uint64_t UINT64; -typedef uintptr_t UINTN; -//typedef uintptr_t EFI_PHYSICAL_ADDRESS; -//typedef uint32_t EFI_IPv4_ADDRESS; -//typedef uint8_t EFI_MAC_ADDRESS[6]; -//typedef uint8_t EFI_IPv6_ADDRESS[16]; -typedef uint8_t CHAR8; -typedef uint16_t CHAR16; -typedef UINT8 BOOLEAN; -typedef void VOID; -//typedef uuid_t GUID; -//typedef uuid_t EFI_GUID; - -/* We can't actually call this stuff, so snip out API syntactic sugar */ -#define INTERFACE_DECL(x) -#define EFIAPI -#define IN -#define OUT -#define CONST const -#define OPTIONAL -//#define TRUE 1 -//#define FALSE 0 - -/* - * EDK2 has fine definitions for these, so let it define them. - */ -#undef NULL -#undef EFI_PAGE_SIZE -#undef EFI_PAGE_MASK - -/* - * Note: the EDK2 code assumed #pragma packed works and PACKED is a - * workaround for some old toolchain issues for EDK2 that aren't - * relevent to FreeBSD. - */ -#define PACKED - -/* - * Since we're not compiling for the UEFI boot time (which use ms abi - * conventions), tell EDK2 to define VA_START correctly. For the boot - * loader, this likely needs to be different. - */ -#define NO_MSABI_VA_FUNCS 1 - -/* - * Finally, we need to define the processor we are in EDK2 terms. - */ -#if defined(__i386__) -#define MDE_CPU_IA32 -#elif defined(__amd64__) -#define MDE_CPU_X64 -#elif defined(__arm__) -#define MDE_CPU_ARM -#elif defined(__aarch64__) -#define MDE_CPU_AARCH64 -#elif defined(__riscv) -#define MDE_CPU_RISCV64 -#endif -/* FreeBSD doesn't have/use MDE_CPU_EBC or MDE_CPU_IPF (ia64) */ - -#endif /* _EFI_OSDEP_H_ */ diff --git a/lib/libefivar/efivar-dp-format.c b/lib/libefivar/efivar-dp-format.c index f2dcf1b91c01..2050b09951cb 100644 --- a/lib/libefivar/efivar-dp-format.c +++ b/lib/libefivar/efivar-dp-format.c @@ -33,10 +33,7 @@ #include <string.h> #include "efichar.h" - -#include "efi-osdep.h" #include "efivar-dp.h" - #include "uefi-dplib.h" /* diff --git a/lib/libefivar/efivar-dp-parse.c b/lib/libefivar/efivar-dp-parse.c index 51c134692f1e..c594e94580da 100644 --- a/lib/libefivar/efivar-dp-parse.c +++ b/lib/libefivar/efivar-dp-parse.c @@ -35,10 +35,7 @@ #include <wchar.h> #include "efichar.h" - -#include "efi-osdep.h" #include "efivar-dp.h" - #include "uefi-dplib.h" /* XXX STUBS -- this stuff doesn't work yet */ diff --git a/lib/libefivar/efivar-dp-xlate.c b/lib/libefivar/efivar-dp-xlate.c index 1e816cecbb81..78d82ba4bce0 100644 --- a/lib/libefivar/efivar-dp-xlate.c +++ b/lib/libefivar/efivar-dp-xlate.c @@ -39,10 +39,7 @@ #include <string.h> #include "efichar.h" - -#include "efi-osdep.h" #include "efivar-dp.h" - #include "uefi-dplib.h" #define MAX_DP_SANITY 4096 /* Biggest device path in bytes */ diff --git a/lib/libefivar/uefi-dplib.h b/lib/libefivar/uefi-dplib.h index 6f76a9763a34..4787088dac19 100644 --- a/lib/libefivar/uefi-dplib.h +++ b/lib/libefivar/uefi-dplib.h @@ -37,6 +37,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef _UEFI_DEVICE_PATH_LIB_H_ #define _UEFI_DEVICE_PATH_LIB_H_ + #include <Uefi.h> #include <Protocol/DevicePathUtilities.h> #include <Protocol/DebugPort.h> diff --git a/lib/libefivar/uefi-dputil.c b/lib/libefivar/uefi-dputil.c index 6e8f3aeca2ce..c31da14eed2d 100644 --- a/lib/libefivar/uefi-dputil.c +++ b/lib/libefivar/uefi-dputil.c @@ -33,9 +33,6 @@ #include <stdio.h> #include <string.h> #include <sys/endian.h> - -#include "efi-osdep.h" - #include "uefi-dplib.h" /* XXX maybe I should include the entire DevicePathUtiltiies.c and ifdef out what we don't use */ |
