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