]> code.delx.au - refind/blob - filesystems/fsw_efi_edk2_base.h
Ext4fs support.
[refind] / filesystems / fsw_efi_edk2_base.h
1 /**
2 * \file fsw_efi_edk2_base.h
3 * Base definitions for the EDK EFI Toolkit environment.
4 */
5 /*
6 * Copyright (c) 2012 Stefan Agner
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met:
11 *
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 *
15 * * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the
18 * distribution.
19 *
20 * * Neither the name of Christoph Pfisterer nor the names of the
21 * contributors may be used to endorse or promote products derived
22 * from this software without specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 */
36 /*
37 * Copyright (C) 2010 Oracle Corporation
38 *
39 * This file is part of VirtualBox Open Source Edition (OSE), as
40 * available from http://www.virtualbox.org. This file is free software;
41 * you can redistribute it and/or modify it under the terms of the GNU
42 * General Public License (GPL) as published by the Free Software
43 * Foundation, in version 2 as it comes in the "COPYING" file of the
44 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
45 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
46 */
47
48 #ifndef _FSW_EFI_EDK2_BASE_H_
49 #define _FSW_EFI_EDK2_BASE_H_
50 /*
51 * Here is common declarations for EDK<->EDK2 compatibility
52 */
53 # include <Base.h>
54 # include <Uefi.h>
55 # include <Library/DebugLib.h>
56 # include <Library/BaseLib.h>
57 # include <Protocol/DriverBinding.h>
58 # include <Library/BaseMemoryLib.h>
59 # include <Library/UefiRuntimeServicesTableLib.h>
60 # include <Library/UefiDriverEntryPoint.h>
61 # include <Library/UefiBootServicesTableLib.h>
62 # include <Library/MemoryAllocationLib.h>
63 # include <Library/DevicePathLib.h>
64 # include <Protocol/DevicePathFromText.h>
65 # include <Protocol/DevicePathToText.h>
66 # include <Protocol/DebugPort.h>
67 # include <Protocol/DebugSupport.h>
68 # include <Library/PrintLib.h>
69 # include <Library/UefiLib.h>
70 # include <Protocol/SimpleFileSystem.h>
71 # include <Protocol/BlockIo.h>
72 # include <Protocol/DiskIo.h>
73 # include <Guid/FileSystemInfo.h>
74 # include <Guid/FileInfo.h>
75 # include <Guid/FileSystemVolumeLabelInfo.h>
76 # include <Protocol/ComponentName.h>
77
78 # define BS gBS
79 # define PROTO_NAME(x) gEfi ## x ## Guid
80 # define GUID_NAME(x) gEfi ## x ## Guid
81
82 # define EFI_FILE_HANDLE_REVISION EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION
83 # define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL
84 # define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO EFI_FILE_SYSTEM_VOLUME_LABEL
85 # define EFI_SIGNATURE_32(a, b, c, d) SIGNATURE_32(a, b, c, d)
86 # define DivU64x32(x,y,z) DivU64x32((x),(y))
87
88
89 // INTN CompareGuidEdk1(
90 // IN EFI_GUID *Guid1,
91 // IN EFI_GUID *Guid2
92 // );
93
94 //#define CompareGuid(x, y) CompareGuidEdk1((x),(y))
95 //#define FSW_DEBUG_LEVEL 3
96
97 int fsw_streq_ISO88591_UTF16(void *s1data, void *s2data, int len);
98
99 #endif