TianoCore EDK2 master
Loading...
Searching...
No Matches
EmuSimpleFileSystem.h
1/*++ @file
2 Produce Simple File System abstractions for a directory on your PC using Unix APIs.
3 The configuration of what devices to mount or emulate comes from
4 environment variables.
5
6Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
7Portions copyright (c) 2011, Apple Inc. All rights reserved.
8SPDX-License-Identifier: BSD-2-Clause-Patent
9
10
11**/
12
13#ifndef _EMU_SIMPLE_FILE_SYSTEM_H_
14#define _EMU_SIMPLE_FILE_SYSTEM_H_
15
16#include "PiDxe.h"
17
18#include <Guid/FileSystemInfo.h>
19#include <Guid/FileInfo.h>
21
22#include <Protocol/EmuIoThunk.h>
24
25#include <Library/DebugLib.h>
26#include <Library/BaseLib.h>
28#include <Library/UefiLib.h>
32
33extern EFI_DRIVER_BINDING_PROTOCOL gEmuSimpleFileSystemDriverBinding;
34extern EFI_COMPONENT_NAME_PROTOCOL gEmuSimpleFileSystemComponentName;
35extern EFI_COMPONENT_NAME2_PROTOCOL gEmuSimpleFileSystemComponentName2;
36
37#define EMU_SIMPLE_FILE_SYSTEM_PRIVATE_SIGNATURE SIGNATURE_32 ('E', 'M', 'f', 's')
38
39typedef struct {
40 UINTN Signature;
41 EMU_IO_THUNK_PROTOCOL *IoThunk;
42 EFI_SIMPLE_FILE_SYSTEM_PROTOCOL SimpleFileSystem;
44 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
46
47#define EMU_SIMPLE_FILE_SYSTEM_PRIVATE_DATA_FROM_THIS(a) \
48 CR (a, \
49 EMU_SIMPLE_FILE_SYSTEM_PRIVATE, \
50 SimpleFileSystem, \
51 EMU_SIMPLE_FILE_SYSTEM_PRIVATE_SIGNATURE \
52 )
53
54#define EMU_EFI_FILE_PRIVATE_SIGNATURE SIGNATURE_32 ('e', 'm', 'f', 's')
55
56typedef struct {
57 UINTN Signature;
58 EMU_IO_THUNK_PROTOCOL *IoThunk;
59 EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *SimpleFileSystem;
60 EFI_FILE_PROTOCOL EfiFile;
63
64#define EMU_EFI_FILE_PRIVATE_DATA_FROM_THIS(a) \
65 CR (a, \
66 EMU_EFI_FILE_PRIVATE, \
67 EfiFile, \
68 EMU_EFI_FILE_PRIVATE_SIGNATURE \
69 )
70
71#endif
UINT64 UINTN