Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19510
b: refs/heads/master
c: 4a90c7e
h: refs/heads/master
v: v3
  • Loading branch information
Bob Moore authored and Len Brown committed Jan 20, 2006
1 parent 76604a9 commit c53e57c
Show file tree
Hide file tree
Showing 143 changed files with 659 additions and 1,024 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c5c363826e435cf4d54d917202567e5b57cae5f
refs/heads/master: 4a90c7e86202f46fa9af011bdbcdf36e355d1721
9 changes: 4 additions & 5 deletions trunk/drivers/acpi/dispatcher/dsfield.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*****************************************************************************/

/*
* Copyright (C) 2000 - 2005, R. Byron Moore
* Copyright (C) 2000 - 2006, R. Byron Moore
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -293,7 +293,7 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
+ (acpi_integer) arg->common.value.size;

if (position > ACPI_UINT32_MAX) {
ACPI_REPORT_ERROR(("Field [%4.4s] bit offset too large (> 0xFFFFFFFF)\n", (char *)&info->field_node->name));
ACPI_REPORT_ERROR(("Field [%4.4s] bit offset too large (> 0xFFFFFFFF)\n", ACPI_CAST_PTR(char, &info->field_node->name)));
return_ACPI_STATUS(AE_SUPPORT);
}

Expand All @@ -302,9 +302,8 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,

default:

ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Invalid opcode in field list: %X\n",
arg->common.aml_opcode));
ACPI_REPORT_ERROR(("Invalid opcode in field list: %X\n",
arg->common.aml_opcode));
return_ACPI_STATUS(AE_AML_BAD_OPCODE);
}

Expand Down
20 changes: 6 additions & 14 deletions trunk/drivers/acpi/dispatcher/dsinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*****************************************************************************/

/*
* Copyright (C) 2000 - 2005, R. Byron Moore
* Copyright (C) 2000 - 2006, R. Byron Moore
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -84,7 +84,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
acpi_object_type type;
acpi_status status;

ACPI_FUNCTION_NAME("ds_init_one_object");
ACPI_FUNCTION_ENTRY();

/*
* We are only interested in NS nodes owned by the table that
Expand All @@ -105,11 +105,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,

status = acpi_ds_initialize_region(obj_handle);
if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Region %p [%4.4s] - Init failure, %s\n",
obj_handle,
acpi_ut_get_node_name(obj_handle),
acpi_format_exception(status)));
ACPI_REPORT_ERROR(("Region %p [%4.4s] - Init failure, %s\n", obj_handle, acpi_ut_get_node_name(obj_handle), acpi_format_exception(status)));
}

info->op_region_count++;
Expand Down Expand Up @@ -148,11 +144,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
*/
status = acpi_ds_parse_method(obj_handle);
if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"\n+Method %p [%4.4s] - parse failure, %s\n",
obj_handle,
acpi_ut_get_node_name(obj_handle),
acpi_format_exception(status)));
ACPI_REPORT_ERROR(("\n+Method %p [%4.4s] - parse failure, %s\n", obj_handle, acpi_ut_get_node_name(obj_handle), acpi_format_exception(status)));

/* This parse failed, but we will continue parsing more methods */
}
Expand Down Expand Up @@ -214,8 +206,8 @@ acpi_ds_initialize_objects(struct acpi_table_desc * table_desc,
status = acpi_walk_namespace(ACPI_TYPE_ANY, start_node, ACPI_UINT32_MAX,
acpi_ds_init_one_object, &info, NULL);
if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed, %s\n",
acpi_format_exception(status)));
ACPI_REPORT_ERROR(("walk_namespace failed, %s\n",
acpi_format_exception(status)));
}

ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/dispatcher/dsmethod.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*****************************************************************************/

/*
* Copyright (C) 2000 - 2005, R. Byron Moore
* Copyright (C) 2000 - 2006, R. Byron Moore
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down
28 changes: 9 additions & 19 deletions trunk/drivers/acpi/dispatcher/dsmthdat.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
******************************************************************************/

/*
* Copyright (C) 2000 - 2005, R. Byron Moore
* Copyright (C) 2000 - 2006, R. Byron Moore
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -260,9 +260,7 @@ acpi_ds_method_data_get_node(u16 opcode,
case AML_LOCAL_OP:

if (index > ACPI_METHOD_MAX_LOCAL) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Local index %d is invalid (max %d)\n",
index, ACPI_METHOD_MAX_LOCAL));
ACPI_REPORT_ERROR(("Local index %d is invalid (max %d)\n", index, ACPI_METHOD_MAX_LOCAL));
return_ACPI_STATUS(AE_AML_INVALID_INDEX);
}

Expand All @@ -274,9 +272,8 @@ acpi_ds_method_data_get_node(u16 opcode,
case AML_ARG_OP:

if (index > ACPI_METHOD_MAX_ARG) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Arg index %d is invalid (max %d)\n",
index, ACPI_METHOD_MAX_ARG));
ACPI_REPORT_ERROR(("Arg index %d is invalid (max %d)\n",
index, ACPI_METHOD_MAX_ARG));
return_ACPI_STATUS(AE_AML_INVALID_INDEX);
}

Expand All @@ -286,8 +283,7 @@ acpi_ds_method_data_get_node(u16 opcode,
break;

default:
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Opcode %d is invalid\n",
opcode));
ACPI_REPORT_ERROR(("Opcode %d is invalid\n", opcode));
return_ACPI_STATUS(AE_AML_BAD_OPCODE);
}

Expand Down Expand Up @@ -378,8 +374,7 @@ acpi_ds_method_data_get_value(u16 opcode,
/* Validate the object descriptor */

