Introduce PcdXenGrantFrames to replace a define in XenBusDxe and allow
the same value to be used in a different module.
The reason for the number of page to be 4 doesn't exist anymore, so
simply remove the comment.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtr|0x0|UINT32|0x17\r
gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtrSize|0x0|UINT32|0x32\r
\r
+ ## Number of page frames to use for storing grant table entries.\r
+ gUefiOvmfPkgTokenSpaceGuid.PcdXenGrantFrames|4|UINT32|0x33\r
+\r
[PcdsDynamic, PcdsDynamicEx]\r
gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent|0|UINT64|2\r
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable|FALSE|BOOLEAN|0x10\r
\r
#define NR_RESERVED_ENTRIES 8\r
\r
-/* NR_GRANT_FRAMES must be less than or equal to that configured in Xen */\r
-#define NR_GRANT_FRAMES 4\r
+#define NR_GRANT_FRAMES (FixedPcdGet32 (PcdXenGrantFrames))\r
#define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * EFI_PAGE_SIZE / sizeof(grant_entry_v1_t))\r
\r
STATIC grant_entry_v1_t *GrantTable = NULL;\r
#include <Library/UefiLib.h>\r
#include <Library/DevicePathLib.h>\r
#include <Library/DebugLib.h>\r
+#include <Library/PcdLib.h>\r
\r
\r
//\r
XenHypercallLib\r
SynchronizationLib\r
PrintLib\r
+ PcdLib\r
\r
[Protocols]\r
gEfiDriverBindingProtocolGuid\r
gXenBusProtocolGuid\r
gXenIoProtocolGuid\r
\r
+[FixedPcd]\r
+ gUefiOvmfPkgTokenSpaceGuid.PcdXenGrantFrames\r