Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19498
b: refs/heads/master
c: c51a4de
h: refs/heads/master
v: v3
  • Loading branch information
Bob Moore authored and Len Brown committed Dec 10, 2005
1 parent 7826ea5 commit f68c84e
Show file tree
Hide file tree
Showing 35 changed files with 516 additions and 345 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: 96db255c8f014ae3497507104e8df809785a619f
refs/heads/master: c51a4de85de720670f2fbc592a6f8040af72ad87
25 changes: 16 additions & 9 deletions trunk/drivers/acpi/dispatcher/dsinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ acpi_ds_init_one_object(acpi_handle obj_handle,

case ACPI_TYPE_METHOD:

/*
* Print a dot for each method unless we are going to print
* the entire pathname
*/
if (!(acpi_dbg_level & ACPI_LV_INIT_NAMES)) {
ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, "."));
}

/*
* Set the execution data width (32 or 64) based upon the
* revision number of the parent ACPI table.
Expand All @@ -134,6 +126,21 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
if (info->table_desc->pointer->revision == 1) {
node->flags |= ANOBJ_DATA_WIDTH_32;
}
#ifdef ACPI_INIT_PARSE_METHODS
/*
* Note 11/2005: Removed this code to parse all methods during table
* load because it causes problems if there are any errors during the
* parse. Also, it seems like overkill and we probably don't want to
* abort a table load because of an issue with a single method.
*/

/*
* Print a dot for each method unless we are going to print
* the entire pathname
*/
if (!(acpi_dbg_level & ACPI_LV_INIT_NAMES)) {
ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, "."));
}

/*
* Always parse methods to detect errors, we will delete
Expand All @@ -149,7 +156,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,

/* This parse failed, but we will continue parsing more methods */
}

#endif
info->method_count++;
break;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/dispatcher/dswload.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
op->named.name = node->name.integer;

#if (defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY))
op->named.path = (u8 *) path;
op->named.path = ACPI_CAST_PTR(u8, path);
#endif

/*
Expand Down
12 changes: 3 additions & 9 deletions trunk/drivers/acpi/executer/exconvrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,18 +504,12 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
}

/*
* Perform the conversion.
* Create a new string object and string buffer
* (-1 because of extra separator included in string_length from above)
*/
string_length--;
if (string_length > ACPI_MAX_STRING_CONVERSION) { /* ACPI limit */
return_ACPI_STATUS(AE_AML_STRING_LIMIT);
}

/* Create a new string object and string buffer */

return_desc =
acpi_ut_create_string_object((acpi_size) string_length);
acpi_ut_create_string_object((acpi_size)
(string_length - 1));
if (!return_desc) {
return_ACPI_STATUS(AE_NO_MEMORY);
}
Expand Down
15 changes: 8 additions & 7 deletions trunk/drivers/acpi/executer/exdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,13 @@ static struct acpi_exdump_info acpi_ex_dump_event[2] = {
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(event.semaphore), "Semaphore"}
};

static struct acpi_exdump_info acpi_ex_dump_method[7] = {
static struct acpi_exdump_info acpi_ex_dump_method[8] = {
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_method), NULL},
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.param_count), "param_count"},
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.concurrency), "Concurrency"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.semaphore), "Semaphore"},
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"},
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.thread_count), "Thread Count"},
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(method.aml_length), "Aml Length"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.aml_start), "Aml Start"}
};
Expand Down Expand Up @@ -339,7 +340,7 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,
count = info->offset;

while (count) {
target = ((u8 *) obj_desc) + info->offset;
target = ACPI_ADD_PTR(u8, obj_desc, info->offset);
name = info->name;

switch (info->opcode) {
Expand All @@ -360,20 +361,19 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,
case ACPI_EXD_UINT16:

acpi_os_printf("%20s : %4.4X\n", name,
*ACPI_CAST_PTR(u16, target));
ACPI_GET16(target));
break;

case ACPI_EXD_UINT32:

acpi_os_printf("%20s : %8.8X\n", name,
*ACPI_CAST_PTR(u32, target));
ACPI_GET32(target));
break;

case ACPI_EXD_UINT64:

acpi_os_printf("%20s : %8.8X%8.8X\n", "Value",
ACPI_FORMAT_UINT64(*ACPI_CAST_PTR
(u64, target)));
ACPI_FORMAT_UINT64(ACPI_GET64(target)));
break;

