提交 852d4f9c 编写于 作者: B Bob Moore 提交者: Rafael J. Wysocki

ACPICA: Update resource descriptor handling

ACPICA commit c8eac10178b387f9eb1935694e509d4518da77bb

This change restores the change introduced by commit 23b5bbe and
adds a comment concerning resource descriptor buffers that extend
beyond the END_TAG descriptor.

Link: https://github.com/acpica/acpica/commit/c8eac101Signed-off-by: NBob Moore <robert.moore@intel.com>
Signed-off-by: NLv Zheng <lv.zheng@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 c9442300
...@@ -184,9 +184,11 @@ acpi_ut_walk_aml_resources(struct acpi_walk_state *walk_state, ...@@ -184,9 +184,11 @@ acpi_ut_walk_aml_resources(struct acpi_walk_state *walk_state,
ACPI_FUNCTION_TRACE(ut_walk_aml_resources); ACPI_FUNCTION_TRACE(ut_walk_aml_resources);
/* The absolute minimum resource template is one end_tag descriptor */ /*
* The absolute minimum resource template is one end_tag descriptor.
if (aml_length < sizeof(struct aml_resource_end_tag)) { * However, we will treat a lone end_tag as just a simple buffer.
*/
if (aml_length <= sizeof(struct aml_resource_end_tag)) {
return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG); return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG);
} }
...@@ -243,8 +245,10 @@ acpi_ut_walk_aml_resources(struct acpi_walk_state *walk_state, ...@@ -243,8 +245,10 @@ acpi_ut_walk_aml_resources(struct acpi_walk_state *walk_state,
*context = aml; *context = aml;
} }
/* Normal exit */ /*
* Normal exit. Note: We allow the buffer to be larger than
* the resource template, as long as the END_TAG exists.
*/
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册