BhyveDefines.fdf.inc 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. ## @file
  2. # FDF include file that defines the main macros and sets the dependent PCDs.
  3. #
  4. # Copyright (C) 2014, Red Hat, Inc.
  5. # Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
  6. #
  7. # SPDX-License-Identifier: BSD-2-Clause-Patent
  8. #
  9. ##
  10. DEFINE BLOCK_SIZE = 0x1000
  11. #
  12. # A firmware binary built with FD_SIZE_IN_KB=1024, and a firmware binary built
  13. # with FD_SIZE_IN_KB=2048, use the same variable store layout.
  14. #
  15. # Setting FD_SIZE_IN_KB to 4096 results in a different (much larger) variable
  16. # store structure that is incompatible with both of the above-mentioned
  17. # firmware binaries.
  18. #
  19. !if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048)
  20. DEFINE VARS_SIZE = 0x20000
  21. DEFINE VARS_BLOCKS = 0x20
  22. DEFINE VARS_LIVE_SIZE = 0xE000
  23. DEFINE VARS_SPARE_SIZE = 0x10000
  24. !endif
  25. !if $(FD_SIZE_IN_KB) == 1024
  26. DEFINE FW_BASE_ADDRESS = 0xFFF00000
  27. DEFINE FW_SIZE = 0x00100000
  28. DEFINE FW_BLOCKS = 0x100
  29. DEFINE CODE_BASE_ADDRESS = 0xFFF20000
  30. DEFINE CODE_SIZE = 0x000E0000
  31. DEFINE CODE_BLOCKS = 0xE0
  32. DEFINE FVMAIN_SIZE = 0x000CC000
  33. DEFINE SECFV_OFFSET = 0x000EC000
  34. DEFINE SECFV_SIZE = 0x14000
  35. !endif
  36. !if $(FD_SIZE_IN_KB) == 2048
  37. DEFINE FW_BASE_ADDRESS = 0xFFE00000
  38. DEFINE FW_SIZE = 0x00200000
  39. DEFINE FW_BLOCKS = 0x200
  40. DEFINE CODE_BASE_ADDRESS = 0xFFE20000
  41. DEFINE CODE_SIZE = 0x001E0000
  42. DEFINE CODE_BLOCKS = 0x1E0
  43. DEFINE FVMAIN_SIZE = 0x001AC000
  44. DEFINE SECFV_OFFSET = 0x001CC000
  45. DEFINE SECFV_SIZE = 0x34000
  46. !endif
  47. !if $(FD_SIZE_IN_KB) == 4096
  48. DEFINE VARS_SIZE = 0x84000
  49. DEFINE VARS_BLOCKS = 0x84
  50. DEFINE VARS_LIVE_SIZE = 0x40000
  51. DEFINE VARS_SPARE_SIZE = 0x42000
  52. DEFINE FW_BASE_ADDRESS = 0xFFC00000
  53. DEFINE FW_SIZE = 0x00400000
  54. DEFINE FW_BLOCKS = 0x400
  55. DEFINE CODE_BASE_ADDRESS = 0xFFC84000
  56. DEFINE CODE_SIZE = 0x0037C000
  57. DEFINE CODE_BLOCKS = 0x37C
  58. DEFINE FVMAIN_SIZE = 0x00348000
  59. DEFINE SECFV_OFFSET = 0x003CC000
  60. DEFINE SECFV_SIZE = 0x34000
  61. !endif
  62. SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress = $(FW_BASE_ADDRESS)
  63. SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize = $(FW_SIZE)
  64. SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize = $(BLOCK_SIZE)
  65. SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase = $(FW_BASE_ADDRESS)
  66. SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize = $(VARS_LIVE_SIZE)
  67. SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
  68. SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize = $(BLOCK_SIZE)
  69. SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize
  70. SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize = $(BLOCK_SIZE)
  71. SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
  72. SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize = $(VARS_SPARE_SIZE)
  73. DEFINE MEMFD_BASE_ADDRESS = 0x800000