Nfit.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /** @file
  2. @copyright
  3. Copyright 1999 - 2019 Intel Corporation. <BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. //
  7. // The version of NvDimm F/W Interface Table (Nfit) supported has been updated to ASWG-ECR-Draft4-RC6_93.doc
  8. // This file contains definitions for Acpi side for the Nfit creation and publication of Nfit tables.
  9. // A BIG NOTE: When ever the NVDIMM_FW_INTERFACE_TABLE defined either here or what is in Nfit.h of CrystalRidge Protocol driver
  10. // changes, the same changes need to relect in both the files.
  11. #ifndef _NFIT_DEFS_H_
  12. #define _NFIT_DEFS_H_
  13. #include <IndustryStandard/Acpi62.h>
  14. #define NVDIMM_FW_INTERFACE_TABLE_SIGNATURE EFI_ACPI_6_2_NVDIMM_FIRMWARE_INTERFACE_TABLE_STRUCTURE_SIGNATURE
  15. #define NVDIMM_FW_INTERFACE_TABLE_REVISION EFI_ACPI_6_2_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION
  16. #define MAX_NFIT_SIZE 0x18000
  17. //
  18. // NVDIMM Firmware Interface Table struct
  19. // IMPORTANT NOTE: Num of various sub-table fields of the Nfit has been eliminated in the latest Nfit Spec (0.8k)
  20. // And also since there is NO memory allocation scheme for Nfit (all globals), Adding a buffer NfitTables with the,
  21. // max nfit size currently set to 4k. Will need to watch if we will ever overrun this buffer. It is expected that
  22. // Nfit parser will need to parse the NfitTables field to understand the various other Nfit Tables in this buffer
  23. // based on the Type and Length field of these tables.
  24. //
  25. #pragma pack(1)
  26. typedef struct _NVDIMM_FW_INT_TBL {
  27. UINT32 Signature; // 'NFIT' should be the signature for this table
  28. UINT32 Length; // Length in bytes fir the entire table
  29. UINT8 Revision; // Revision # of this table, initial is '1'
  30. UINT8 Checksum; // Entire Table Checksum must sum to 0
  31. UINT8 OemID[6]; // OemID
  32. UINT8 OemTblID[8]; // Should be Manufacturer's Model #
  33. UINT32 OemRevision; // Oem Revision of for Supplied OEM Table ID
  34. UINT32 CreatorID; // Vendor ID of the utility that is creating this table
  35. UINT32 CreatorRev; // Revision of utility that is creating this table
  36. UINT32 Reserved;
  37. UINT8 NfitTables[MAX_NFIT_SIZE]; // See Description above (IMPORTANT).
  38. } NVDIMM_FW_INTERFACE_TABLE;
  39. #pragma pack()
  40. #endif // _NFIT_DEFS_H_