Skip to content

Commit be26f9a

Browse files
committed
nfit, tools/testing/nvdimm: add format interface code definitions
ACPI 6.1 and JEDEC Annex L Release 3 formalize the format interface code. Add definitions and update their usage in the unit test. Signed-off-by: Dan Williams <[email protected]>
1 parent 6e2452d commit be26f9a

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

drivers/acpi/nfit.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ enum nfit_uuids {
4040
NFIT_UUID_MAX,
4141
};
4242

43+
enum nfit_fic {
44+
NFIT_FIC_BYTE = 0x101, /* byte-addressable energy backed */
45+
NFIT_FIC_BLK = 0x201, /* block-addressable non-energy backed */
46+
NFIT_FIC_BYTEN = 0x301, /* byte-addressable non-energy backed */
47+
};
48+
4349
enum {
4450
ND_BLK_READ_FLUSH = 1,
4551
ND_BLK_DCR_LATCH = 2,

tools/testing/nvdimm/test/nfit.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ static void nfit_test0_setup(struct nfit_test *t)
823823
dcr->device_id = 0;
824824
dcr->revision_id = 1;
825825
dcr->serial_number = ~handle[0];
826+
dcr->code = NFIT_FIC_BLK;
826827
dcr->windows = 1;
827828
dcr->window_size = DCR_SIZE;
828829
dcr->command_offset = 0;
@@ -839,6 +840,7 @@ static void nfit_test0_setup(struct nfit_test *t)
839840
dcr->device_id = 0;
840841
dcr->revision_id = 1;
841842
dcr->serial_number = ~handle[1];
843+
dcr->code = NFIT_FIC_BLK;
842844
dcr->windows = 1;
843845
dcr->window_size = DCR_SIZE;
844846
dcr->command_offset = 0;
@@ -855,6 +857,7 @@ static void nfit_test0_setup(struct nfit_test *t)
855857
dcr->device_id = 0;
856858
dcr->revision_id = 1;
857859
dcr->serial_number = ~handle[2];
860+
dcr->code = NFIT_FIC_BLK;
858861
dcr->windows = 1;
859862
dcr->window_size = DCR_SIZE;
860863
dcr->command_offset = 0;
@@ -871,6 +874,7 @@ static void nfit_test0_setup(struct nfit_test *t)
871874
dcr->device_id = 0;
872875
dcr->revision_id = 1;
873876
dcr->serial_number = ~handle[3];
877+
dcr->code = NFIT_FIC_BLK;
874878
dcr->windows = 1;
875879
dcr->window_size = DCR_SIZE;
876880
dcr->command_offset = 0;
@@ -967,6 +971,7 @@ static void nfit_test0_setup(struct nfit_test *t)
967971
dcr->device_id = 0;
968972
dcr->revision_id = 1;
969973
dcr->serial_number = ~handle[4];
974+
dcr->code = NFIT_FIC_BLK;
970975
dcr->windows = 1;
971976
dcr->window_size = DCR_SIZE;
972977
dcr->command_offset = 0;
@@ -1136,7 +1141,7 @@ static void nfit_test1_setup(struct nfit_test *t)
11361141
dcr->device_id = 0;
11371142
dcr->revision_id = 1;
11381143
dcr->serial_number = ~0;
1139-
dcr->code = 0x201;
1144+
dcr->code = NFIT_FIC_BYTE;
11401145
dcr->windows = 0;
11411146
dcr->window_size = 0;
11421147
dcr->command_offset = 0;

0 commit comments

Comments
 (0)