From: Linda Knippers <linda.knippers@hp.com>
To: Lv Zheng <lv.zheng@intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Len Brown <len.brown@intel.com>
Cc: Lv Zheng <zetalog@gmail.com>,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
Bob Moore <robert.moore@intel.com>
Subject: Re: [PATCH 18/19] ACPICA: ACPI 6.0: Add support for NFIT table.
Date: Fri, 22 May 2015 11:17:24 -0400 [thread overview]
Message-ID: <555F4884.4090805@hp.com> (raw)
In-Reply-To: <5043ee403371d025add0b5bacd0046ae07ac2783.1432175162.git.lv.zheng@intel.com>
On 5/20/2015 10:31 PM, Lv Zheng wrote:
> From: Bob Moore <robert.moore@intel.com>
>
> ACPICA commit e4e17ca361373e9b81494bb4ca697a12cef3cba6
>
> NVDIMM Firmware Interface Table.
>
> Link: https://github.com/acpica/acpica/commit/e4e17ca3
> Signed-off-by: Bob Moore <robert.moore@intel.com>
> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> ---
> drivers/acpi/acpica/uthex.c | 4 +-
> include/acpi/actbl1.h | 154 +++++++++++++++++++++++++++++++++++++++++++
> include/acpi/acuuid.h | 64 ++++++++++++++++++
> 3 files changed, 220 insertions(+), 2 deletions(-)
> create mode 100644 include/acpi/acuuid.h
>
> diff --git a/drivers/acpi/acpica/uthex.c b/drivers/acpi/acpica/uthex.c
> index aa44827..fda8b3d 100644
> --- a/drivers/acpi/acpica/uthex.c
> +++ b/drivers/acpi/acpica/uthex.c
> @@ -75,9 +75,9 @@ char acpi_ut_hex_to_ascii_char(u64 integer, u32 position)
>
> /*******************************************************************************
> *
> - * FUNCTION: acpi_ut_hex_char_to_value
> + * FUNCTION: acpi_ut_ascii_char_to_hex
> *
> - * PARAMETERS: ascii_char - Hex character in Ascii
> + * PARAMETERS: hex_char - Hex character in Ascii
> *
> * RETURN: The binary value of the ascii/hex character
> *
> diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
> index cadf21c..06b61f0 100644
> --- a/include/acpi/actbl1.h
> +++ b/include/acpi/actbl1.h
> @@ -71,6 +71,7 @@
> #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
> #define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
> #define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
> +#define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
>
> /*
> * All tables must be byte-packed to match the ACPI specification, since
> @@ -922,6 +923,159 @@ struct acpi_msct_proximity {
>
> /*******************************************************************************
> *
> + * NFIT - NVDIMM Interface Table (ACPI 6.0)
> + * Version 1
> + *
> + ******************************************************************************/
> +
> +struct acpi_table_nfit {
> + struct acpi_table_header header; /* Common ACPI table header */
> + u32 reserved; /* Reserved, must be zero */
> +};
> +
> +/* Subtable header for NFIT */
> +
> +struct acpi_nfit_header {
> + u16 type;
> + u16 length;
> +};
> +
> +/* Values for subtable type in struct acpi_nfit_header */
> +
> +enum acpi_nfit_type {
> + ACPI_NFIT_TYPE_SYSTEM_ADDRESS = 0,
> + ACPI_NFIT_TYPE_MEMORY_MAP = 1,
> + ACPI_NFIT_TYPE_INTERLEAVE = 2,
> + ACPI_NFIT_TYPE_SMBIOS = 3,
> + ACPI_NFIT_TYPE_CONTROL_REGION = 4,
> + ACPI_NFIT_TYPE_DATA_REGION = 5,
> + ACPI_NFIT_TYPE_FLUSH_ADDRESS = 6,
> + ACPI_NFIT_TYPE_RESERVED = 7 /* 7 and greater are reserved */
> +};
> +
> +/*
> + * NFIT Subtables
> + */
> +
> +/* 0: System Physical Address Range Structure */
> +
> +struct acpi_nfit_system_address {
> + struct acpi_nfit_header header;
> + u16 range_index;
> + u16 flags;
> + u32 reserved; /* Reseved, must be zero */
> + u32 proximity_domain;
> + u8 range_guid[16];
> + u64 address;
> + u64 length;
> + u64 memory_mapping;
> +};
> +
> +/* Flags */
> +
> +#define ACPI_NFIT_ADD_ONLINE_ONLY (1) /* 00: Add/Online Operation Only */
> +#define ACPI_NFIT_PROXIMITY_VALID (1<<1) /* 01: Proximity Domain Valid */
> +
> +/* Range Type GUIDs appear in the include/acuuid.h file */
> +
> +/* 1: Memory Device to System Address Range Map Structure */
> +
> +struct acpi_nfit_memory_map {
> + struct acpi_nfit_header header;
> + u32 device_handle;
> + u16 physical_id;
> + u16 region_id;
> + u16 range_index;
> + u16 region_index;
> + u64 region_size;
> + u64 region_offset;
> + u64 address;
> + u16 interleave_index;
> + u16 interleave_ways;
> + u16 flags;
> + u16 reserved; /* Reserved, must be zero */
> +};
> +
> +/* Flags */
> +
> +#define ACPI_NFIT_MEM_SAVE_FAILED (1) /* 00: Last SAVE to Memory Device failed */
> +#define ACPI_NFIT_MEM_RESTORE_FAILED (1<<1) /* 01: Last RESTORE from Memory Device failed */
> +#define ACPI_NFIT_MEM_FLUSH_FAILED (1<<2) /* 02: Platform flush failed */
> +#define ACPI_NFIT_MEM_ARMED (1<<3) /* 03: Memory Device observed to be not armed */
> +#define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device observed SMART/health events */
> +#define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health events enabled */
> +
> +/* 2: Interleave Structure */
> +
> +struct acpi_nfit_interleave {
> + struct acpi_nfit_header header;
> + u16 interleave_index;
> + u16 reserved; /* Reserved, must be zero */
> + u32 line_count;
> + u32 line_size;
> + u32 line_offset[1]; /* Variable length */
> +};
> +
> +/* 3: SMBIOS Management Information Structure */
> +
> +struct acpi_nfit_smbios {
> + struct acpi_nfit_header header;
> + u32 reserved; /* Reserved, must be zero */
> + u8 data[1]; /* Variable length */
> +};
> +
> +/* 4: NVDIMM Control Region Structure */
> +
> +struct acpi_nfit_control_region {
> + struct acpi_nfit_header header;
> + u16 region_index;
> + u16 vendor_id;
> + u16 device_id;
> + u16 revision_id;
> + u16 subsystem_vendor_id;
> + u16 subsystem_device_id;
> + u16 subsystem_revision_id;
> + u8 reserved[6]; /* Reserved, must be zero */
> + u32 serial_number;
> + u16 code;
> + u16 windows;
> + u64 window_size;
> + u64 command_offset;
> + u64 command_size;
> + u64 status_offset;
> + u64 status_size;
> + u16 flags;
> + u8 reserved1[6]; /* Reserved, must be zero */
> +};
> +
> +/* Flags */
> +
> +#define ACPI_NFIT_CONTROL_BUFFERED (1) /* Block Data Windows implementation is buffered */
> +
> +/* 5: NVDIMM Block Data Window Region Structure */
> +
> +struct acpi_nfit_data_region {
> + struct acpi_nfit_header header;
> + u16 region_index;
> + u16 windows;
> + u64 offset;
> + u64 size;
> + u64 capacity;
> + u64 start_address;
> +};
> +
> +/* 6: Flush Hint Address Structure */
> +
> +struct acpi_nfit_flush_address {
> + struct acpi_nfit_header header;
> + u32 device_handle;
> + u16 hint_count;
> + u8 reserved[6]; /* Reserved, must be zero */
> + u64 hint_address[1]; /* Variable length */
> +};
> +
> +/*******************************************************************************
> + *
> * SBST - Smart Battery Specification Table
> * Version 1
> *
> diff --git a/include/acpi/acuuid.h b/include/acpi/acuuid.h
> new file mode 100644
> index 0000000..4955d5e
> --- /dev/null
> +++ b/include/acpi/acuuid.h
> @@ -0,0 +1,64 @@
> +/******************************************************************************
> + *
> + * Name: acuuid.h - ACPI-related UUID/GUID definitions
> + *
> + *****************************************************************************/
> +
> +/*
> + * Copyright (C) 2000 - 2015, Intel Corp.
> + * All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + * notice, this list of conditions, and the following disclaimer,
> + * without modification.
> + * 2. Redistributions in binary form must reproduce at minimum a disclaimer
> + * substantially similar to the "NO WARRANTY" disclaimer below
> + * ("Disclaimer") and any redistribution must be conditioned upon
> + * including a substantially similar Disclaimer requirement for further
> + * binary redistribution.
> + * 3. Neither the names of the above-listed copyright holders nor the names
> + * of any contributors may be used to endorse or promote products derived
> + * from this software without specific prior written permission.
> + *
> + * Alternatively, this software may be distributed under the terms of the
> + * GNU General Public License ("GPL") version 2 as published by the Free
> + * Software Foundation.
> + *
> + * NO WARRANTY
> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
> + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
> + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
> + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> + * POSSIBILITY OF SUCH DAMAGES.
> + */
> +
> +#ifndef __ACUUID_H__
> +#define __ACUUID_H__
> +
> +/*
> + * Note1: UUIDs and GUIDs are defined to be identical in ACPI.
> + *
> + * Note2: This file is standalone and should remain that way.
> + */
> +
> +/* NFIT/NVDIMM */
> +
> +#define UUID_VOLATILE_MEMORY "4F940573-DAFD-E344-B16C-3F22D252E5D0"
> +#define UUID_PERSISTENT_MEMORY "79D3F066-F3B4-7440-AC43-0D3318B78CDB"
> +#define UUID_CONTROL_REGION "F601F792-B413-5D40-910B-299367E8234C"
> +#define UUID_DATA_REGION "3005AF91-865D-0E47-A6B0-0A2DB9408249"
> +#define UUID_VOLATILE_VIRTUAL_DISK "5A53AB77-FC45-4B62-5560-F7B281D1F96E"
> +#define UUID_VOLATILE_VIRTUAL_CD "30BD5A3D-7541-CE87-6D64-D2ADE523C4BB"
> +#define UUID_PERSISTENT_VIRTUAL_DISK "C902EA5C-074D-69D3-269F-4496FBE096F9"
> +#define UUID_PERSISTENT_VIRTUAL_CD "88810108-CD42-48BB-100F-5387D53DED3D"
I think we've concluded in the review of a different patch set with these same
definitions that these are incorrect. Perhaps Bob can confirm?
-- ljk
> +
> +#endif /* __AUUID_H__ */
>
next prev parent reply other threads:[~2015-05-22 15:17 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 2:29 [PATCH 00/19] ACPICA: 20150515 Release Lv Zheng
2015-05-21 2:30 ` [PATCH 01/19] ACPICA: Additional dragon_fly BSD support Lv Zheng
2015-05-21 2:30 ` [PATCH 02/19] ACPICA: ACPI 6.0: Add support for STAO table Lv Zheng
2015-05-21 2:30 ` [PATCH 03/19] ACPICA: ACPI 6.0: Add support for new predefined names Lv Zheng
2015-05-21 2:30 ` [PATCH 04/19] ACPICA: ACPI 6.0: Add support for XENV table Lv Zheng
2015-05-21 2:30 ` [PATCH 05/19] ACPICA: Parser: Move a couple externals to the proper header Lv Zheng
2015-05-21 2:30 ` [PATCH 06/19] ACPICA: iASL: Enhance detection of non-ascii or corrupted input files Lv Zheng
2015-05-21 2:30 ` [PATCH 07/19] ACPICA: ACPI 6.0: Add support for WPBT table Lv Zheng
2015-05-21 2:30 ` [PATCH 08/19] ACPICA: ACPI 6.0: Add changes for FADT table Lv Zheng
2015-05-21 2:30 ` [PATCH 09/19] ACPICA: ACPI 6.0: Add changes for LPIT table Lv Zheng
2015-05-21 2:31 ` [PATCH 10/19] ACPICA: Dispatcher: Fix a resource leak issue in acpi_ds_auto_serialize_method() Lv Zheng
2015-05-21 2:31 ` [PATCH 11/19] ACPICA: Hardware: Fix a resource leak issue in acpi_hw_build_pci_list() Lv Zheng
2015-05-21 2:31 ` [PATCH 12/19] ACPICA: ACPI 6.0: Add changes for MADT table Lv Zheng
2015-05-21 14:36 ` Hanjun Guo
2015-05-22 0:16 ` Zheng, Lv
2015-05-23 0:02 ` Hanjun Guo
2015-05-21 2:31 ` [PATCH 13/19] ACPICA: ACPI 6.0: Add ACPI_SUB_PTR() Lv Zheng
2015-05-21 2:31 ` [PATCH 14/19] ACPICA: ACPI 6.0: Add support for IORT table Lv Zheng
2015-05-21 2:31 ` [PATCH 15/19] ACPICA: ACPI 6.0: Add changes for DRTM table Lv Zheng
2015-05-21 2:31 ` [PATCH 16/19] ACPICA: iASL/disassembler - fix possible fault for -e option Lv Zheng
2015-05-21 2:31 ` [PATCH 17/19] ACPICA: acpi_help: Add option to display all known/supported ACPI tables Lv Zheng
2015-05-21 2:31 ` [PATCH 18/19] ACPICA: ACPI 6.0: Add support for NFIT table Lv Zheng
2015-05-22 15:17 ` Linda Knippers [this message]
2015-05-22 15:28 ` Moore, Robert
2015-05-22 21:53 ` Rafael J. Wysocki
2015-05-22 21:36 ` Moore, Robert
2015-05-22 22:06 ` Rafael J. Wysocki
2015-05-22 16:12 ` Moore, Robert
2015-05-21 2:32 ` [PATCH 19/19] ACPICA: Update version to 20150515 Lv Zheng
2015-05-22 2:06 ` [PATCH 00/19] ACPICA: 20150515 Release Rafael J. Wysocki
2015-05-25 0:15 ` [PATCH 1/2] ACPICA: acpihelp: Update for new NFIT table GUIDs Lv Zheng
2015-05-26 0:21 ` Rafael J. Wysocki
2015-05-25 0:15 ` [PATCH 2/2] ACPICA: Fix for ill-formed GUID strings for NFIT tables Lv Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=555F4884.4090805@hp.com \
--to=linda.knippers@hp.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=rafael.j.wysocki@intel.com \
--cc=robert.moore@intel.com \
--cc=zetalog@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).