TianoCore EDK2 master
Loading...
Searching...
No Matches
RamDiskImpl.c
Go to the documentation of this file.
1
11#include "RamDiskImpl.h"
12
13CHAR16 mRamDiskStorageName[] = L"RAM_DISK_CONFIGURATION";
14
15RAM_DISK_CONFIG_PRIVATE_DATA mRamDiskConfigPrivateDataTemplate = {
16 RAM_DISK_CONFIG_PRIVATE_DATA_SIGNATURE,
17 {
18 EFI_PAGE_SIZE,
19 RAM_DISK_BOOT_SERVICE_DATA_MEMORY
20 },
21 {
25 }
26};
27
28HII_VENDOR_DEVICE_PATH mRamDiskHiiVendorDevicePath = {
29 {
30 {
33 {
34 (UINT8)(sizeof (VENDOR_DEVICE_PATH)),
35 (UINT8)((sizeof (VENDOR_DEVICE_PATH)) >> 8)
36 }
37 },
38 RAM_DISK_FORM_SET_GUID
39 },
40 {
41 END_DEVICE_PATH_TYPE,
42 END_ENTIRE_DEVICE_PATH_SUBTYPE,
43 {
44 (UINT8)(END_DEVICE_PATH_LENGTH),
45 (UINT8)((END_DEVICE_PATH_LENGTH) >> 8)
46 }
47 }
48};
49
63 IN OUT RAM_DISK_CONFIG_PRIVATE_DATA *ConfigPrivateData
64 )
65{
66 EFI_STATUS Status;
67 EFI_HII_HANDLE HiiHandle;
68 EFI_HANDLE DriverHandle;
70
71 DriverHandle = NULL;
72 ConfigAccess = &ConfigPrivateData->ConfigAccess;
73 Status = gBS->InstallMultipleProtocolInterfaces (
74 &DriverHandle,
75 &gEfiDevicePathProtocolGuid,
76 &mRamDiskHiiVendorDevicePath,
77 &gEfiHiiConfigAccessProtocolGuid,
78 ConfigAccess,
79 NULL
80 );
81 if (EFI_ERROR (Status)) {
82 return Status;
83 }
84
85 ConfigPrivateData->DriverHandle = DriverHandle;
86
87 //
88 // Publish the HII package list
89 //
90 HiiHandle = HiiAddPackages (
91 &gRamDiskFormSetGuid,
92 DriverHandle,
93 RamDiskDxeStrings,
95 NULL
96 );
97 if (HiiHandle == NULL) {
98 gBS->UninstallMultipleProtocolInterfaces (
99 DriverHandle,
100 &gEfiDevicePathProtocolGuid,
101 &mRamDiskHiiVendorDevicePath,
102 &gEfiHiiConfigAccessProtocolGuid,
103 ConfigAccess,
104 NULL
105 );
106 return EFI_OUT_OF_RESOURCES;
107 }
108
109 ConfigPrivateData->HiiHandle = HiiHandle;
110
111 return EFI_SUCCESS;
112}
113
121VOID
123 IN OUT RAM_DISK_CONFIG_PRIVATE_DATA *ConfigPrivateData
124 )
125{
126 //
127 // Uninstall HII package list
128 //
129 if (ConfigPrivateData->HiiHandle != NULL) {
130 HiiRemovePackages (ConfigPrivateData->HiiHandle);
131 ConfigPrivateData->HiiHandle = NULL;
132 }
133
134 //
135 // Uninstall HII Config Access Protocol
136 //
137 if (ConfigPrivateData->DriverHandle != NULL) {
138 gBS->UninstallMultipleProtocolInterfaces (
139 ConfigPrivateData->DriverHandle,
140 &gEfiDevicePathProtocolGuid,
141 &mRamDiskHiiVendorDevicePath,
142 &gEfiHiiConfigAccessProtocolGuid,
143 &ConfigPrivateData->ConfigAccess,
144 NULL
145 );
146 ConfigPrivateData->DriverHandle = NULL;
147 }
148
149 FreePool (ConfigPrivateData);
150}
151
156VOID
158 VOID
159 )
160{
161 LIST_ENTRY *Entry;
162 LIST_ENTRY *NextEntry;
163 RAM_DISK_PRIVATE_DATA *PrivateData;
164
165 if (!IsListEmpty (&RegisteredRamDisks)) {
166 BASE_LIST_FOR_EACH_SAFE (Entry, NextEntry, &RegisteredRamDisks) {
167 PrivateData = RAM_DISK_PRIVATE_FROM_THIS (Entry);
168
169 gBS->UninstallMultipleProtocolInterfaces (
170 PrivateData->Handle,
171 &gEfiBlockIoProtocolGuid,
172 &PrivateData->BlockIo,
173 &gEfiBlockIo2ProtocolGuid,
174 &PrivateData->BlockIo2,
175 &gEfiDevicePathProtocolGuid,
176 (EFI_DEVICE_PATH_PROTOCOL *)PrivateData->DevicePath,
177 NULL
178 );
179
180 RemoveEntryList (&PrivateData->ThisInstance);
181
182 if (RamDiskCreateHii == PrivateData->CreateMethod) {
183 //
184 // If a RAM disk is created within HII, then the RamDiskDxe driver
185 // driver is responsible for freeing the allocated memory for the
186 // RAM disk.
187 //
188 FreePool ((VOID *)(UINTN)PrivateData->StartingAddr);
189 }
190
191 FreePool (PrivateData->DevicePath);
192 FreePool (PrivateData);
193 }
194 }
195}
196
225EFIAPI
228 IN CONST EFI_STRING Request,
229 OUT EFI_STRING *Progress,
230 OUT EFI_STRING *Results
231 )
232{
233 if ((Progress == NULL) || (Results == NULL)) {
234 return EFI_INVALID_PARAMETER;
235 }
236
237 *Progress = Request;
238 return EFI_NOT_FOUND;
239}
240
260EFIAPI
263 IN CONST EFI_STRING Configuration,
264 OUT EFI_STRING *Progress
265 )
266{
267 if ((Configuration == NULL) || (Progress == NULL)) {
268 return EFI_INVALID_PARAMETER;
269 }
270
271 *Progress = Configuration;
272
273 return EFI_NOT_FOUND;
274}
275
293 IN UINT64 Size,
294 IN EFI_FILE_HANDLE FileHandle,
295 IN UINT8 MemoryType
296 )
297{
298 EFI_STATUS Status;
299 UINTN BufferSize;
300 UINT64 *StartingAddr;
301 EFI_INPUT_KEY Key;
302 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
303 RAM_DISK_PRIVATE_DATA *PrivateData;
304 EFI_FILE_INFO *FileInformation;
305
306 FileInformation = NULL;
307 StartingAddr = NULL;
308
309 if (FileHandle != NULL) {
310 //
311 // Create from file.
312 //
313 FileInformation = FileInfo (FileHandle);
314 if (NULL == FileInformation) {
315 do {
317 EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
318 &Key,
319 L"",
320 L"Not enough memory to get the file information!",
321 L"Press ENTER to continue ...",
322 L"",
323 NULL
324 );
325 } while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
326
327 return EFI_OUT_OF_RESOURCES;
328 }
329
330 //
331 // Update the size of RAM disk according to the file size.
332 //
333 Size = FileInformation->FileSize;
334 }
335
336 if (Size > (UINTN)-1) {
337 do {
339 EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
340 &Key,
341 L"",
342 L"The given RAM disk size is too large!",
343 L"Press ENTER to continue ...",
344 L"",
345 NULL
346 );
347 } while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
348
349 return EFI_OUT_OF_RESOURCES;
350 }
351
352 if (MemoryType == RAM_DISK_BOOT_SERVICE_DATA_MEMORY) {
353 Status = gBS->AllocatePool (
355 (UINTN)Size,
356 (VOID **)&StartingAddr
357 );
358 } else if (MemoryType == RAM_DISK_RESERVED_MEMORY) {
359 Status = gBS->AllocatePool (
361 (UINTN)Size,
362 (VOID **)&StartingAddr
363 );
364 } else {
365 Status = EFI_INVALID_PARAMETER;
366 }
367
368 if ((StartingAddr == NULL) || EFI_ERROR (Status)) {
369 do {
371 EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
372 &Key,
373 L"",
374 L"Not enough memory to create the RAM disk!",
375 L"Press ENTER to continue ...",
376 L"",
377 NULL
378 );
379 } while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
380
381 return EFI_OUT_OF_RESOURCES;
382 }
383
384 if (FileHandle != NULL) {
385 //
386 // Copy the file content to the RAM disk.
387 //
388 BufferSize = (UINTN)Size;
389 FileHandle->Read (
390 FileHandle,
391 &BufferSize,
392 (VOID *)(UINTN)StartingAddr
393 );
394 if (BufferSize != FileInformation->FileSize) {
395 do {
397 EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
398 &Key,
399 L"",
400 L"File content read error!",
401 L"Press ENTER to continue ...",
402 L"",
403 NULL
404 );
405 } while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
406
407 Status = EFI_DEVICE_ERROR;
408 goto ErrorExit;
409 }
410 }
411
412 //
413 // Register the newly created RAM disk.
414 //
415 Status = RamDiskRegister (
416 ((UINT64)(UINTN)StartingAddr),
417 Size,
418 &gEfiVirtualDiskGuid,
419 NULL,
420 &DevicePath
421 );
422 if (EFI_ERROR (Status)) {
423 do {
425 EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
426 &Key,
427 L"",
428 L"Fail to register the newly created RAM disk!",
429 L"Press ENTER to continue ...",
430 L"",
431 NULL
432 );
433 } while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
434
435 goto ErrorExit;
436 }
437
438 //
439 // If RAM disk is created within HII, memory should be freed when the
440 // RAM disk is unregisterd.
441 //
442 PrivateData = RAM_DISK_PRIVATE_FROM_THIS (RegisteredRamDisks.BackLink);
443 PrivateData->CreateMethod = RamDiskCreateHii;
444
445 return EFI_SUCCESS;
446
447ErrorExit:
448 gBS->FreePool (StartingAddr);
449 return Status;
450}
451
460VOID
462 IN OUT RAM_DISK_CONFIG_PRIVATE_DATA *ConfigPrivate
463 )
464{
465 VOID *StartOpCodeHandle;
466 VOID *EndOpCodeHandle;
467 EFI_IFR_GUID_LABEL *StartLabel;
468 EFI_IFR_GUID_LABEL *EndLabel;
469 LIST_ENTRY *Entry;
470 UINTN Index;
471 RAM_DISK_PRIVATE_DATA *PrivateData;
472 CHAR16 *String;
473 CHAR16 RamDiskStr[128];
474 EFI_STRING_ID StringId;
475
476 //
477 // Init OpCode Handle
478 //
479 StartOpCodeHandle = HiiAllocateOpCodeHandle ();
480 ASSERT (StartOpCodeHandle != NULL);
481
482 EndOpCodeHandle = HiiAllocateOpCodeHandle ();
483 ASSERT (EndOpCodeHandle != NULL);
484
485 //
486 // Create Hii Extend Label OpCode as the start opcode
487 //
489 StartOpCodeHandle,
490 &gEfiIfrTianoGuid,
491 NULL,
492 sizeof (EFI_IFR_GUID_LABEL)
493 );
495 StartLabel->Number = MAIN_LABEL_LIST_START;
496
497 //
498 // Create Hii Extend Label OpCode as the end opcode
499 //
501 EndOpCodeHandle,
502 &gEfiIfrTianoGuid,
503 NULL,
504 sizeof (EFI_IFR_GUID_LABEL)
505 );
507 EndLabel->Number = MAIN_LABEL_LIST_END;
508
509 Index = 0;
510 BASE_LIST_FOR_EACH (Entry, &RegisteredRamDisks) {
511 PrivateData = RAM_DISK_PRIVATE_FROM_THIS (Entry);
512 PrivateData->CheckBoxId = (EFI_QUESTION_ID)
513 (MAIN_CHECKBOX_QUESTION_ID_START + Index);
514 //
515 // CheckBox is unchecked by default.
516 //
517 PrivateData->CheckBoxChecked = FALSE;
518 String = RamDiskStr;
519
521 String,
522 sizeof (RamDiskStr),
523 L" RAM Disk %d: [0x%lx, 0x%lx]\n",
524 Index,
525 PrivateData->StartingAddr,
526 PrivateData->StartingAddr + PrivateData->Size - 1
527 );
528
529 StringId = HiiSetString (ConfigPrivate->HiiHandle, 0, RamDiskStr, NULL);
530 ASSERT (StringId != 0);
531
533 StartOpCodeHandle,
534 PrivateData->CheckBoxId,
535 0,
536 0,
537 StringId,
538 STRING_TOKEN (STR_RAM_DISK_LIST_HELP),
539 EFI_IFR_FLAG_CALLBACK,
540 0,
541 NULL
542 );
543
544 Index++;
545 }
546
548 ConfigPrivate->HiiHandle,
549 &gRamDiskFormSetGuid,
550 MAIN_FORM_ID,
551 StartOpCodeHandle,
552 EndOpCodeHandle
553 );
554
555 HiiFreeOpCodeHandle (StartOpCodeHandle);
556 HiiFreeOpCodeHandle (EndOpCodeHandle);
557}
558
582EFIAPI
585 IN EFI_BROWSER_ACTION Action,
586 IN EFI_QUESTION_ID QuestionId,
587 IN UINT8 Type,
588 IN EFI_IFR_TYPE_VALUE *Value,
589 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
590 )
591{
592 EFI_STATUS Status;
593 RAM_DISK_PRIVATE_DATA *PrivateData;
594 RAM_DISK_CONFIG_PRIVATE_DATA *ConfigPrivate;
595 EFI_DEVICE_PATH_PROTOCOL *FileDevPath;
596 EFI_FILE_HANDLE FileHandle;
597 LIST_ENTRY *Entry;
598 LIST_ENTRY *NextEntry;
599
600 if ((This == NULL) || (Value == NULL) || (ActionRequest == NULL)) {
601 return EFI_INVALID_PARAMETER;
602 }
603
604 ConfigPrivate = RAM_DISK_CONFIG_PRIVATE_FROM_THIS (This);
605
606 if (Action == EFI_BROWSER_ACTION_RETRIEVE) {
607 Status = EFI_UNSUPPORTED;
608 if (QuestionId == CREATE_RAW_SIZE_QUESTION_ID) {
609 Value->u64 = EFI_PAGE_SIZE;
610 ConfigPrivate->ConfigStore.Size = EFI_PAGE_SIZE;
611 Status = EFI_SUCCESS;
612 } else if (QuestionId == CREATE_RAW_MEMORY_TYPE_QUESTION_ID) {
613 Value->u8 = RAM_DISK_BOOT_SERVICE_DATA_MEMORY;
614 ConfigPrivate->ConfigStore.MemType = RAM_DISK_BOOT_SERVICE_DATA_MEMORY;
615 Status = EFI_SUCCESS;
616 }
617
618 return Status;
619 }
620
621 if ((Action != EFI_BROWSER_ACTION_CHANGED) &&
622 (Action != EFI_BROWSER_ACTION_CHANGING) &&
623 (Action != EFI_BROWSER_ACTION_FORM_OPEN))
624 {
625 return EFI_UNSUPPORTED;
626 }
627
628 //
629 // Update the RAM disk list show at the main form first.
630 //
631 if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {
632 Status = EFI_UNSUPPORTED;
633 if (QuestionId == MAIN_GOTO_FILE_EXPLORER_ID) {
634 UpdateMainForm (ConfigPrivate);
635 Status = EFI_SUCCESS;
636 }
637
638 return Status;
639 }
640
641 Status = EFI_SUCCESS;
642
643 if (Action == EFI_BROWSER_ACTION_CHANGING) {
644 switch (QuestionId) {
645 case MAIN_GOTO_FILE_EXPLORER_ID:
646 Status = ChooseFile (NULL, NULL, NULL, &FileDevPath);
647 if (EFI_ERROR (Status)) {
648 break;
649 }
650
651 if (FileDevPath != NULL) {
652 //
653 // Open the file.
654 //
655 Status = EfiOpenFileByDevicePath (
656 &FileDevPath,
657 &FileHandle,
658 EFI_FILE_MODE_READ,
659 0
660 );
661 if (EFI_ERROR (Status)) {
662 break;
663 }
664
665 //
666 // Create from file, RAM disk size is zero. It will be updated
667 // according to the file size.
668 //
669 Status = HiiCreateRamDisk (
670 0,
671 FileHandle,
672 ConfigPrivate->ConfigStore.MemType
673 );
674 if (EFI_ERROR (Status)) {
675 break;
676 }
677
678 //
679 // Refresh the registered RAM disks list.
680 //
681 UpdateMainForm (ConfigPrivate);
682 }
683
684 break;
685
686 default:
687 break;
688 }
689 } else if (Action == EFI_BROWSER_ACTION_CHANGED) {
690 switch (QuestionId) {
691 case MAIN_REMOVE_RD_QUESTION_ID:
692 //
693 // Remove the selected RAM disks
694 //
695 BASE_LIST_FOR_EACH_SAFE (Entry, NextEntry, &RegisteredRamDisks) {
696 PrivateData = RAM_DISK_PRIVATE_FROM_THIS (Entry);
697 if (PrivateData->CheckBoxChecked) {
699 (EFI_DEVICE_PATH_PROTOCOL *)PrivateData->DevicePath
700 );
701 }
702 }
703
704 UpdateMainForm (ConfigPrivate);
705
706 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
707 break;
708
709 case CREATE_RAW_SIZE_QUESTION_ID:
710 ConfigPrivate->ConfigStore.Size = Value->u64;
711 break;
712
713 case CREATE_RAW_MEMORY_TYPE_QUESTION_ID:
714 ConfigPrivate->ConfigStore.MemType = Value->u8;
715 break;
716
717 case CREATE_RAW_SUBMIT_QUESTION_ID:
718 //
719 // Create raw, FileHandle is NULL.
720 //
721 Status = HiiCreateRamDisk (
722 ConfigPrivate->ConfigStore.Size,
723 NULL,
724 ConfigPrivate->ConfigStore.MemType
725 );
726 if (EFI_ERROR (Status)) {
727 break;
728 }
729
730 //
731 // Refresh the registered RAM disks list.
732 //
733 UpdateMainForm (ConfigPrivate);
734
735 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT;
736 break;
737
738 case CREATE_RAW_DISCARD_QUESTION_ID:
739 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT;
740 break;
741
742 default:
743 //
744 // QuestionIds for checkboxes
745 //
746 if ((QuestionId >= MAIN_CHECKBOX_QUESTION_ID_START) &&
747 (QuestionId < CREATE_RAW_RAM_DISK_FORM_ID))
748 {
749 BASE_LIST_FOR_EACH (Entry, &RegisteredRamDisks) {
750 PrivateData = RAM_DISK_PRIVATE_FROM_THIS (Entry);
751 if (PrivateData->CheckBoxId == QuestionId) {
752 PrivateData->CheckBoxChecked = (BOOLEAN)(Value->u8 != 0);
753 }
754 }
755 }
756
757 break;
758 }
759 }
760
761 return EFI_SUCCESS;
762}
UINT64 UINTN
BOOLEAN EFIAPI IsListEmpty(IN CONST LIST_ENTRY *ListHead)
Definition: LinkedList.c:403
#define BASE_LIST_FOR_EACH_SAFE(Entry, NextEntry, ListHead)
Definition: BaseLib.h:2929
#define BASE_LIST_FOR_EACH(Entry, ListHead)
Definition: BaseLib.h:2913
LIST_ENTRY *EFIAPI RemoveEntryList(IN CONST LIST_ENTRY *Entry)
Definition: LinkedList.c:590
#define HARDWARE_DEVICE_PATH
Definition: DevicePath.h:68
#define HW_VENDOR_DP
Definition: DevicePath.h:133
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_STATUS EFIAPI ChooseFile(IN EFI_DEVICE_PATH_PROTOCOL *RootDirectory, IN CHAR16 *FileType OPTIONAL, IN CHOOSE_HANDLER ChooseHandler OPTIONAL, OUT EFI_DEVICE_PATH_PROTOCOL **File OPTIONAL)
VOID *EFIAPI HiiAllocateOpCodeHandle(VOID)
Definition: HiiLib.c:3051
VOID EFIAPI HiiFreeOpCodeHandle(VOID *OpCodeHandle)
Definition: HiiLib.c:3085
EFI_HII_HANDLE EFIAPI HiiAddPackages(IN CONST EFI_GUID *PackageListGuid, IN EFI_HANDLE DeviceHandle OPTIONAL,...)
Definition: HiiLib.c:141
UINT8 *EFIAPI HiiCreateGuidOpCode(IN VOID *OpCodeHandle, IN CONST EFI_GUID *Guid, IN CONST VOID *GuidOpCode OPTIONAL, IN UINTN OpCodeSize)
Definition: HiiLib.c:3411
UINT8 *EFIAPI HiiCreateCheckBoxOpCode(IN VOID *OpCodeHandle, IN EFI_QUESTION_ID QuestionId, IN EFI_VARSTORE_ID VarStoreId, IN UINT16 VarOffset, IN EFI_STRING_ID Prompt, IN EFI_STRING_ID Help, IN UINT8 QuestionFlags, IN UINT8 CheckBoxFlags, IN VOID *DefaultsOpCodeHandle OPTIONAL)
Definition: HiiLib.c:3675
EFI_STATUS EFIAPI HiiUpdateForm(IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *FormSetGuid OPTIONAL, IN EFI_FORM_ID FormId, IN VOID *StartOpCodeHandle, IN VOID *EndOpCodeHandle OPTIONAL)
Definition: HiiLib.c:4410
EFI_STRING_ID EFIAPI HiiSetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId OPTIONAL, IN CONST EFI_STRING String, IN CONST CHAR8 *SupportedLanguages OPTIONAL)
Definition: HiiString.c:52
VOID EFIAPI HiiRemovePackages(IN EFI_HII_HANDLE HiiHandle)
Definition: HiiLib.c:253
#define EFI_IFR_EXTEND_OP_LABEL
Definition: MdeModuleHii.h:33
UINTN EFIAPI UnicodeSPrint(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR16 *FormatString,...)
Definition: PrintLib.c:408
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_FILE_INFO * FileInfo(IN EFI_FILE_HANDLE FHand)
VOID UninstallRamDiskConfigForm(IN OUT RAM_DISK_CONFIG_PRIVATE_DATA *ConfigPrivateData)
Definition: RamDiskImpl.c:122
EFI_STATUS EFIAPI RamDiskCallback(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN EFI_BROWSER_ACTION Action, IN EFI_QUESTION_ID QuestionId, IN UINT8 Type, IN EFI_IFR_TYPE_VALUE *Value, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest)
Definition: RamDiskImpl.c:583
EFI_STATUS HiiCreateRamDisk(IN UINT64 Size, IN EFI_FILE_HANDLE FileHandle, IN UINT8 MemoryType)
Definition: RamDiskImpl.c:292
EFI_STATUS EFIAPI RamDiskRouteConfig(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress)
Definition: RamDiskImpl.c:261
EFI_STATUS EFIAPI RamDiskExtractConfig(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, OUT EFI_STRING *Results)
Definition: RamDiskImpl.c:226
VOID UpdateMainForm(IN OUT RAM_DISK_CONFIG_PRIVATE_DATA *ConfigPrivate)
Definition: RamDiskImpl.c:461
EFI_STATUS InstallRamDiskConfigForm(IN OUT RAM_DISK_CONFIG_PRIVATE_DATA *ConfigPrivateData)
Definition: RamDiskImpl.c:62
VOID UnregisterAllRamDisks(VOID)
Definition: RamDiskImpl.c:157
EFI_STATUS EFIAPI RamDiskRegister(IN UINT64 RamDiskBase, IN UINT64 RamDiskSize, IN EFI_GUID *RamDiskType, IN EFI_DEVICE_PATH *ParentDevicePath OPTIONAL, OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
EFI_STATUS EFIAPI RamDiskUnregister(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
UINT8 RamDiskHiiBin[]
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_BOOT_SERVICES * gBS
#define STRING_TOKEN(t)
VOID * EFI_HII_HANDLE
EFI_STATUS EFIAPI EfiOpenFileByDevicePath(IN OUT EFI_DEVICE_PATH_PROTOCOL **FilePath, OUT EFI_FILE_PROTOCOL **File, IN UINT64 OpenMode, IN UINT64 Attributes)
Definition: UefiLib.c:1806
VOID EFIAPI CreatePopUp(IN UINTN Attribute, OUT EFI_INPUT_KEY *Key OPTIONAL,...)
Definition: Console.c:393
@ EfiBootServicesData
@ EfiReservedMemoryType
UINT64 FileSize
Definition: FileInfo.h:27