mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 14:53:40 +00:00
[HAL]
- Use ExFreePoolWithTag instead of ExFreePool - Add definitions of used tags svn path=/trunk/; revision=51943
This commit is contained in:
parent
b24d89aee6
commit
6a2050afbe
4 changed files with 17 additions and 14 deletions
|
@ -36,7 +36,7 @@ HalpAllocateArray(IN ULONG ArraySize)
|
||||||
/* Allocate the array */
|
/* Allocate the array */
|
||||||
Array = ExAllocatePoolWithTag(NonPagedPool,
|
Array = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
Size,
|
Size,
|
||||||
'BusH');
|
TAG_BUS_HANDLER);
|
||||||
if (!Array) KeBugCheckEx(HAL_MEMORY_ALLOCATION, Size, 0, (ULONG_PTR)__FILE__, __LINE__);
|
if (!Array) KeBugCheckEx(HAL_MEMORY_ALLOCATION, Size, 0, (ULONG_PTR)__FILE__, __LINE__);
|
||||||
|
|
||||||
/* Initialize it */
|
/* Initialize it */
|
||||||
|
@ -263,7 +263,7 @@ HaliRegisterBusHandler(IN INTERFACE_TYPE InterfaceType,
|
||||||
/* Allocate the bus handler */
|
/* Allocate the bus handler */
|
||||||
Bus = ExAllocatePoolWithTag(NonPagedPool,
|
Bus = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
sizeof(HAL_BUS_HANDLER) + ExtraData,
|
sizeof(HAL_BUS_HANDLER) + ExtraData,
|
||||||
'HsuB');
|
TAG_BUS_HANDLER);
|
||||||
if (!Bus) return STATUS_INSUFFICIENT_RESOURCES;
|
if (!Bus) return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
/* Return the handler */
|
/* Return the handler */
|
||||||
|
@ -404,11 +404,11 @@ HaliRegisterBusHandler(IN INTERFACE_TYPE InterfaceType,
|
||||||
//MmUnlockPagableImageSection(CodeHandle);
|
//MmUnlockPagableImageSection(CodeHandle);
|
||||||
|
|
||||||
/* Free all allocations */
|
/* Free all allocations */
|
||||||
if (Bus) ExFreePool(Bus);
|
if (Bus) ExFreePoolWithTag(Bus, TAG_BUS_HANDLER);
|
||||||
if (InterfaceArray) ExFreePool(InterfaceArray);
|
if (InterfaceArray) ExFreePoolWithTag(InterfaceArray, TAG_BUS_HANDLER);
|
||||||
if (InterfaceBusNumberArray) ExFreePool(InterfaceBusNumberArray);
|
if (InterfaceBusNumberArray) ExFreePoolWithTag(InterfaceBusNumberArray, TAG_BUS_HANDLER);
|
||||||
if (ConfigArray) ExFreePool(ConfigArray);
|
if (ConfigArray) ExFreePoolWithTag(ConfigArray, TAG_BUS_HANDLER);
|
||||||
if (ConfigBusNumberArray) ExFreePool(ConfigBusNumberArray);
|
if (ConfigBusNumberArray) ExFreePoolWithTag(ConfigBusNumberArray, TAG_BUS_HANDLER);
|
||||||
|
|
||||||
/* And we're done */
|
/* And we're done */
|
||||||
return Status;
|
return Status;
|
||||||
|
|
|
@ -572,7 +572,7 @@ HalpGetISAFixedPCIIrq(IN PBUS_HANDLER BusHandler,
|
||||||
if (PciData.VendorID == PCI_INVALID_VENDORID) return STATUS_UNSUCCESSFUL;
|
if (PciData.VendorID == PCI_INVALID_VENDORID) return STATUS_UNSUCCESSFUL;
|
||||||
|
|
||||||
/* Allocate the supported range structure */
|
/* Allocate the supported range structure */
|
||||||
*Range = ExAllocatePoolWithTag(PagedPool, sizeof(SUPPORTED_RANGE), 'Hal ');
|
*Range = ExAllocatePoolWithTag(PagedPool, sizeof(SUPPORTED_RANGE), TAG_HAL);
|
||||||
if (!*Range) return STATUS_INSUFFICIENT_RESOURCES;
|
if (!*Range) return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
/* Set it up */
|
/* Set it up */
|
||||||
|
@ -766,7 +766,7 @@ HalpAssignPCISlotResources(IN PBUS_HANDLER BusHandler,
|
||||||
PagedPool,
|
PagedPool,
|
||||||
sizeof(CM_RESOURCE_LIST) +
|
sizeof(CM_RESOURCE_LIST) +
|
||||||
(ResourceCount - 1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR),
|
(ResourceCount - 1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR),
|
||||||
' laH');
|
TAG_HAL);
|
||||||
|
|
||||||
if (NULL == *AllocatedResources)
|
if (NULL == *AllocatedResources)
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
|
@ -1015,7 +1015,7 @@ HalpQueryPciRegistryInfo(VOID)
|
||||||
sizeof(PCI_REGISTRY_INFO_INTERNAL) +
|
sizeof(PCI_REGISTRY_INFO_INTERNAL) +
|
||||||
(KeyInformation.Values *
|
(KeyInformation.Values *
|
||||||
sizeof(PCI_CARD_DESCRIPTOR)),
|
sizeof(PCI_CARD_DESCRIPTOR)),
|
||||||
' laH');
|
TAG_HAL);
|
||||||
if (PciRegistryInfo)
|
if (PciRegistryInfo)
|
||||||
{
|
{
|
||||||
/* Get the first card descriptor entry */
|
/* Get the first card descriptor entry */
|
||||||
|
@ -1069,7 +1069,7 @@ HalpQueryPciRegistryInfo(VOID)
|
||||||
/* Just allocate the basic structure then */
|
/* Just allocate the basic structure then */
|
||||||
PciRegistryInfo = ExAllocatePoolWithTag(NonPagedPool,
|
PciRegistryInfo = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
sizeof(PCI_REGISTRY_INFO_INTERNAL),
|
sizeof(PCI_REGISTRY_INFO_INTERNAL),
|
||||||
' laH');
|
TAG_HAL);
|
||||||
if (!PciRegistryInfo) return NULL;
|
if (!PciRegistryInfo) return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1119,7 +1119,7 @@ HalpInitializePciStubs(VOID)
|
||||||
MaxPciBusNumber = PciRegistryInfo->NoBuses - 1;
|
MaxPciBusNumber = PciRegistryInfo->NoBuses - 1;
|
||||||
|
|
||||||
/* Free the info structure */
|
/* Free the info structure */
|
||||||
ExFreePool(PciRegistryInfo);
|
ExFreePoolWithTag(PciRegistryInfo, TAG_HAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize the PCI lock */
|
/* Initialize the PCI lock */
|
||||||
|
|
|
@ -1096,7 +1096,7 @@ HalpInitializePciBus(VOID)
|
||||||
HalpGetNMICrashFlag();
|
HalpGetNMICrashFlag();
|
||||||
|
|
||||||
/* Free the registry data */
|
/* Free the registry data */
|
||||||
ExFreePool(PciRegistryInfo);
|
ExFreePoolWithTag(PciRegistryInfo, TAG_HAL);
|
||||||
|
|
||||||
/* Tell PnP if this hard supports correct decoding */
|
/* Tell PnP if this hard supports correct decoding */
|
||||||
HalpMarkChipsetDecode(ExtendedAddressDecoding);
|
HalpMarkChipsetDecode(ExtendedAddressDecoding);
|
||||||
|
@ -1256,7 +1256,7 @@ HaliTranslateBusAddress(IN INTERFACE_TYPE InterfaceType,
|
||||||
Handler = HalReferenceHandlerForBus(InterfaceType, BusNumber);
|
Handler = HalReferenceHandlerForBus(InterfaceType, BusNumber);
|
||||||
if (!(Handler) || !(Handler->TranslateBusAddress))
|
if (!(Handler) || !(Handler->TranslateBusAddress))
|
||||||
{
|
{
|
||||||
DPRINT1("No translator!\n");
|
DPRINT1("No translator Interface: %x, Bus: %x, Handler: %x!\n", InterfaceType, BusNumber, Handler);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,9 @@
|
||||||
#include "internal/i386/intrin_i.h"
|
#include "internal/i386/intrin_i.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define TAG_HAL ' laH'
|
||||||
|
#define TAG_BUS_HANDLER 'BusH'
|
||||||
|
|
||||||
/* Internal HAL Headers */
|
/* Internal HAL Headers */
|
||||||
#include "apic.h"
|
#include "apic.h"
|
||||||
#include "bus.h"
|
#include "bus.h"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue