Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286472
b: refs/heads/master
c: f654c0f
h: refs/heads/master
v: v3
  • Loading branch information
Lin Ming authored and Len Brown committed Jan 17, 2012
1 parent c2712f1 commit 8ce6c52
Show file tree
Hide file tree
Showing 15 changed files with 409 additions and 223 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: ecafe6faa294697305453b5a6af7760b94622787
refs/heads/master: f654c0fefa8c16d439185b61442710fadc167e78
1 change: 1 addition & 0 deletions trunk/drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ acpi-y += \
tbxfroot.o

acpi-y += \
utaddress.o \
utalloc.o \
utcopy.o \
utdebug.o \
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/acpi/acpica/acconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@

#define ACPI_MAX_SLEEP 2000 /* Two seconds */

/* Address Range lists are per-space_id (Memory and I/O only) */

#define ACPI_ADDRESS_RANGE_MAX 2

/******************************************************************************
*
* ACPI Specification constants (Do not change unless the specification changes)
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present;
ACPI_EXTERN u8 acpi_gbl_events_initialized;
ACPI_EXTERN u8 acpi_gbl_osi_data;
ACPI_EXTERN struct acpi_interface_info *acpi_gbl_supported_interfaces;
ACPI_EXTERN struct acpi_address_range
*acpi_gbl_address_range_list[ACPI_ADDRESS_RANGE_MAX];

#ifndef DEFINE_ACPI_GLOBALS

Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,15 @@ union acpi_generic_state {

typedef acpi_status(*ACPI_EXECUTE_OP) (struct acpi_walk_state * walk_state);

/* Address Range info block */

struct acpi_address_range {
struct acpi_address_range *next;
struct acpi_namespace_node *region_node;
acpi_physical_address start_address;
acpi_physical_address end_address;
};

/*****************************************************************************
*
* Parser typedefs and structs
Expand Down
18 changes: 18 additions & 0 deletions trunk/drivers/acpi/acpica/acutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,24 @@ acpi_ut_create_list(char *list_name,

#endif /* ACPI_DBG_TRACK_ALLOCATIONS */

/*
* utaddress - address range check
*/
acpi_status
acpi_ut_add_address_range(acpi_adr_space_type space_id,
acpi_physical_address address,
u32 length, struct acpi_namespace_node *region_node);

void
acpi_ut_remove_address_range(acpi_adr_space_type space_id,
struct acpi_namespace_node *region_node);

u32
acpi_ut_check_address_range(acpi_adr_space_type space_id,
acpi_physical_address address, u32 length, u8 warn);

void acpi_ut_delete_address_lists(void);

/*
* utxferror - various error/warning output functions
*/
Expand Down
30 changes: 10 additions & 20 deletions trunk/drivers/acpi/acpica/dsargs.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,13 @@ acpi_ds_get_bank_field_arguments(union acpi_operand_object *obj_desc)
status = acpi_ds_execute_arguments(node, node->parent,
extra_desc->extra.aml_length,
extra_desc->extra.aml_start);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}

status = acpi_ut_add_address_range(obj_desc->region.space_id,
obj_desc->region.address,
obj_desc->region.length, node);
return_ACPI_STATUS(status);
}

Expand Down Expand Up @@ -391,25 +398,8 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc)
return_ACPI_STATUS(status);
}

/* Validate the region address/length via the host OS */

status = acpi_os_validate_address(obj_desc->region.space_id,
obj_desc->region.address,
(acpi_size) obj_desc->region.length,
acpi_ut_get_node_name(node));

if (ACPI_FAILURE(status)) {
/*
* Invalid address/length. We will emit an error message and mark
* the region as invalid, so that it will cause an additional error if
* it is ever used. Then return AE_OK.
*/
ACPI_EXCEPTION((AE_INFO, status,
"During address validation of OpRegion [%4.4s]",
node->name.ascii));
obj_desc->common.flags |= AOPOBJ_INVALID;
status = AE_OK;
}

status = acpi_ut_add_address_range(obj_desc->region.space_id,
obj_desc->region.address,
obj_desc->region.length, node);
return_ACPI_STATUS(status);
}
Loading

0 comments on commit 8ce6c52

Please sign in to comment.