19#define EMU_IO_THUNK_PROTOCOL_DATA_SIGNATURE SIGNATURE_32('E','m','u','T')
34 IN CHAR16 *ConfigString,
35 IN BOOLEAN EmuBusDriver
44 if (ThunkIo ==
NULL) {
45 return EFI_INVALID_PARAMETER;
51 if (StartString ==
NULL) {
52 return EFI_OUT_OF_RESOURCES;
55 StrCpyS (StartString, Size /
sizeof (CHAR16), ConfigString);
56 while (*StartString !=
'\0') {
60 SubString = StartString;
61 while (*SubString !=
'\0' && *SubString !=
'!') {
65 if (*SubString ==
'!') {
75 if (Private ==
NULL) {
76 return EFI_OUT_OF_RESOURCES;
79 Private->Signature = EMU_IO_THUNK_PROTOCOL_DATA_SIGNATURE;
80 Private->EmuBusDriver = EmuBusDriver;
83 Private->Data.Instance = (UINT16)Instance++;
91 StartString = SubString;
100 IN BOOLEAN EmuBusDriver,
107 if (mThunkList.ForwardLink == &mThunkList) {
109 return EFI_NOT_FOUND;
112 for (Link = mThunkList.ForwardLink; Link != &mThunkList; Link = Link->ForwardLink) {
114 if (EmuBusDriver & !Private->EmuBusDriver) {
116 }
else if (*Instance ==
NULL) {
118 *Instance = &Private->Data;
120 }
else if (*Instance == &Private->Data) {
122 Link = Link->ForwardLink;
123 if (Link == &mThunkList) {
124 return EFI_NOT_FOUND;
128 *Instance = &Private->Data;
133 return EFI_NOT_FOUND;
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
RETURN_STATUS EFIAPI StrCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
#define INITIALIZE_LIST_HEAD_VARIABLE(ListHead)
LIST_ENTRY *EFIAPI InsertTailList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
#define CR(Record, TYPE, Field, TestSignature)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
CHAR16 * ConfigString
Only be valid after Open() is called.