case ACPI_EXD_POINTER:
Expand Down Expand Up @@ -969,7 +969,8 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc,
acpi_os_printf("[Buffer] Length %.2X = ",
obj_desc->buffer.length);
if (obj_desc->buffer.length) {
acpi_ut_dump_buffer((u8 *) obj_desc->buffer.pointer,
acpi_ut_dump_buffer(ACPI_CAST_PTR
(u8, obj_desc->buffer.pointer),
obj_desc->buffer.length,
DB_DWORD_DISPLAY, _COMPONENT);
} else {
Expand Down
38 changes: 15 additions & 23 deletions trunk/drivers/acpi/executer/exmisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,9 @@ acpi_ex_concat_template(union acpi_operand_object *operand0,
ACPI_MEMCPY(new_buf, operand0->buffer.pointer, length0);
ACPI_MEMCPY(new_buf + length0, operand1->buffer.pointer, length1);

/* Compute the new checksum */
/* Set the end_tag checksum to zero, means "ignore checksum" */

new_buf[return_desc->buffer.length - 1] =
acpi_ut_generate_checksum(return_desc->buffer.pointer,
(return_desc->buffer.length - 1));
new_buf[return_desc->buffer.length - 1] = 0;

/* Return the completed resource template */

Expand Down Expand Up @@ -242,7 +240,6 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
union acpi_operand_object *return_desc;
char *new_buf;
acpi_status status;
acpi_size new_length;

ACPI_FUNCTION_TRACE("ex_do_concatenate");

Expand All @@ -269,7 +266,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
break;

default:
ACPI_REPORT_ERROR(("Concat - invalid obj type: %X\n",
ACPI_REPORT_ERROR(("Concatanate - invalid object type: %X\n",
ACPI_GET_OBJECT_TYPE(operand0)));
status = AE_AML_INTERNAL;
}
Expand Down Expand Up @@ -309,8 +306,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,

/* Copy the first integer, LSB first */

ACPI_MEMCPY(new_buf,
&operand0->integer.value,
ACPI_MEMCPY(new_buf, &operand0->integer.value,
acpi_gbl_integer_byte_width);

/* Copy the second integer (LSB first) after the first */
Expand All @@ -324,14 +320,11 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,

/* Result of two Strings is a String */

new_length = (acpi_size) operand0->string.length +
(acpi_size) local_operand1->string.length;
if (new_length > ACPI_MAX_STRING_CONVERSION) {
status = AE_AML_STRING_LIMIT;
goto cleanup;
}

return_desc = acpi_ut_create_string_object(new_length);
return_desc = acpi_ut_create_string_object((acpi_size)
(operand0->string.
length +
local_operand1->
string.length));
if (!return_desc) {
status = AE_NO_MEMORY;
goto cleanup;
Expand All @@ -351,11 +344,10 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
/* Result of two Buffers is a Buffer */

return_desc = acpi_ut_create_buffer_object((acpi_size)
operand0->buffer.
length +
(acpi_size)
local_operand1->
buffer.length);
(operand0->buffer.
length +
local_operand1->
buffer.length));
if (!return_desc) {
status = AE_NO_MEMORY;
goto cleanup;
Expand All @@ -365,8 +357,8 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,

/* Concatenate the buffers */

ACPI_MEMCPY(new_buf,
operand0->buffer.pointer, operand0->buffer.length);
ACPI_MEMCPY(new_buf, operand0->buffer.pointer,
operand0->buffer.length);
ACPI_MEMCPY(new_buf + operand0->buffer.length,
local_operand1->buffer.pointer,
local_operand1->buffer.length);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/executer/exnames.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string)
*aml_address, aml_address));
}

*in_aml_address = (u8 *) aml_address;
*in_aml_address = ACPI_CAST_PTR(u8, aml_address);
return_ACPI_STATUS(status);
}

Expand Down
10 changes: 4 additions & 6 deletions trunk/drivers/acpi/executer/exoparg2.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,6 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
(length < operand[1]->integer.value) &&
(operand[0]->buffer.pointer[length])) {
length++;
if (length > ACPI_MAX_STRING_CONVERSION) {
status = AE_AML_STRING_LIMIT;
goto cleanup;
}
}

/* Allocate a new string object */
Expand All @@ -358,8 +354,10 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
goto cleanup;
}

/* Copy the raw buffer data with no transform. NULL terminated already */

/*
* Copy the raw buffer data with no transform.
* (NULL terminated already)
*/
ACPI_MEMCPY(return_desc->string.pointer,
operand[0]->buffer.pointer, length);
break;
Expand Down
16 changes: 8 additions & 8 deletions trunk/drivers/acpi/executer/exregion.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,20 +199,20 @@ acpi_ex_system_memory_space_handler(u32 function,
*value = 0;
switch (bit_width) {
case 8:
*value = (acpi_integer) * ((u8 *) logical_addr_ptr);
*value = (acpi_integer) ACPI_GET8(logical_addr_ptr);
break;

case 16:
*value = (acpi_integer) * ((u16 *) logical_addr_ptr);
*value = (acpi_integer) ACPI_GET16(logical_addr_ptr);
break;

case 32:
*value = (acpi_integer) * ((u32 *) logical_addr_ptr);
*value = (acpi_integer) ACPI_GET32(logical_addr_ptr);
break;

#if ACPI_MACHINE_WIDTH != 16
case 64:
*value = (acpi_integer) * ((u64 *) logical_addr_ptr);
*value = (acpi_integer) ACPI_GET64(logical_addr_ptr);
break;
#endif
default:
Expand All @@ -225,20 +225,20 @@ acpi_ex_system_memory_space_handler(u32 function,

switch (bit_width) {
case 8:
*(u8 *) logical_addr_ptr = (u8) * value;
ACPI_SET8(logical_addr_ptr) = (u8) * value;
break;

case 16:
*(u16 *) logical_addr_ptr = (u16) * value;
ACPI_SET16(logical_addr_ptr) = (u16) * value;
break;

case 32:
*(u32 *) logical_addr_ptr = (u32) * value;
ACPI_SET32(logical_addr_ptr) = (u32) * value;
break;

#if ACPI_MACHINE_WIDTH != 16
case 64:
*(u64 *) logical_addr_ptr = (u64) * value;
ACPI_SET64(logical_addr_ptr) = (u64) * value;
break;
#endif

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/executer/exstorob.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc,

/* We know that source_desc is a buffer by now */

buffer = (u8 *) source_desc->buffer.pointer;
buffer = ACPI_CAST_PTR(u8, source_desc->buffer.pointer);
length = source_desc->buffer.length;

/*
Expand Down Expand Up @@ -160,7 +160,7 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc,

/* We know that source_desc is a string by now */

buffer = (u8 *) source_desc->string.pointer;
buffer = ACPI_CAST_PTR(u8, source_desc->string.pointer);
length = source_desc->string.length;

/*
Expand Down
Loading

0 comments on commit f68c84e

Please sign in to comment.