mirror of
https://github.com/acpica/acpica/
synced 2025-03-15 18:52:51 +03:00
Handler context has been moved from the handler object, which is
global to all instances to which it is associated, to the region object, which is specific to each instance. In the case of PCI, the PCI_HANDLER_CONTEXT includes the original handler context installed via AcpiInstallAddressSpaceHandler as well as PCI specific information. date 2000.07.27.20.59.00; author mwalz; state Exp;
This commit is contained in:
parent
5460c3dd21
commit
120dd0cedd
@ -165,7 +165,7 @@ AcpiEvFindOnePciRootBus (
|
||||
if (STRNCMP ((INT8 *)&Entry->Name, METHOD_NAME__HID, ACPI_NAME_SIZE) ||
|
||||
(!ObjDesc))
|
||||
{
|
||||
return AE_OK;
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -181,7 +181,7 @@ AcpiEvFindOnePciRootBus (
|
||||
|
||||
if (ObjDesc->Number.Value != PCI_ROOT_HID_VALUE)
|
||||
{
|
||||
return AE_OK;
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
break;
|
||||
@ -191,14 +191,14 @@ AcpiEvFindOnePciRootBus (
|
||||
if (STRNCMP (ObjDesc->String.Pointer, PCI_ROOT_HID_STRING,
|
||||
sizeof (PCI_ROOT_HID_STRING)))
|
||||
{
|
||||
return AE_OK;
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
return AE_OK;
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -212,7 +212,7 @@ AcpiEvFindOnePciRootBus (
|
||||
ADDRESS_SPACE_PCI_CONFIG,
|
||||
ACPI_DEFAULT_HANDLER, NULL, NULL);
|
||||
|
||||
return AE_OK;
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -236,7 +236,7 @@ AcpiEvFindPciRootBuses (
|
||||
AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
|
||||
FALSE, AcpiEvFindOnePciRootBus, NULL, NULL);
|
||||
|
||||
return AE_OK;
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
@ -463,9 +463,10 @@ AcpiEvAddressSpaceDispatch (
|
||||
}
|
||||
|
||||
/*
|
||||
* Save the returned context for use in all accesses to the region
|
||||
* Save the returned context for use in all accesses to
|
||||
* this particular region.
|
||||
*/
|
||||
HandlerDesc->AddrHandler.Context = RegionContext;
|
||||
RegionObj->Region.RegionContext = RegionContext;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -488,10 +489,12 @@ AcpiEvAddressSpaceDispatch (
|
||||
}
|
||||
|
||||
/*
|
||||
* Invoke the handler.
|
||||
* Invoke the handler. The RegionContext will contain
|
||||
* address handler's context and possibly some other information
|
||||
* (e.g. for PCI address handlers.
|
||||
*/
|
||||
Status = Handler (Function, Address, BitWidth, Value,
|
||||
HandlerDesc->AddrHandler.Context);
|
||||
RegionObj->Region.RegionContext);
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
|
@ -365,11 +365,17 @@ AcpiEvPciConfigRegionSetup (
|
||||
PciContext->Bus = Temp;
|
||||
}
|
||||
|
||||
/*
|
||||
* Finally, include the original Handler context in the newly created PciContext
|
||||
*/
|
||||
PciContext->HandlerContext = HandlerContext;
|
||||
|
||||
AcpiCmAcquireMutex (ACPI_MTX_NAMESPACE);
|
||||
|
||||
*ReturnContext = PciContext;
|
||||
|
||||
RegionObj->Region.RegionFlags |= REGION_INITIALIZED;
|
||||
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user