mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[STORPORT] Implement StorPortGetUncachedExtension().
CORE-13866
This commit is contained in:
parent
8eb66fa1b6
commit
45cc5c0e37
3 changed files with 42 additions and 6 deletions
|
@ -87,8 +87,8 @@ PCI\VEN_104B&CC_0100 = buslogic
|
|||
PCI\CC_0101 = pciide
|
||||
PCI\CC_0104 = uniata
|
||||
PCI\CC_0105 = uniata
|
||||
PCI\CC_0106 = uniata
|
||||
;PCI\CC_0106 = storahci
|
||||
;PCI\CC_0106 = uniata
|
||||
PCI\CC_0106 = storahci
|
||||
*PNP0600 = uniata
|
||||
;USB\CLASS_09 = usbhub
|
||||
USB\ROOT_HUB = usbhub
|
||||
|
|
|
@ -97,6 +97,10 @@ typedef struct _FDO_DEVICE_EXTENSION
|
|||
BUS_INTERFACE_STANDARD BusInterface;
|
||||
BOOLEAN BusInitialized;
|
||||
PMAPPED_ADDRESS MappedAddressList;
|
||||
|
||||
PVOID UncachedExtensionBase;
|
||||
ULONG UncachedExtensionSize;
|
||||
|
||||
} FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION;
|
||||
|
||||
|
||||
|
|
|
@ -607,7 +607,6 @@ StorPortGetDeviceBase(
|
|||
_In_ BOOLEAN InIoSpace)
|
||||
{
|
||||
PMINIPORT_DEVICE_EXTENSION MiniportExtension;
|
||||
|
||||
PHYSICAL_ADDRESS TranslatedAddress;
|
||||
PVOID MappedAddress;
|
||||
NTSTATUS Status;
|
||||
|
@ -743,7 +742,7 @@ StorPortGetSrb(
|
|||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
STORPORT_API
|
||||
PVOID
|
||||
|
@ -753,10 +752,43 @@ StorPortGetUncachedExtension(
|
|||
_In_ PPORT_CONFIGURATION_INFORMATION ConfigInfo,
|
||||
_In_ ULONG NumberOfBytes)
|
||||
{
|
||||
PMINIPORT_DEVICE_EXTENSION MiniportExtension;
|
||||
PFDO_DEVICE_EXTENSION DeviceExtension;
|
||||
PHYSICAL_ADDRESS LowestAddress, HighestAddress, Alignment;
|
||||
|
||||
DPRINT1("StorPortGetUncachedExtension(%p %p %lu)\n",
|
||||
HwDeviceExtension, ConfigInfo, NumberOfBytes);
|
||||
UNIMPLEMENTED;
|
||||
return NULL;
|
||||
|
||||
/* Get the miniport extension */
|
||||
MiniportExtension = CONTAINING_RECORD(HwDeviceExtension,
|
||||
MINIPORT_DEVICE_EXTENSION,
|
||||
HwDeviceExtension);
|
||||
DPRINT1("HwDeviceExtension %p MiniportExtension %p\n",
|
||||
HwDeviceExtension, MiniportExtension);
|
||||
|
||||
DeviceExtension = MiniportExtension->Miniport->DeviceExtension;
|
||||
|
||||
/* Return the uncached extension base address if we already have one */
|
||||
if (DeviceExtension->UncachedExtensionBase != NULL)
|
||||
return DeviceExtension->UncachedExtensionBase;
|
||||
|
||||
// FIXME: Set DMA stuff here?
|
||||
|
||||
/* Allocate the uncached extension */
|
||||
Alignment.QuadPart = 0;
|
||||
LowestAddress.QuadPart = 0;
|
||||
HighestAddress.QuadPart = 0x00000000FFFFFFFF;
|
||||
DeviceExtension->UncachedExtensionBase = MmAllocateContiguousMemorySpecifyCache(NumberOfBytes,
|
||||
LowestAddress,
|
||||
HighestAddress,
|
||||
Alignment,
|
||||
MmCached);
|
||||
if (DeviceExtension->UncachedExtensionBase == NULL)
|
||||
return NULL;
|
||||
|
||||
DeviceExtension->UncachedExtensionSize = NumberOfBytes;
|
||||
|
||||
return DeviceExtension->UncachedExtensionBase;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue