[HALX86] These HalpNo* functions are actually _implemented_. Document their purpose.

Remove the misleading comment in HalpNoBusData().
Update the SAL annotations.
This commit is contained in:
Hermès Bélusca-Maïto 2023-06-22 12:11:37 +02:00
parent 9ba1849a97
commit bd5209d9f4
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 56 additions and 33 deletions

View file

@ -571,13 +571,12 @@ HaliReferenceHandlerForConfigSpace(
ULONG ULONG
NTAPI NTAPI
HalpNoBusData( HalpNoBusData(
IN PBUS_HANDLER BusHandler, _In_ PBUS_HANDLER BusHandler,
IN PBUS_HANDLER RootHandler, _In_ PBUS_HANDLER RootHandler,
IN ULONG SlotNumber, _In_ ULONG SlotNumber,
IN PVOID Buffer, _In_ PVOID Buffer,
IN ULONG Offset, _In_ ULONG Offset,
IN ULONG Length _In_ ULONG Length);
);
ULONG ULONG
NTAPI NTAPI

View file

@ -103,42 +103,66 @@ HalpLookupHandler(IN PARRAY Array,
return Handler; return Handler;
} }
/**
* @brief Handler for buses without configuration space.
**/
ULONG ULONG
NTAPI NTAPI
HalpNoBusData(IN PBUS_HANDLER BusHandler, HalpNoBusData(
IN PBUS_HANDLER RootHandler, _In_ PBUS_HANDLER BusHandler,
IN ULONG SlotNumber, _In_ PBUS_HANDLER RootHandler,
IN PVOID Buffer, _In_ ULONG SlotNumber,
IN ULONG Offset, _In_ PVOID Buffer,
IN ULONG Length) _In_ ULONG Offset,
_In_ ULONG Length)
{ {
/* Not implemented */ DPRINT1("STUB GetSetBusData(Bus %x:%x.%x)\n",
DPRINT1("STUB GetSetBusData\n"); BusHandler->InterfaceType,
BusHandler->ConfigurationType,
BusHandler->BusNumber);
/* Just return a dummy value */
return 0; return 0;
} }
/**
* @brief Handler for buses without configuration space.
**/
NTSTATUS NTSTATUS
NTAPI NTAPI
HalpNoAdjustResourceList(IN PBUS_HANDLER BusHandler, HalpNoAdjustResourceList(
IN PBUS_HANDLER RootHandler, _In_ PBUS_HANDLER BusHandler,
IN OUT PIO_RESOURCE_REQUIREMENTS_LIST *pResourceList) _In_ PBUS_HANDLER RootHandler,
_Inout_ PIO_RESOURCE_REQUIREMENTS_LIST* pResourceList)
{ {
DPRINT1("STUB Adjustment\n"); DPRINT1("STUB Adjustment(Bus %x:%x.%x)\n",
BusHandler->InterfaceType,
BusHandler->ConfigurationType,
BusHandler->BusNumber);
return STATUS_UNSUCCESSFUL; return STATUS_UNSUCCESSFUL;
} }
/**
* @brief Handler for buses without configuration space.
**/
NTSTATUS NTSTATUS
NTAPI NTAPI
HalpNoAssignSlotResources(IN PBUS_HANDLER BusHandler, HalpNoAssignSlotResources(
IN PBUS_HANDLER RootHandler, _In_ PBUS_HANDLER BusHandler,
IN PUNICODE_STRING RegistryPath, _In_ PBUS_HANDLER RootHandler,
IN PUNICODE_STRING DriverClassName OPTIONAL, _In_ PUNICODE_STRING RegistryPath,
IN PDRIVER_OBJECT DriverObject, _In_opt_ PUNICODE_STRING DriverClassName,
IN PDEVICE_OBJECT DeviceObject OPTIONAL, _In_ PDRIVER_OBJECT DriverObject,
IN ULONG SlotNumber, _In_opt_ PDEVICE_OBJECT DeviceObject,
IN OUT PCM_RESOURCE_LIST *AllocatedResources) _In_ ULONG SlotNumber,
_Inout_ PCM_RESOURCE_LIST* AllocatedResources)
{ {
DPRINT1("STUB Assignment\n"); DPRINT1("STUB Assignment(Bus %x:%x.%x)\n",
BusHandler->InterfaceType,
BusHandler->ConfigurationType,
BusHandler->BusNumber);
return STATUS_NOT_SUPPORTED; return STATUS_NOT_SUPPORTED;
} }

View file

@ -104,7 +104,7 @@ NTSTATUS
(NTAPI *PADJUSTRESOURCELIST)( (NTAPI *PADJUSTRESOURCELIST)(
_In_ PBUS_HANDLER BusHandler, _In_ PBUS_HANDLER BusHandler,
_In_ PBUS_HANDLER RootHandler, _In_ PBUS_HANDLER RootHandler,
_Inout_ PIO_RESOURCE_REQUIREMENTS_LIST *Resources _Inout_ PIO_RESOURCE_REQUIREMENTS_LIST* pResourceList
); );
typedef typedef
@ -113,11 +113,11 @@ NTSTATUS
_In_ PBUS_HANDLER BusHandler, _In_ PBUS_HANDLER BusHandler,
_In_ PBUS_HANDLER RootHandler, _In_ PBUS_HANDLER RootHandler,
_In_ PUNICODE_STRING RegistryPath, _In_ PUNICODE_STRING RegistryPath,
_In_ PUNICODE_STRING DriverClassName, _In_opt_ PUNICODE_STRING DriverClassName,
_In_ PDRIVER_OBJECT DriverObject, _In_ PDRIVER_OBJECT DriverObject,
_In_ PDEVICE_OBJECT DeviceObject, _In_opt_ PDEVICE_OBJECT DeviceObject,
_In_ ULONG SlotNumber, _In_ ULONG SlotNumber,
_Inout_ PCM_RESOURCE_LIST *AllocatedResources _Inout_ PCM_RESOURCE_LIST* AllocatedResources
); );
typedef typedef
@ -126,7 +126,7 @@ ULONG
_In_ PBUS_HANDLER BusHandler, _In_ PBUS_HANDLER BusHandler,
_In_ PBUS_HANDLER RootHandler, _In_ PBUS_HANDLER RootHandler,
_In_ ULONG SlotNumber, _In_ ULONG SlotNumber,
_Out_ PVOID Buffer, _In_ PVOID Buffer,
_In_ ULONG Offset, _In_ ULONG Offset,
_In_ ULONG Length _In_ ULONG Length
); );