#include <Library/FileExplorerLib.h>\r
#include <Library/DevicePathLib.h>\r
#include <Library/PrintLib.h>\r
+#include <Library/PcdLib.h>\r
+#include <Library/DxeServicesLib.h>\r
#include <Protocol/RamDisk.h>\r
#include <Protocol/BlockIo.h>\r
#include <Protocol/BlockIo2.h>\r
#include <Protocol/HiiConfigAccess.h>\r
#include <Protocol/SimpleFileSystem.h>\r
+#include <Protocol/AcpiTable.h>\r
+#include <Protocol/AcpiSystemDescriptionTable.h>\r
#include <Guid/MdeModuleHii.h>\r
#include <Guid/RamDiskHii.h>\r
#include <Guid/FileInfo.h>\r
+#include <IndustryStandard/Acpi61.h>\r
\r
#include "RamDiskNVData.h"\r
\r
// RamDiskDxe driver maintains a list of registered RAM disks.\r
//\r
extern LIST_ENTRY RegisteredRamDisks;\r
-extern UINTN ListEntryNum;\r
+\r
+//\r
+// Pointers to the EFI_ACPI_TABLE_PROTOCOL and EFI_ACPI_SDT_PROTOCOL.\r
+//\r
+extern EFI_ACPI_TABLE_PROTOCOL *mAcpiTableProtocol;\r
+extern EFI_ACPI_SDT_PROTOCOL *mAcpiSdtProtocol;\r
\r
//\r
// RAM Disk create method.\r
EFI_GUID TypeGuid;\r
UINT16 InstanceNumber;\r
RAM_DISK_CREATE_METHOD CreateMethod;\r
+ BOOLEAN InNfit;\r
+ EFI_QUESTION_ID CheckBoxId;\r
+ BOOLEAN CheckBoxChecked;\r
\r
LIST_ENTRY ThisInstance;\r
} RAM_DISK_PRIVATE_DATA;\r
typedef struct {\r
UINTN Signature;\r
\r
+ RAM_DISK_CONFIGURATION ConfigStore;\r
+\r
EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r
EFI_HANDLE DriverHandle;\r
EFI_HII_HANDLE HiiHandle;\r
#define RAM_DISK_CONFIG_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('R', 'C', 'F', 'G')\r
#define RAM_DISK_CONFIG_PRIVATE_FROM_THIS(a) CR (a, RAM_DISK_CONFIG_PRIVATE_DATA, ConfigAccess, RAM_DISK_CONFIG_PRIVATE_DATA_SIGNATURE)\r
\r
-#define RAM_DISK_LIST_VAR_OFFSET ((UINT16) OFFSET_OF (RAM_DISK_CONFIGURATION, RamDiskList))\r
-\r
/**\r
Register a RAM disk with specified address, size and type.\r
\r
IN UINT64 Attributes\r
);\r
\r
+\r
+/**\r
+ Publish the RAM disk NVDIMM Firmware Interface Table (NFIT) to the ACPI\r
+ table.\r
+\r
+ @param[in] PrivateData Points to RAM disk private data.\r
+\r
+ @retval EFI_SUCCESS The RAM disk NFIT has been published.\r
+ @retval others The RAM disk NFIT has not been published.\r
+\r
+**/\r
+EFI_STATUS\r
+RamDiskPublishNfit (\r
+ IN RAM_DISK_PRIVATE_DATA *PrivateData\r
+ );\r
+\r
#endif\r