Commit 96e1676b authored by Andy Grover's avatar Andy Grover

ACPI: Interpreter update to 20020918

parent 23224c29
/******************************************************************************
*
* Module Name: dsfield - Dispatcher field routines
* $Revision: 66 $
* $Revision: 67 $
*
*****************************************************************************/
......@@ -250,7 +250,7 @@ acpi_ds_get_field_names (
}
ACPI_REPORT_ERROR (("Field name [%4.4s] already exists in current scope\n",
&arg->named.name));
(char *) &arg->named.name));
}
else {
arg->common.node = info->field_node;
......@@ -271,7 +271,7 @@ acpi_ds_get_field_names (
if (position > ACPI_UINT32_MAX) {
ACPI_REPORT_ERROR (("Field [%4.4s] bit offset too large (> 0xFFFFFFFF)\n",
&info->field_node->name));
(char *) &info->field_node->name));
return_ACPI_STATUS (AE_SUPPORT);
}
......@@ -417,7 +417,7 @@ acpi_ds_init_field_objects (
}
ACPI_REPORT_ERROR (("Field name [%4.4s] already exists in current scope\n",
&arg->named.name));
(char *) &arg->named.name));
/* Name already exists, just ignore this error */
......
/******************************************************************************
*
* Module Name: dsobject - Dispatcher object management routines
* $Revision: 106 $
* $Revision: 107 $
*
*****************************************************************************/
......@@ -746,9 +746,10 @@ acpi_ds_init_object_from_op (
obj_desc->reference.opcode = AML_LOCAL_OP;
obj_desc->reference.offset = opcode - AML_LOCAL_OP;
#ifndef ACPI_NO_METHOD_EXECUTION
acpi_ds_method_data_get_node (AML_LOCAL_OP, obj_desc->reference.offset,
walk_state, (acpi_namespace_node **) &obj_desc->reference.object);
status = acpi_ds_method_data_get_node (AML_LOCAL_OP, obj_desc->reference.offset,
walk_state, (acpi_namespace_node **) &obj_desc->reference.object);
#endif
break;
......
/******************************************************************************
*
* Module Name: dswload - Dispatcher namespace load callbacks
* $Revision: 71 $
* $Revision: 73 $
*
*****************************************************************************/
......@@ -202,7 +202,26 @@ acpi_ds_load1_begin_op (
/* These are acceptable types */
break;
default:
case ACPI_TYPE_INTEGER:
case ACPI_TYPE_STRING:
case ACPI_TYPE_BUFFER:
/*
* These types we will allow, but we will change the type. This
* enables some existing code of the form:
*
* Name (DEB, 0)
* Scope (DEB) { ... }
*/
ACPI_REPORT_WARNING (("Invalid type (%s) for target of Scope operator [%4.4s], changing type to ANY\n",
acpi_ut_get_type_name (node->type), path));
node->type = ACPI_TYPE_ANY;
walk_state->scope_info->common.value = ACPI_TYPE_ANY;
break;
default:
/* All other types are an error */
......@@ -440,6 +459,51 @@ acpi_ds_load2_begin_op (
}
if (ACPI_SUCCESS (status)) {
/*
* For the scope op, we must check to make sure that the target is
* one of the opcodes that actually opens a scope
*/
if (walk_state->opcode == AML_SCOPE_OP) {
switch (node->type) {
case ACPI_TYPE_ANY: /* Scope nodes are untyped (ANY) */
case ACPI_TYPE_DEVICE:
case ACPI_TYPE_METHOD:
case ACPI_TYPE_POWER:
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_THERMAL:
/* These are acceptable types */
break;
case ACPI_TYPE_INTEGER:
case ACPI_TYPE_STRING:
case ACPI_TYPE_BUFFER:
/*
* These types we will allow, but we will change the type. This
* enables some existing code of the form:
*
* Name (DEB, 0)
* Scope (DEB) { ... }
*/
ACPI_REPORT_WARNING (("Invalid type (%s) for target of Scope operator [%4.4s], changing type to ANY\n",
acpi_ut_get_type_name (node->type), buffer_ptr));
node->type = ACPI_TYPE_ANY;
walk_state->scope_info->common.value = ACPI_TYPE_ANY;
break;
default:
/* All other types are an error */
ACPI_REPORT_ERROR (("Invalid type (%s) for target of Scope operator [%4.4s]\n",
acpi_ut_get_type_name (node->type), buffer_ptr));
return (AE_AML_OPERAND_TYPE);
}
}
if (!op) {
/* Create a new op */
......
/******************************************************************************
*
* Module Name: exconvrt - Object conversion routines
* $Revision: 37 $
* $Revision: 38 $
*
*****************************************************************************/
......@@ -230,7 +230,33 @@ acpi_ex_convert_to_buffer (
case ACPI_TYPE_STRING:
*result_desc = obj_desc;
/*
* Create a new Buffer object
*/
ret_desc = acpi_ut_create_internal_object (ACPI_TYPE_BUFFER);
if (!ret_desc) {
return_ACPI_STATUS (AE_NO_MEMORY);
}
/* Need enough space for one integer */
new_buf = ACPI_MEM_CALLOCATE (obj_desc->string.length);
if (!new_buf) {
ACPI_REPORT_ERROR
(("Ex_convert_to_buffer: Buffer allocation failure\n"));
acpi_ut_remove_reference (ret_desc);
return_ACPI_STATUS (AE_NO_MEMORY);
}
ACPI_STRNCPY ((char *) new_buf, (char *) obj_desc->string.pointer, obj_desc->string.length);
ret_desc->buffer.flags |= AOPOBJ_DATA_VALID;
ret_desc->buffer.pointer = new_buf;
ret_desc->buffer.length = obj_desc->string.length;
/* Return the new buffer descriptor */
*result_desc = ret_desc;
break;
......
......@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes
* $Revision: 108 $
* $Revision: 109 $
*
*****************************************************************************/
......@@ -28,7 +28,6 @@
#include "acpi.h"
#include "acinterp.h"
#include "amlcode.h"
#include "acdispat.h"
#define _COMPONENT ACPI_EXECUTER
......
......@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exoparg1 - AML execution - opcodes with 1 argument
* $Revision: 142 $
* $Revision: 143 $
*
*****************************************************************************/
......@@ -59,7 +59,6 @@
* fully resolved operands.
!*/
/*******************************************************************************
*
* FUNCTION: Acpi_ex_opcode_1A_0T_0R
......@@ -561,73 +560,11 @@ acpi_ex_opcode_1A_0T_1R (
case AML_TYPE_OP: /* Object_type (Source_object) */
if (ACPI_GET_OBJECT_TYPE (operand[0]) == INTERNAL_TYPE_REFERENCE) {
/*
* Not a Name -- an indirect name pointer would have
* been converted to a direct name pointer in Resolve_operands
*/
switch (operand[0]->reference.opcode) {
case AML_DEBUG_OP:
/* The Debug Object is of type "Debug_object" */
type = ACPI_TYPE_DEBUG_OBJECT;
break;
case AML_INDEX_OP:
/* Get the type of this reference (index into another object) */
type = operand[0]->reference.target_type;
if (type == ACPI_TYPE_PACKAGE) {
/*
* The main object is a package, we want to get the type
* of the individual package element that is referenced by
* the index.
*/
type = ACPI_GET_OBJECT_TYPE (*(operand[0]->reference.where));
}
break;
case AML_LOCAL_OP:
case AML_ARG_OP:
type = acpi_ds_method_data_get_type (operand[0]->reference.opcode,
operand[0]->reference.offset, walk_state);
break;
default:
ACPI_REPORT_ERROR (("Acpi_ex_opcode_1A_0T_1R/Type_op: Unknown Reference subtype %X\n",
operand[0]->reference.opcode));
status = AE_AML_INTERNAL;
goto cleanup;
}
}
else {
/*
* It's not a Reference, so it must be a direct name pointer.
*/
type = acpi_ns_get_type ((acpi_namespace_node *) operand[0]);
/* Convert internal types to external types */
switch (type) {
case INTERNAL_TYPE_REGION_FIELD:
case INTERNAL_TYPE_BANK_FIELD:
case INTERNAL_TYPE_INDEX_FIELD:
type = ACPI_TYPE_FIELD_UNIT;
break;
default:
/* No change to Type required */
break;
}
/* Get the type of the base object */
status = acpi_ex_resolve_multiple (walk_state, operand[0], &type, NULL);
if (ACPI_FAILURE (status)) {
goto cleanup;
}
/* Allocate a descriptor to hold the type. */
......@@ -644,39 +581,36 @@ acpi_ex_opcode_1A_0T_1R (
case AML_SIZE_OF_OP: /* Size_of (Source_object) */
temp_desc = operand[0];
if (ACPI_GET_DESCRIPTOR_TYPE (operand[0]) == ACPI_DESC_TYPE_NAMED) {
temp_desc = acpi_ns_get_attached_object ((acpi_namespace_node *) operand[0]);
}
/* Get the base object */
if (!temp_desc) {
value = 0;
status = acpi_ex_resolve_multiple (walk_state, operand[0], &type, &temp_desc);
if (ACPI_FAILURE (status)) {
goto cleanup;
}
else {
/*
* Type is guaranteed to be a buffer, string, or package at this
* point (even if the original operand was an object reference, it
* will be resolved and typechecked during operand resolution.)
*/
switch (ACPI_GET_OBJECT_TYPE (temp_desc)) {
case ACPI_TYPE_BUFFER:
value = temp_desc->buffer.length;
break;
case ACPI_TYPE_STRING:
value = temp_desc->string.length;
break;
/*
* Type is guaranteed to be a buffer, string, or package at this
* point (even if the original operand was an object reference, it
* will be resolved and typechecked during operand resolution.)
*/
switch (type) {
case ACPI_TYPE_BUFFER:
value = temp_desc->buffer.length;
break;
case ACPI_TYPE_PACKAGE:
value = temp_desc->package.count;
break;
case ACPI_TYPE_STRING:
value = temp_desc->string.length;
break;
default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Size_of, Not Buf/Str/Pkg - found type %s\n",
acpi_ut_get_object_type_name (temp_desc)));
status = AE_AML_OPERAND_TYPE;
goto cleanup;
}
case ACPI_TYPE_PACKAGE:
value = temp_desc->package.count;
break;
default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Size_of, Not Buf/Str/Pkg - found type %s\n",
acpi_ut_get_type_name (type)));
status = AE_AML_OPERAND_TYPE;
goto cleanup;
}
/*
......
......@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exresnte - AML Interpreter object resolution
* $Revision: 57 $
* $Revision: 58 $
*
*****************************************************************************/
......@@ -26,7 +26,6 @@
#include "acpi.h"
#include "amlcode.h"
#include "acdispat.h"
#include "acinterp.h"
#include "acnamesp.h"
......
......@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exresolv - AML Interpreter object resolution
* $Revision: 115 $
* $Revision: 116 $
*
*****************************************************************************/
......@@ -29,6 +29,7 @@
#include "amlcode.h"
#include "acdispat.h"
#include "acinterp.h"
#include "acnamesp.h"
#define _COMPONENT ACPI_EXECUTER
......@@ -280,3 +281,169 @@ acpi_ex_resolve_object_to_value (
}
/*******************************************************************************
*
* FUNCTION: Acpi_ex_resolve_multiple
*
* PARAMETERS: Walk_state - Current state (contains AML opcode)
* Operand - Starting point for resolution
* Return_type - Where the object type is returned
* Return_desc - Where the resolved object is returned
*
* RETURN: Status
*
* DESCRIPTION: Return the base object and type. Traverse a reference list if
* necessary to get to the base object.
*
******************************************************************************/
acpi_status
acpi_ex_resolve_multiple (
acpi_walk_state *walk_state,
acpi_operand_object *operand,
acpi_object_type *return_type,
acpi_operand_object **return_desc)
{
acpi_operand_object *obj_desc = (void *) operand;
acpi_namespace_node *node;
acpi_object_type type;
ACPI_FUNCTION_TRACE ("Ex_get_object_type");
/*
* For reference objects created via the Ref_of or Index operators,
* we need to get to the base object (as per the ACPI specification
* of the Object_type and Size_of operators). This means traversing
* the list of possibly many nested references.
*/
while (ACPI_GET_OBJECT_TYPE (obj_desc) == INTERNAL_TYPE_REFERENCE) {
switch (obj_desc->reference.opcode) {
case AML_REF_OF_OP:
/* Dereference the reference pointer */
node = obj_desc->reference.object;
/* All "References" point to a NS node */
if (ACPI_GET_DESCRIPTOR_TYPE (node) != ACPI_DESC_TYPE_NAMED) {
return_ACPI_STATUS (AE_AML_INTERNAL);
}
/* Get the attached object */
obj_desc = acpi_ns_get_attached_object (node);
if (!obj_desc) {
/* No object, use the NS node type */
type = acpi_ns_get_type (node);
goto exit;
}
/* Check for circular references */
if (obj_desc == operand) {
return_ACPI_STATUS (AE_AML_CIRCULAR_REFERENCE);
}
break;
case AML_INDEX_OP:
/* Get the type of this reference (index into another object) */
type = obj_desc->reference.target_type;
if (type != ACPI_TYPE_PACKAGE) {
goto exit;
}
/*
* The main object is a package, we want to get the type
* of the individual package element that is referenced by
* the index.
*
* This could of course in turn be another reference object.
*/
obj_desc = *(obj_desc->reference.where);
break;
case AML_INT_NAMEPATH_OP:
/* Dereference the reference pointer */
node = obj_desc->reference.node;
/* All "References" point to a NS node */
if (ACPI_GET_DESCRIPTOR_TYPE (node) != ACPI_DESC_TYPE_NAMED) {
return_ACPI_STATUS (AE_AML_INTERNAL);
}
/* Get the attached object */
obj_desc = acpi_ns_get_attached_object (node);
if (!obj_desc) {
/* No object, use the NS node type */
type = acpi_ns_get_type (node);
goto exit;
}
/* Check for circular references */
if (obj_desc == operand) {
return_ACPI_STATUS (AE_AML_CIRCULAR_REFERENCE);
}
break;
case AML_DEBUG_OP:
/* The Debug Object is of type "Debug_object" */
type = ACPI_TYPE_DEBUG_OBJECT;
goto exit;
default:
ACPI_REPORT_ERROR (("Acpi_ex_resolve_multiple: Unknown Reference subtype %X\n",
obj_desc->reference.opcode));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
}
/*
* Now we are guaranteed to have an object that has not been created
* via the Ref_of or Index operators.
*/
type = ACPI_GET_OBJECT_TYPE (obj_desc);
exit:
/* Convert internal types to external types */
switch (type) {
case INTERNAL_TYPE_REGION_FIELD:
case INTERNAL_TYPE_BANK_FIELD:
case INTERNAL_TYPE_INDEX_FIELD:
type = ACPI_TYPE_FIELD_UNIT;
break;
default:
/* No change to Type required */
break;
}
*return_type = type;
if (return_desc) {
*return_desc = obj_desc;
}
return_ACPI_STATUS (AE_OK);
}
......@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exresop - AML Interpreter operand/object resolution
* $Revision: 55 $
* $Revision: 57 $
*
*****************************************************************************/
......@@ -29,7 +29,6 @@
#include "amlcode.h"
#include "acparser.h"
#include "acinterp.h"
#include "acnamesp.h"
#define _COMPONENT ACPI_EXECUTER
......@@ -463,11 +462,12 @@ acpi_ex_resolve_operands (
case ARGI_DATAOBJECT:
/*
* ARGI_DATAOBJECT is only used by the Size_of operator.
* Need a buffer, string, package, or Node reference.
* Need a buffer, string, package, or Ref_of reference.
*
* The only reference allowed here is a direct reference to
* a namespace node.
*/
#if 0
if (ACPI_GET_OBJECT_TYPE (*stack_ptr) == INTERNAL_TYPE_REFERENCE) {
if (!(*stack_ptr)->reference.node) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
......@@ -497,13 +497,14 @@ acpi_ex_resolve_operands (
acpi_ut_remove_reference (*stack_ptr);
(*stack_ptr) = temp_node;
}
#endif
/* Need a buffer, string, package */
switch (ACPI_GET_OBJECT_TYPE (*stack_ptr)) {
case ACPI_TYPE_PACKAGE:
case ACPI_TYPE_STRING:
case ACPI_TYPE_BUFFER:
case INTERNAL_TYPE_REFERENCE:
/* Valid operand */
break;
......
......@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exstore - AML Interpreter object store support
* $Revision: 169 $
* $Revision: 171 $
*
*****************************************************************************/
......@@ -103,7 +103,7 @@ acpi_ex_store (
return_ACPI_STATUS (AE_OK);
}
/*lint: -fallthrough */
/*lint -fallthrough */
default:
......@@ -286,6 +286,12 @@ acpi_ex_store_object_to_index (
if (new_desc != obj_desc) {
acpi_ut_remove_reference (obj_desc);
*(index_desc->reference.where) = new_desc;
/* If same as the original source, add a reference */
if (new_desc == source_desc) {
acpi_ut_add_reference (new_desc);
}
}
break;
......
......@@ -3,7 +3,7 @@
*
* Module Name: exstoren - AML Interpreter object store support,
* Store to Node (namespace object)
* $Revision: 50 $
* $Revision: 51 $
*
*****************************************************************************/
......@@ -210,6 +210,15 @@ acpi_ex_store_object_to_object (
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
if (source_desc == actual_src_desc) {
/*
* No conversion was performed. Return the Source_desc as the
* new object.
*/
*new_desc = source_desc;
return_ACPI_STATUS (AE_OK);
}
}
/*
......
/******************************************************************************
*
* Name: acconfig.h - Global configuration constants
* $Revision: 110 $
* $Revision: 111 $
*
*****************************************************************************/
......@@ -54,7 +54,7 @@
/* Version string */
#define ACPI_CA_VERSION 0x20020829
#define ACPI_CA_VERSION 0x20020918
/* Version of ACPI supported */
......
/******************************************************************************
*
* Name: acdebug.h - ACPI/AML debugger
* $Revision: 63 $
* $Revision: 64 $
*
*****************************************************************************/
......@@ -197,6 +197,10 @@ acpi_db_decode_and_display_object (
NATIVE_CHAR *target,
NATIVE_CHAR *output_type);
void
acpi_db_decode_node (
acpi_namespace_node *node);
void
acpi_db_display_result_object (
acpi_operand_object *obj_desc,
......
/******************************************************************************
*
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
* $Revision: 63 $
* $Revision: 64 $
*
*****************************************************************************/
......@@ -142,8 +142,9 @@
#define AE_AML_ALIGNMENT (acpi_status) (0x001D | AE_CODE_AML)
#define AE_AML_NO_RESOURCE_END_TAG (acpi_status) (0x001E | AE_CODE_AML)
#define AE_AML_BAD_RESOURCE_VALUE (acpi_status) (0x001F | AE_CODE_AML)
#define AE_AML_CIRCULAR_REFERENCE (acpi_status) (0x0020 | AE_CODE_AML)
#define AE_CODE_AML_MAX 0x001F
#define AE_CODE_AML_MAX 0x0020
/*
* Internal exceptions used for control
......@@ -158,8 +159,9 @@
#define AE_CTRL_TRANSFER (acpi_status) (0x0008 | AE_CODE_CONTROL)
#define AE_CTRL_BREAK (acpi_status) (0x0009 | AE_CODE_CONTROL)
#define AE_CTRL_CONTINUE (acpi_status) (0x000A | AE_CODE_CONTROL)
#define AE_CTRL_SKIP (acpi_status) (0x000B | AE_CODE_CONTROL)
#define AE_CODE_CTRL_MAX 0x000A
#define AE_CODE_CTRL_MAX 0x000B
#ifdef DEFINE_ACPI_GLOBALS
......@@ -255,7 +257,8 @@ NATIVE_CHAR const *acpi_gbl_exception_names_aml[] =
"AE_AML_NO_WHILE",
"AE_AML_ALIGNMENT",
"AE_AML_NO_RESOURCE_END_TAG",
"AE_AML_BAD_RESOURCE_VALUE"
"AE_AML_BAD_RESOURCE_VALUE",
"AE_AML_CIRCULAR_REFERENCE"
};
NATIVE_CHAR const *acpi_gbl_exception_names_ctrl[] =
......@@ -269,7 +272,8 @@ NATIVE_CHAR const *acpi_gbl_exception_names_ctrl[] =
"AE_CTRL_END",
"AE_CTRL_TRANSFER",
"AE_CTRL_BREAK",
"AE_CTRL_CONTINUE"
"AE_CTRL_CONTINUE",
"AE_CTRL_SKIP"
};
#endif /* ACPI GLOBALS */
......
/******************************************************************************
*
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
* $Revision: 138 $
* $Revision: 139 $
*
*****************************************************************************/
......@@ -194,6 +194,13 @@ acpi_ex_get_object_reference (
acpi_operand_object **return_desc,
acpi_walk_state *walk_state);
acpi_status
acpi_ex_resolve_multiple (
acpi_walk_state *walk_state,
acpi_operand_object *operand,
acpi_object_type *return_type,
acpi_operand_object **return_desc);
acpi_status
acpi_ex_concat_template (
acpi_operand_object *obj_desc,
......
......@@ -261,6 +261,10 @@ acpi_os_writable (
void *pointer,
u32 length);
u32
acpi_os_get_timer (
void);
acpi_status
acpi_os_signal (
u32 function,
......@@ -280,6 +284,10 @@ acpi_os_vprintf (
const NATIVE_CHAR *format,
va_list args);
void
acpi_os_redirect_output (
void *destination);
/*
* Debug input
......@@ -290,4 +298,16 @@ acpi_os_get_line (
NATIVE_CHAR *buffer);
/*
* Debug
*/
void
acpi_os_dbg_assert(
void *failed_assertion,
void *file_name,
u32 line_number,
NATIVE_CHAR *message);
#endif /* __ACPIOSXF_H__ */
/******************************************************************************
*
* Name: actypes.h - Common data types for the entire ACPI subsystem
* $Revision: 238 $
* $Revision: 239 $
*
*****************************************************************************/
......
/******************************************************************************
*
* Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
* $Revision: 143 $
* $Revision: 144 $
*
*****************************************************************************/
......@@ -138,7 +138,7 @@ acpi_ut_allocate_owner_id (
#ifndef ACPI_USE_SYSTEM_CLIBRARY
u32
ACPI_SIZE
acpi_ut_strlen (
const NATIVE_CHAR *string);
......@@ -151,15 +151,15 @@ NATIVE_CHAR *
acpi_ut_strncpy (
NATIVE_CHAR *dst_string,
const NATIVE_CHAR *src_string,
NATIVE_UINT count);
ACPI_SIZE count);
int
acpi_ut_strncmp (
const NATIVE_CHAR *string1,
const NATIVE_CHAR *string2,
NATIVE_UINT count);
ACPI_SIZE count);
u32
int
acpi_ut_strcmp (
const NATIVE_CHAR *string1,
const NATIVE_CHAR *string2);
......@@ -173,7 +173,7 @@ NATIVE_CHAR *
acpi_ut_strncat (
NATIVE_CHAR *dst_string,
const NATIVE_CHAR *src_string,
NATIVE_UINT count);
ACPI_SIZE count);
u32
acpi_ut_strtoul (
......@@ -190,13 +190,13 @@ void *
acpi_ut_memcpy (
void *dest,
const void *src,
NATIVE_UINT count);
ACPI_SIZE count);
void *
acpi_ut_memset (
void *dest,
NATIVE_UINT value,
NATIVE_UINT count);
ACPI_SIZE count);
int
acpi_ut_to_upper (
......
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
* $Revision: 139 $
* $Revision: 140 $
*
*****************************************************************************/
......@@ -116,7 +116,7 @@ acpi_ns_dump_pathname (
status = acpi_ns_handle_to_pathname (handle, &buffer);
if (ACPI_SUCCESS (status)) {
acpi_os_printf ("%s %s (Node %p)\n", msg, buffer.pointer, handle);
acpi_os_printf ("%s %s (Node %p)\n", msg, (char *) buffer.pointer, handle);
ACPI_MEM_FREE (buffer.pointer);
}
......@@ -254,10 +254,10 @@ acpi_ns_dump_one_object (
switch (type) {
case ACPI_TYPE_PROCESSOR:
acpi_os_printf (" ID %hd Addr %.4X Len %.4X\n",
acpi_os_printf (" ID %X Len %.4X Addr %p\n",
obj_desc->processor.proc_id,
obj_desc->processor.address,
obj_desc->processor.length);
obj_desc->processor.length,
(char *) obj_desc->processor.address);
break;
......@@ -269,8 +269,8 @@ acpi_ns_dump_one_object (
case ACPI_TYPE_METHOD:
acpi_os_printf (" Args %hd Len %.4X Aml %p \n",
obj_desc->method.param_count,
acpi_os_printf (" Args %X Len %.4X Aml %p\n",
(u32) obj_desc->method.param_count,
obj_desc->method.aml_length,
obj_desc->method.aml_start);
break;
......
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
* $Revision: 3 $
* $Revision: 4 $
*
*****************************************************************************/
......@@ -26,7 +26,6 @@
#include "acpi.h"
#include "acnamesp.h"
#include "acparser.h"
#define _COMPONENT ACPI_NAMESPACE
......
/******************************************************************************
*
* Module Name: nsload - namespace loading/expanding/contracting procedures
* $Revision: 58 $
* $Revision: 59 $
*
*****************************************************************************/
......@@ -26,7 +26,6 @@
#include "acpi.h"
#include "acnamesp.h"
#include "amlcode.h"
#include "acparser.h"
#include "acdispat.h"
......
/******************************************************************************
*
* Module Name: psxface - Parser external interfaces
* $Revision: 65 $
* $Revision: 66 $
*
*****************************************************************************/
......@@ -28,7 +28,6 @@
#include "acparser.h"
#include "acdispat.h"
#include "acinterp.h"
#include "amlcode.h"
#include "acnamesp.h"
......
/*******************************************************************************
*
* Module Name: rsdump - Functions to display the resource structures.
* $Revision: 33 $
* $Revision: 34 $
*
******************************************************************************/
......@@ -865,20 +865,25 @@ acpi_rs_dump_address64 (
ACPI_ADDRESS_FIXED == address64_data->max_address_fixed ?
"" : "not ");
acpi_os_printf (" Granularity: %16X\n",
address64_data->granularity);
acpi_os_printf (" Granularity: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->granularity),
ACPI_LODWORD (address64_data->granularity));
acpi_os_printf (" Address range min: %16X\n",
address64_data->min_address_range);
acpi_os_printf (" Address range min: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->min_address_range),
ACPI_HIDWORD (address64_data->min_address_range));
acpi_os_printf (" Address range max: %16X\n",
address64_data->max_address_range);
acpi_os_printf (" Address range max: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->max_address_range),
ACPI_HIDWORD (address64_data->max_address_range));
acpi_os_printf (" Address translation offset: %16X\n",
address64_data->address_translation_offset);
acpi_os_printf (" Address translation offset: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->address_translation_offset),
ACPI_HIDWORD (address64_data->address_translation_offset));
acpi_os_printf (" Address Length: %16X\n",
address64_data->address_length);
acpi_os_printf (" Address Length: %8.8X%8.8X\n",
ACPI_HIDWORD (address64_data->address_length),
ACPI_HIDWORD (address64_data->address_length));
if(0xFF != address64_data->resource_source.index) {
acpi_os_printf (" Resource Source Index: %X\n",
......
/******************************************************************************
*
* Module Name: tbget - ACPI Table get* routines
* $Revision: 79 $
* $Revision: 80 $
*
*****************************************************************************/
......@@ -129,8 +129,10 @@ acpi_tb_get_table_header (
status = acpi_os_map_memory (address->pointer.physical, sizeof (acpi_table_header),
(void **) &header);
if (ACPI_FAILURE (status)) {
ACPI_REPORT_ERROR (("Could not map memory at %p for length %X\n",
address->pointer.physical, sizeof (acpi_table_header)));
ACPI_REPORT_ERROR (("Could not map memory at %8.8X%8.8X for length %X\n",
ACPI_HIDWORD (address->pointer.physical),
ACPI_LODWORD (address->pointer.physical),
sizeof (acpi_table_header)));
return_ACPI_STATUS (status);
}
......@@ -343,8 +345,10 @@ acpi_tb_get_this_table (
status = acpi_os_map_memory (address->pointer.physical, (ACPI_SIZE) header->length,
(void **) &full_table);
if (ACPI_FAILURE (status)) {
ACPI_REPORT_ERROR (("Could not map memory for table [%4.4s] at %p for length %X\n",
header->signature, address->pointer.physical, header->length));
ACPI_REPORT_ERROR (("Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X\n",
header->signature,
ACPI_HIDWORD (address->pointer.physical),
ACPI_LODWORD (address->pointer.physical), header->length));
return (status);
}
......
/******************************************************************************
*
* Module Name: utcopy - Internal to external object translation utilities
* $Revision: 103 $
* $Revision: 104 $
*
*****************************************************************************/
......@@ -25,7 +25,6 @@
#include "acpi.h"
#include "acnamesp.h"
#include "amlcode.h"
......
/******************************************************************************
*
* Module Name: utdebug - Debug print routines
* $Revision: 104 $
* $Revision: 105 $
*
*****************************************************************************/
......@@ -152,7 +152,7 @@ acpi_ut_debug_print (
acpi_os_printf ("%8s-%04ld ", dbg_info->module_name, line_number);
if (ACPI_LV_THREADS & acpi_dbg_level) {
acpi_os_printf ("[%04lX] ", thread_id, acpi_gbl_nesting_level, dbg_info->proc_name);
acpi_os_printf ("[%04lX] ", thread_id);
}
acpi_os_printf ("[%02ld] %-22.22s: ", acpi_gbl_nesting_level, dbg_info->proc_name);
......@@ -516,7 +516,7 @@ acpi_ut_dump_buffer (
while (i < count) {
/* Print current offset */
acpi_os_printf ("%05X ", i);
acpi_os_printf ("%05X ", (u32) i);
/* Print 16 hex chars */
......
/******************************************************************************
*
* Module Name: utglobal - Global variables for the ACPI subsystem
* $Revision: 170 $
* $Revision: 171 $
*
*****************************************************************************/
......@@ -27,7 +27,6 @@
#include "acpi.h"
#include "acnamesp.h"
#include "amlcode.h"
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("utglobal")
......
/******************************************************************************
*
* Module Name: utinit - Common ACPI subsystem initialization
* $Revision: 113 $
* $Revision: 114 $
*
*****************************************************************************/
......@@ -56,7 +56,7 @@ acpi_ut_fadt_register_error (
ACPI_REPORT_WARNING (
("Invalid FADT value %s=%X at offset %X FADT=%p\n",
register_name, value, offset, acpi_gbl_FADT));
register_name, value, (u32) offset, acpi_gbl_FADT));
}
......
/*******************************************************************************
*
* Module Name: utmisc - common utility procedures
* $Revision: 80 $
* $Revision: 81 $
*
******************************************************************************/
......@@ -26,8 +26,6 @@
#include "acpi.h"
#include "acnamesp.h"
#include "amlcode.h"
#include "acinterp.h"
#define _COMPONENT ACPI_UTILITIES
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment