1
0

fwvol.c 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*++
  2. Copyright (c) 2015 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. fwvol.c
  5. Abstract:
  6. This module implements support for the builtin UEFI firmware volume.
  7. Author:
  8. Evan Green 10-Jul-2015
  9. Environment:
  10. Firmware
  11. --*/
  12. //
  13. // ------------------------------------------------------------------- Includes
  14. //
  15. #include "uefifw.h"
  16. #include "veyronfw.h"
  17. //
  18. // ---------------------------------------------------------------- Definitions
  19. //
  20. //
  21. // ------------------------------------------------------ Data Type Definitions
  22. //
  23. //
  24. // ----------------------------------------------- Internal Function Prototypes
  25. //
  26. //
  27. // -------------------------------------------------------------------- Globals
  28. //
  29. //
  30. // Objcopy adds these symbols surrounding the added file.
  31. //
  32. extern UINT8 _binary_veyronfwv_start;
  33. extern UINT8 _binary_veyronfwv_end;
  34. //
  35. // ------------------------------------------------------------------ Functions
  36. //
  37. EFI_STATUS
  38. EfiPlatformEnumerateFirmwareVolumes (
  39. VOID
  40. )
  41. /*++
  42. Routine Description:
  43. This routine enumerates any firmware volumes the platform may have
  44. tucked away. The platform should load them into memory and call
  45. EfiCreateFirmwareVolume for each one.
  46. Arguments:
  47. None.
  48. Return Value:
  49. EFI Status code.
  50. --*/
  51. {
  52. EFI_PHYSICAL_ADDRESS Base;
  53. UINTN Size;
  54. EFI_STATUS Status;
  55. Base = (EFI_PHYSICAL_ADDRESS)(UINTN)&_binary_veyronfwv_start;
  56. Size = (UINTN)&_binary_veyronfwv_end - (UINTN)&_binary_veyronfwv_start;
  57. Status = EfiCreateFirmwareVolume(Base, Size, NULL, 0, NULL);
  58. return Status;
  59. }
  60. //
  61. // --------------------------------------------------------- Internal Functions
  62. //