mirror of https://gitee.com/openkylin/qemu.git
nvdimm acpi: check revision
Currently only revision 1 is supported Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
189f4d5635
commit
d15fc53f8d
|
@ -485,6 +485,13 @@ nvdimm_dsm_write(void *opaque, hwaddr addr, uint64_t val, unsigned size)
|
||||||
nvdimm_debug("Revision %#x Handler %#x Function %#x.\n", in->revision,
|
nvdimm_debug("Revision %#x Handler %#x Function %#x.\n", in->revision,
|
||||||
in->handle, in->function);
|
in->handle, in->function);
|
||||||
|
|
||||||
|
if (in->revision != 0x1 /* Currently we only support DSM Spec Rev1. */) {
|
||||||
|
nvdimm_debug("Revision %#x is not supported, expect %#x.\n",
|
||||||
|
in->revision, 0x1);
|
||||||
|
nvdimm_dsm_no_payload(1 /* Not Supported */, dsm_mem_addr);
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
/* Handle 0 is reserved for NVDIMM Root Device. */
|
/* Handle 0 is reserved for NVDIMM Root Device. */
|
||||||
if (!in->handle) {
|
if (!in->handle) {
|
||||||
nvdimm_dsm_root(in, dsm_mem_addr);
|
nvdimm_dsm_root(in, dsm_mem_addr);
|
||||||
|
|
Loading…
Reference in New Issue