|
@@ -881,7 +881,8 @@ static int nfit_test0_alloc(struct nfit_test *t)
|
|
window_size) * NUM_DCR
|
|
window_size) * NUM_DCR
|
|
+ sizeof(struct acpi_nfit_data_region) * NUM_BDW
|
|
+ sizeof(struct acpi_nfit_data_region) * NUM_BDW
|
|
+ (sizeof(struct acpi_nfit_flush_address)
|
|
+ (sizeof(struct acpi_nfit_flush_address)
|
|
- + sizeof(u64) * NUM_HINTS) * NUM_DCR;
|
|
|
|
|
|
+ + sizeof(u64) * NUM_HINTS) * NUM_DCR
|
|
|
|
+ + sizeof(struct acpi_nfit_capabilities);
|
|
int i;
|
|
int i;
|
|
|
|
|
|
t->nfit_buf = test_alloc(t, nfit_size, &t->nfit_dma);
|
|
t->nfit_buf = test_alloc(t, nfit_size, &t->nfit_dma);
|
|
@@ -993,6 +994,7 @@ static void nfit_test0_setup(struct nfit_test *t)
|
|
struct acpi_nfit_control_region *dcr;
|
|
struct acpi_nfit_control_region *dcr;
|
|
struct acpi_nfit_data_region *bdw;
|
|
struct acpi_nfit_data_region *bdw;
|
|
struct acpi_nfit_flush_address *flush;
|
|
struct acpi_nfit_flush_address *flush;
|
|
|
|
+ struct acpi_nfit_capabilities *pcap;
|
|
unsigned int offset, i;
|
|
unsigned int offset, i;
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -1500,8 +1502,16 @@ static void nfit_test0_setup(struct nfit_test *t)
|
|
for (i = 0; i < NUM_HINTS; i++)
|
|
for (i = 0; i < NUM_HINTS; i++)
|
|
flush->hint_address[i] = t->flush_dma[3] + i * sizeof(u64);
|
|
flush->hint_address[i] = t->flush_dma[3] + i * sizeof(u64);
|
|
|
|
|
|
|
|
+ /* platform capabilities */
|
|
|
|
+ pcap = nfit_buf + offset + flush_hint_size * 4;
|
|
|
|
+ pcap->header.type = ACPI_NFIT_TYPE_CAPABILITIES;
|
|
|
|
+ pcap->header.length = sizeof(*pcap);
|
|
|
|
+ pcap->highest_capability = 1;
|
|
|
|
+ pcap->capabilities = ACPI_NFIT_CAPABILITY_CACHE_FLUSH |
|
|
|
|
+ ACPI_NFIT_CAPABILITY_MEM_FLUSH;
|
|
|
|
+
|
|
if (t->setup_hotplug) {
|
|
if (t->setup_hotplug) {
|
|
- offset = offset + flush_hint_size * 4;
|
|
|
|
|
|
+ offset = offset + flush_hint_size * 4 + sizeof(*pcap);
|
|
/* dcr-descriptor4: blk */
|
|
/* dcr-descriptor4: blk */
|
|
dcr = nfit_buf + offset;
|
|
dcr = nfit_buf + offset;
|
|
dcr->header.type = ACPI_NFIT_TYPE_CONTROL_REGION;
|
|
dcr->header.type = ACPI_NFIT_TYPE_CONTROL_REGION;
|