diff options
author | Anthony PERARD <anthony.perard@citrix.com> | 2019-08-13 12:31:16 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2019-08-21 18:03:50 +0200 |
commit | 8f39d79d6533030baf0e579787997cd0fae3750a (patch) | |
tree | 006a1152df6e36e68d367f1906e2ad90fb083316 /OvmfPkg/XenBusDxe | |
parent | 05480e2fd4ff46edbd07796ca5c177d2e656a93b (diff) | |
download | edk2-8f39d79d6533030baf0e579787997cd0fae3750a.tar.gz edk2-8f39d79d6533030baf0e579787997cd0fae3750a.tar.bz2 edk2-8f39d79d6533030baf0e579787997cd0fae3750a.zip |
OvmfPkg: Introduce PcdXenGrantFrames
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>
Message-Id: <20190813113119.14804-33-anthony.perard@citrix.com>
Diffstat (limited to 'OvmfPkg/XenBusDxe')
-rw-r--r-- | OvmfPkg/XenBusDxe/GrantTable.c | 3 | ||||
-rw-r--r-- | OvmfPkg/XenBusDxe/XenBusDxe.h | 1 | ||||
-rw-r--r-- | OvmfPkg/XenBusDxe/XenBusDxe.inf | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/OvmfPkg/XenBusDxe/GrantTable.c b/OvmfPkg/XenBusDxe/GrantTable.c index 6575e9b88c..1130404cd1 100644 --- a/OvmfPkg/XenBusDxe/GrantTable.c +++ b/OvmfPkg/XenBusDxe/GrantTable.c @@ -22,8 +22,7 @@ #define NR_RESERVED_ENTRIES 8
-/* NR_GRANT_FRAMES must be less than or equal to that configured in Xen */
-#define NR_GRANT_FRAMES 4
+#define NR_GRANT_FRAMES (FixedPcdGet32 (PcdXenGrantFrames))
#define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * EFI_PAGE_SIZE / sizeof(grant_entry_v1_t))
STATIC grant_entry_v1_t *GrantTable = NULL;
diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.h b/OvmfPkg/XenBusDxe/XenBusDxe.h index 8510361bca..b1dcc3549c 100644 --- a/OvmfPkg/XenBusDxe/XenBusDxe.h +++ b/OvmfPkg/XenBusDxe/XenBusDxe.h @@ -22,6 +22,7 @@ #include <Library/UefiLib.h>
#include <Library/DevicePathLib.h>
#include <Library/DebugLib.h>
+#include <Library/PcdLib.h>
//
diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.inf b/OvmfPkg/XenBusDxe/XenBusDxe.inf index 86e0fb8224..536b49fa8c 100644 --- a/OvmfPkg/XenBusDxe/XenBusDxe.inf +++ b/OvmfPkg/XenBusDxe/XenBusDxe.inf @@ -51,6 +51,7 @@ XenHypercallLib
SynchronizationLib
PrintLib
+ PcdLib
[Protocols]
gEfiDriverBindingProtocolGuid
@@ -59,3 +60,5 @@ gXenBusProtocolGuid
gXenIoProtocolGuid
+[FixedPcd]
+ gUefiOvmfPkgTokenSpaceGuid.PcdXenGrantFrames
|