if (!dest_desc) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Null object descriptor pointer\n"));
ACPI_REPORT_ERROR(("Null object descriptor pointer\n"));
return_ACPI_STATUS(AE_BAD_PARAMETER);
}

Expand Down Expand Up @@ -424,23 +419,18 @@ acpi_ds_method_data_get_value(u16 opcode,
switch (opcode) {
case AML_ARG_OP:

ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Uninitialized Arg[%d] at node %p\n",
index, node));
ACPI_REPORT_ERROR(("Uninitialized Arg[%d] at node %p\n", index, node));

return_ACPI_STATUS(AE_AML_UNINITIALIZED_ARG);

case AML_LOCAL_OP:

ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Uninitialized Local[%d] at node %p\n",
index, node));
ACPI_REPORT_ERROR(("Uninitialized Local[%d] at node %p\n", index, node));

return_ACPI_STATUS(AE_AML_UNINITIALIZED_LOCAL);

default:
ACPI_REPORT_ERROR(("Not Arg/Local opcode: %X\n",
opcode));
ACPI_REPORT_ERROR(("Not a Arg/Local opcode: %X\n", opcode));
return_ACPI_STATUS(AE_AML_INTERNAL);
}
}
Expand Down
21 changes: 7 additions & 14 deletions trunk/drivers/acpi/dispatcher/dsobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*****************************************************************************/

/*
* Copyright (C) 2000 - 2005, R. Byron Moore
* Copyright (C) 2000 - 2006, R. Byron Moore
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -214,10 +214,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
byte_list = arg->named.next;
if (byte_list) {
if (byte_list->common.aml_opcode != AML_INT_BYTELIST_OP) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Expecting bytelist, got AML opcode %X in op %p\n",
byte_list->common.aml_opcode,
byte_list));
ACPI_REPORT_ERROR(("Expecting bytelist, got AML opcode %X in op %p\n", byte_list->common.aml_opcode, byte_list));

acpi_ut_remove_reference(obj_desc);
return (AE_TYPE);
Expand Down Expand Up @@ -543,9 +540,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,

default:

ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Unknown constant opcode %X\n",
opcode));
ACPI_REPORT_ERROR(("Unknown constant opcode %X\n", opcode));
status = AE_AML_OPERAND_TYPE;
break;
}
Expand All @@ -560,9 +555,8 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
break;

default:
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Unknown Integer type %X\n",
op_info->type));
ACPI_REPORT_ERROR(("Unknown Integer type %X\n",
op_info->type));
status = AE_AML_OPERAND_TYPE;
break;
}
Expand Down Expand Up @@ -640,9 +634,8 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,

default:

ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Unimplemented data type: %X\n",
ACPI_GET_OBJECT_TYPE(obj_desc)));
ACPI_REPORT_ERROR(("Unimplemented data type: %X\n",
ACPI_GET_OBJECT_TYPE(obj_desc)));

status = AE_AML_OPERAND_TYPE;
break;
Expand Down
41 changes: 15 additions & 26 deletions trunk/drivers/acpi/dispatcher/dsopcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*****************************************************************************/

/*
* Copyright (C) 2000 - 2005, R. Byron Moore
* Copyright (C) 2000 - 2006, R. Byron Moore
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -413,9 +413,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
/* Host object must be a Buffer */

if (ACPI_GET_OBJECT_TYPE(buffer_desc) != ACPI_TYPE_BUFFER) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Target of Create Field is not a Buffer object - %s\n",
acpi_ut_get_object_type_name(buffer_desc)));
ACPI_REPORT_ERROR(("Target of Create Field is not a Buffer object - %s\n", acpi_ut_get_object_type_name(buffer_desc)));

status = AE_AML_OPERAND_TYPE;
goto cleanup;
Expand All @@ -427,10 +425,9 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
* after resolution in acpi_ex_resolve_operands().
*/
if (ACPI_GET_DESCRIPTOR_TYPE(result_desc) != ACPI_DESC_TYPE_NAMED) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"(%s) destination not a NS Node [%s]\n",
acpi_ps_get_opcode_name(aml_opcode),
acpi_ut_get_descriptor_name(result_desc)));
ACPI_REPORT_ERROR(("(%s) destination not a NS Node [%s]\n",
acpi_ps_get_opcode_name(aml_opcode),
acpi_ut_get_descriptor_name(result_desc)));

