Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f42ccf2 authored by Robert Moore's avatar Robert Moore Committed by Len Brown
Browse files

ACPICA from Bob Moore <robert.moore@intel.com>



Implemented support for PCI Express root bridges
-- added support for device PNP0A08 in the root
bridge search within AcpiEvPciConfigRegionSetup.
acpi_ev_pci_config_region_setup().

The interpreter now automatically truncates incoming
64-bit constants to 32 bits if currently executing out
of a 32-bit ACPI table (Revision < 2). This also affects
the iASL compiler constant folding. (Note: as per below,
the iASL compiler no longer allows 64-bit constants within
32-bit tables.)

Fixed a problem where string and buffer objects with
"static" pointers (pointers to initialization data within
an ACPI table) were not handled consistently. The internal
object copy operation now always copies the data to a newly
allocated buffer, regardless of whether the source object
is static or not.

Fixed a problem with the FromBCD operator where an
implicit result conversion was improperly performed while
storing the result to the target operand. Since this is an
"explicit conversion" operator, the implicit conversion
should never be performed on the output.

Fixed a problem with the CopyObject operator where a copy
to an existing named object did not always completely
overwrite the existing object stored at name. Specifically,
a buffer-to-buffer copy did not delete the existing buffer.

Replaced "interrupt_level" with "interrupt_number" in all
GPE interfaces and structs for consistency.

Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent d8683a0c
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -547,6 +547,9 @@ acpi_ds_init_object_from_op (
		case AML_TYPE_LITERAL:
		case AML_TYPE_LITERAL:


			obj_desc->integer.value = op->common.value.integer;
			obj_desc->integer.value = op->common.value.integer;
#ifndef ACPI_NO_METHOD_EXECUTION
			acpi_ex_truncate_for32bit_table (obj_desc);
#endif
			break;
			break;




+2 −2
Original line number Original line Diff line number Diff line
@@ -261,12 +261,12 @@ acpi_ds_result_pop_from_bottom (


	if (!*object) {
	if (!*object) {
		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
			"Null operand! State=%p #Ops=%X, Index=%X\n",
			"Null operand! State=%p #Ops=%X Index=%X\n",
			walk_state, state->results.num_results, (u32) index));
			walk_state, state->results.num_results, (u32) index));
		return (AE_AML_NO_RETURN_VALUE);
		return (AE_AML_NO_RETURN_VALUE);
	}
	}


	ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s], Results=%p State=%p\n",
	ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] Results=%p State=%p\n",
		*object, (*object) ? acpi_ut_get_object_type_name (*object) : "NULL",
		*object, (*object) ? acpi_ut_get_object_type_name (*object) : "NULL",
		state, walk_state));
		state, walk_state));


+18 −18
Original line number Original line Diff line number Diff line
@@ -66,7 +66,7 @@ acpi_ev_match_prw_and_gpe (


static struct acpi_gpe_xrupt_info *
static struct acpi_gpe_xrupt_info *
acpi_ev_get_gpe_xrupt_block (
acpi_ev_get_gpe_xrupt_block (
	u32                             interrupt_level);
	u32                             interrupt_number);


static acpi_status
static acpi_status
acpi_ev_delete_gpe_xrupt (
acpi_ev_delete_gpe_xrupt (
@@ -75,7 +75,7 @@ acpi_ev_delete_gpe_xrupt (
static acpi_status
static acpi_status
acpi_ev_install_gpe_block (
acpi_ev_install_gpe_block (
	struct acpi_gpe_block_info      *gpe_block,
	struct acpi_gpe_block_info      *gpe_block,
	u32                             interrupt_level);
	u32                             interrupt_number);


static acpi_status
static acpi_status
acpi_ev_create_gpe_info_blocks (
acpi_ev_create_gpe_info_blocks (
@@ -482,7 +482,7 @@ cleanup:
 *
 *
 * FUNCTION:    acpi_ev_get_gpe_xrupt_block
 * FUNCTION:    acpi_ev_get_gpe_xrupt_block
 *
 *
 * PARAMETERS:  interrupt_level     - Interrupt for a GPE block
 * PARAMETERS:  interrupt_number     - Interrupt for a GPE block
 *
 *
 * RETURN:      A GPE interrupt block
 * RETURN:      A GPE interrupt block
 *
 *
@@ -495,7 +495,7 @@ cleanup:


static struct acpi_gpe_xrupt_info *
static struct acpi_gpe_xrupt_info *
acpi_ev_get_gpe_xrupt_block (
acpi_ev_get_gpe_xrupt_block (
	u32                             interrupt_level)
	u32                             interrupt_number)
{
{
	struct acpi_gpe_xrupt_info      *next_gpe_xrupt;
	struct acpi_gpe_xrupt_info      *next_gpe_xrupt;
	struct acpi_gpe_xrupt_info      *gpe_xrupt;
	struct acpi_gpe_xrupt_info      *gpe_xrupt;
@@ -509,7 +509,7 @@ acpi_ev_get_gpe_xrupt_block (


	next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head;
	next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head;
	while (next_gpe_xrupt) {
	while (next_gpe_xrupt) {
		if (next_gpe_xrupt->interrupt_level == interrupt_level) {
		if (next_gpe_xrupt->interrupt_number == interrupt_number) {
			return_PTR (next_gpe_xrupt);
			return_PTR (next_gpe_xrupt);
		}
		}


@@ -523,7 +523,7 @@ acpi_ev_get_gpe_xrupt_block (
		return_PTR (NULL);
		return_PTR (NULL);
	}
	}


	gpe_xrupt->interrupt_level = interrupt_level;
	gpe_xrupt->interrupt_number = interrupt_number;


	/* Install new interrupt descriptor with spin lock */
	/* Install new interrupt descriptor with spin lock */


@@ -544,13 +544,13 @@ acpi_ev_get_gpe_xrupt_block (


	/* Install new interrupt handler if not SCI_INT */
	/* Install new interrupt handler if not SCI_INT */


	if (interrupt_level != acpi_gbl_FADT->sci_int) {
	if (interrupt_number != acpi_gbl_FADT->sci_int) {
		status = acpi_os_install_interrupt_handler (interrupt_level,
		status = acpi_os_install_interrupt_handler (interrupt_number,
				 acpi_ev_gpe_xrupt_handler, gpe_xrupt);
				 acpi_ev_gpe_xrupt_handler, gpe_xrupt);
		if (ACPI_FAILURE (status)) {
		if (ACPI_FAILURE (status)) {
			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
			ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
				"Could not install GPE interrupt handler at level 0x%X\n",
				"Could not install GPE interrupt handler at level 0x%X\n",
				interrupt_level));
				interrupt_number));
			return_PTR (NULL);
			return_PTR (NULL);
		}
		}
	}
	}
@@ -584,14 +584,14 @@ acpi_ev_delete_gpe_xrupt (


	/* We never want to remove the SCI interrupt handler */
	/* We never want to remove the SCI interrupt handler */


	if (gpe_xrupt->interrupt_level == acpi_gbl_FADT->sci_int) {
	if (gpe_xrupt->interrupt_number == acpi_gbl_FADT->sci_int) {
		gpe_xrupt->gpe_block_list_head = NULL;
		gpe_xrupt->gpe_block_list_head = NULL;
		return_ACPI_STATUS (AE_OK);
		return_ACPI_STATUS (AE_OK);
	}
	}


	/* Disable this interrupt */
	/* Disable this interrupt */


	status = acpi_os_remove_interrupt_handler (gpe_xrupt->interrupt_level,
	status = acpi_os_remove_interrupt_handler (gpe_xrupt->interrupt_number,
			   acpi_ev_gpe_xrupt_handler);
			   acpi_ev_gpe_xrupt_handler);
	if (ACPI_FAILURE (status)) {
	if (ACPI_FAILURE (status)) {
		return_ACPI_STATUS (status);
		return_ACPI_STATUS (status);
@@ -621,7 +621,7 @@ acpi_ev_delete_gpe_xrupt (
 * FUNCTION:    acpi_ev_install_gpe_block
 * FUNCTION:    acpi_ev_install_gpe_block
 *
 *
 * PARAMETERS:  gpe_block       - New GPE block
 * PARAMETERS:  gpe_block       - New GPE block
 *              interrupt_level - Level to be associated with this GPE block
 *              interrupt_number - Xrupt to be associated with this GPE block
 *
 *
 * RETURN:      Status
 * RETURN:      Status
 *
 *
@@ -632,7 +632,7 @@ acpi_ev_delete_gpe_xrupt (
static acpi_status
static acpi_status
acpi_ev_install_gpe_block (
acpi_ev_install_gpe_block (
	struct acpi_gpe_block_info      *gpe_block,
	struct acpi_gpe_block_info      *gpe_block,
	u32                             interrupt_level)
	u32                             interrupt_number)
{
{
	struct acpi_gpe_block_info      *next_gpe_block;
	struct acpi_gpe_block_info      *next_gpe_block;
	struct acpi_gpe_xrupt_info      *gpe_xrupt_block;
	struct acpi_gpe_xrupt_info      *gpe_xrupt_block;
@@ -647,7 +647,7 @@ acpi_ev_install_gpe_block (
		return_ACPI_STATUS (status);
		return_ACPI_STATUS (status);
	}
	}


	gpe_xrupt_block = acpi_ev_get_gpe_xrupt_block (interrupt_level);
	gpe_xrupt_block = acpi_ev_get_gpe_xrupt_block (interrupt_number);
	if (!gpe_xrupt_block) {
	if (!gpe_xrupt_block) {
		status = AE_NO_MEMORY;
		status = AE_NO_MEMORY;
		goto unlock_and_exit;
		goto unlock_and_exit;
@@ -887,7 +887,7 @@ error_exit:
 *              gpe_block_address   - Address and space_iD
 *              gpe_block_address   - Address and space_iD
 *              register_count      - Number of GPE register pairs in the block
 *              register_count      - Number of GPE register pairs in the block
 *              gpe_block_base_number - Starting GPE number for the block
 *              gpe_block_base_number - Starting GPE number for the block
 *              interrupt_level     - H/W interrupt for the block
 *              interrupt_number    - H/W interrupt for the block
 *              return_gpe_block    - Where the new block descriptor is returned
 *              return_gpe_block    - Where the new block descriptor is returned
 *
 *
 * RETURN:      Status
 * RETURN:      Status
@@ -902,7 +902,7 @@ acpi_ev_create_gpe_block (
	struct acpi_generic_address     *gpe_block_address,
	struct acpi_generic_address     *gpe_block_address,
	u32                             register_count,
	u32                             register_count,
	u8                              gpe_block_base_number,
	u8                              gpe_block_base_number,
	u32                             interrupt_level,
	u32                             interrupt_number,
	struct acpi_gpe_block_info      **return_gpe_block)
	struct acpi_gpe_block_info      **return_gpe_block)
{
{
	struct acpi_gpe_block_info      *gpe_block;
	struct acpi_gpe_block_info      *gpe_block;
@@ -948,7 +948,7 @@ acpi_ev_create_gpe_block (


	/* Install the new block in the global list(s) */
	/* Install the new block in the global list(s) */


	status = acpi_ev_install_gpe_block (gpe_block, interrupt_level);
	status = acpi_ev_install_gpe_block (gpe_block, interrupt_number);
	if (ACPI_FAILURE (status)) {
	if (ACPI_FAILURE (status)) {
		ACPI_MEM_FREE (gpe_block);
		ACPI_MEM_FREE (gpe_block);
		return_ACPI_STATUS (status);
		return_ACPI_STATUS (status);
@@ -1013,7 +1013,7 @@ acpi_ev_create_gpe_block (
				((gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH) -1)),
				((gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH) -1)),
		gpe_device->name.ascii,
		gpe_device->name.ascii,
		gpe_block->register_count,
		gpe_block->register_count,
		interrupt_level));
		interrupt_number));


	/* Enable all valid GPEs found above */
	/* Enable all valid GPEs found above */


+7 −3
Original line number Original line Diff line number Diff line
@@ -218,10 +218,14 @@ acpi_ev_pci_config_region_setup (
		while (pci_root_node != acpi_gbl_root_node) {
		while (pci_root_node != acpi_gbl_root_node) {
			status = acpi_ut_execute_HID (pci_root_node, &object_hID);
			status = acpi_ut_execute_HID (pci_root_node, &object_hID);
			if (ACPI_SUCCESS (status)) {
			if (ACPI_SUCCESS (status)) {
				/* Got a valid _HID, check if this is a PCI root */
				/*

				 * Got a valid _HID string, check if this is a PCI root.
				 * New for ACPI 3.0: check for a PCI Express root also.
				 */
				if (!(ACPI_STRNCMP (object_hID.value, PCI_ROOT_HID_STRING,
				if (!(ACPI_STRNCMP (object_hID.value, PCI_ROOT_HID_STRING,
						   sizeof (PCI_ROOT_HID_STRING)))) {
						   sizeof (PCI_ROOT_HID_STRING))           ||
					!(ACPI_STRNCMP (object_hID.value, PCI_EXPRESS_ROOT_HID_STRING,
							  sizeof (PCI_EXPRESS_ROOT_HID_STRING))))) {
					/* Install a handler for this PCI root bridge */
					/* Install a handler for this PCI root bridge */


					status = acpi_install_address_space_handler ((acpi_handle) pci_root_node,
					status = acpi_install_address_space_handler ((acpi_handle) pci_root_node,
+3 −3
Original line number Original line Diff line number Diff line
@@ -635,7 +635,7 @@ unlock_and_exit:
 * PARAMETERS:  gpe_device          - Handle to the parent GPE Block Device
 * PARAMETERS:  gpe_device          - Handle to the parent GPE Block Device
 *              gpe_block_address   - Address and space_iD
 *              gpe_block_address   - Address and space_iD
 *              register_count      - Number of GPE register pairs in the block
 *              register_count      - Number of GPE register pairs in the block
 *              interrupt_level     - H/W interrupt for the block
 *              interrupt_number    - H/W interrupt for the block
 *
 *
 * RETURN:      Status
 * RETURN:      Status
 *
 *
@@ -648,7 +648,7 @@ acpi_install_gpe_block (
	acpi_handle                     gpe_device,
	acpi_handle                     gpe_device,
	struct acpi_generic_address     *gpe_block_address,
	struct acpi_generic_address     *gpe_block_address,
	u32                             register_count,
	u32                             register_count,
	u32                             interrupt_level)
	u32                             interrupt_number)
{
{
	acpi_status                     status;
	acpi_status                     status;
	union acpi_operand_object       *obj_desc;
	union acpi_operand_object       *obj_desc;
@@ -681,7 +681,7 @@ acpi_install_gpe_block (
	 * is always zero
	 * is always zero
	 */
	 */
	status = acpi_ev_create_gpe_block (node, gpe_block_address, register_count,
	status = acpi_ev_create_gpe_block (node, gpe_block_address, register_count,
			  0, interrupt_level, &gpe_block);
			  0, interrupt_number, &gpe_block);
	if (ACPI_FAILURE (status)) {
	if (ACPI_FAILURE (status)) {
		goto unlock_and_exit;
		goto unlock_and_exit;
	}
	}
Loading