status = AE_AML_OPERAND_TYPE;
goto cleanup;
Expand All @@ -453,8 +450,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
/* Must have a valid (>0) bit count */

if (bit_count == 0) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Attempt to create_field of length 0\n"));
ACPI_REPORT_ERROR(("Attempt to create_field of length 0\n"));
status = AE_AML_OPERAND_VALUE;
goto cleanup;
}
Expand Down Expand Up @@ -507,23 +503,16 @@ acpi_ds_init_buffer_field(u16 aml_opcode,

default:

ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Unknown field creation opcode %02x\n",
aml_opcode));
ACPI_REPORT_ERROR(("Unknown field creation opcode %02x\n",
aml_opcode));
status = AE_AML_BAD_OPCODE;
goto cleanup;
}

/* Entire field must fit within the current length of the buffer */

if ((bit_offset + bit_count) > (8 * (u32) buffer_desc->buffer.length)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Field [%4.4s] size %d exceeds Buffer [%4.4s] size %d (bits)\n",
acpi_ut_get_node_name(result_desc),
bit_offset + bit_count,
acpi_ut_get_node_name(buffer_desc->buffer.
node),
8 * (u32) buffer_desc->buffer.length));
ACPI_REPORT_ERROR(("Field [%4.4s] size %d exceeds Buffer [%4.4s] size %d (bits)\n", acpi_ut_get_node_name(result_desc), bit_offset + bit_count, acpi_ut_get_node_name(buffer_desc->buffer.node), 8 * (u32) buffer_desc->buffer.length));
status = AE_AML_BUFFER_LIMIT;
goto cleanup;
}
Expand Down Expand Up @@ -629,9 +618,10 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
"after acpi_ex_resolve_operands");

if (ACPI_FAILURE(status)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "(%s) bad operand(s) (%X)\n",
acpi_ps_get_opcode_name(op->common.
aml_opcode), status));
ACPI_REPORT_ERROR(("(%s) bad operand(s) (%X)\n",
acpi_ps_get_opcode_name(op->common.
aml_opcode),
status));

return_ACPI_STATUS(status);
}
Expand Down Expand Up @@ -1155,9 +1145,8 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,

default:

ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Unknown control opcode=%X Op=%p\n",
op->common.aml_opcode, op));
ACPI_REPORT_ERROR(("Unknown control opcode=%X Op=%p\n",
op->common.aml_opcode, op));

status = AE_AML_BAD_OPCODE;
break;
Expand Down
18 changes: 7 additions & 11 deletions trunk/drivers/acpi/dispatcher/dsutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
******************************************************************************/

/*
* Copyright (C) 2000 - 2005, R. Byron Moore
* Copyright (C) 2000 - 2006, R. Byron Moore
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -176,7 +176,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
/* Must have both an Op and a Result Object */

if (!op) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Null Op\n"));
ACPI_REPORT_ERROR(("Null Op\n"));
return_UINT8(TRUE);
}

Expand Down Expand Up @@ -216,8 +216,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
parent_info =
acpi_ps_get_opcode_info(op->common.parent->common.aml_opcode);
if (parent_info->class == AML_CLASS_UNKNOWN) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Unknown parent opcode. Op=%p\n", op));
ACPI_REPORT_ERROR(("Unknown parent opcode Op=%p\n", op));
return_UINT8(FALSE);
}

Expand Down Expand Up @@ -344,7 +343,7 @@ acpi_ds_delete_result_if_not_used(union acpi_parse_object *op,
ACPI_FUNCTION_TRACE_PTR("ds_delete_result_if_not_used", result_obj);

if (!op) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Null Op\n"));
ACPI_REPORT_ERROR(("Null Op\n"));
return_VOID;
}

Expand Down Expand Up @@ -635,10 +634,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
* Only error is underflow, and this indicates
* a missing or null operand!
*/
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Missing or null operand, %s\n",
acpi_format_exception
(status)));
ACPI_REPORT_ERROR(("Missing or null operand, %s\n", acpi_format_exception(status)));
return_ACPI_STATUS(status);
}
} else {
Expand Down Expand Up @@ -730,7 +726,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
*/
(void)acpi_ds_obj_stack_pop_and_delete(arg_count, walk_state);

ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "While creating Arg %d - %s\n",
(arg_count + 1), acpi_format_exception(status)));
ACPI_REPORT_ERROR(("While creating Arg %d - %s\n",
(arg_count + 1), acpi_format_exception(status)));
return_ACPI_STATUS(status);
}
Loading

0 comments on commit c53e57c

Please sign in to comment.