mirror of
https://github.com/reactos/reactos.git
synced 2024-06-21 13:31:38 +00:00
[VBEMP] Correctly report legacy resources (VGA I/O ports and memory)
CORE-17789
This commit is contained in:
parent
3379de3924
commit
6dd94572e5
|
@ -36,6 +36,13 @@
|
||||||
#define LOWORD(l) ((USHORT)((ULONG_PTR)(l)))
|
#define LOWORD(l) ((USHORT)((ULONG_PTR)(l)))
|
||||||
#define HIWORD(l) ((USHORT)(((ULONG_PTR)(l)>>16)&0xFFFF))
|
#define HIWORD(l) ((USHORT)(((ULONG_PTR)(l)>>16)&0xFFFF))
|
||||||
|
|
||||||
|
VIDEO_ACCESS_RANGE VBEAccessRange[] =
|
||||||
|
{
|
||||||
|
{ {{0x3b0}}, 0x3bb - 0x3b0 + 1, 1, 1, 0 },
|
||||||
|
{ {{0x3c0}}, 0x3df - 0x3c0 + 1, 1, 1, 0 },
|
||||||
|
{ {{0xa0000}}, 0x20000, 0, 1, 0 },
|
||||||
|
};
|
||||||
|
|
||||||
/* PUBLIC AND PRIVATE FUNCTIONS ***********************************************/
|
/* PUBLIC AND PRIVATE FUNCTIONS ***********************************************/
|
||||||
|
|
||||||
ULONG NTAPI
|
ULONG NTAPI
|
||||||
|
@ -53,6 +60,8 @@ DriverEntry(IN PVOID Context1, IN PVOID Context2)
|
||||||
InitData.HwSetPowerState = VBESetPowerState;
|
InitData.HwSetPowerState = VBESetPowerState;
|
||||||
InitData.HwGetVideoChildDescriptor = VBEGetVideoChildDescriptor;
|
InitData.HwGetVideoChildDescriptor = VBEGetVideoChildDescriptor;
|
||||||
InitData.HwDeviceExtensionSize = sizeof(VBE_DEVICE_EXTENSION);
|
InitData.HwDeviceExtensionSize = sizeof(VBE_DEVICE_EXTENSION);
|
||||||
|
InitData.HwLegacyResourceList = VBEAccessRange;
|
||||||
|
InitData.HwLegacyResourceCount = ARRAYSIZE(VBEAccessRange);
|
||||||
|
|
||||||
return VideoPortInitialize(Context1, Context2, &InitData, NULL);
|
return VideoPortInitialize(Context1, Context2, &InitData, NULL);
|
||||||
}
|
}
|
||||||
|
@ -76,8 +85,11 @@ VBEFindAdapter(
|
||||||
if (VideoPortIsNoVesa())
|
if (VideoPortIsNoVesa())
|
||||||
return ERROR_DEV_NOT_EXIST;
|
return ERROR_DEV_NOT_EXIST;
|
||||||
|
|
||||||
ConfigInfo->VdmPhysicalVideoMemoryAddress.QuadPart = 0xa000;
|
if (ConfigInfo->Length < sizeof(VIDEO_PORT_CONFIG_INFO))
|
||||||
ConfigInfo->VdmPhysicalVideoMemoryLength = 0x2000;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
|
ConfigInfo->VdmPhysicalVideoMemoryAddress = VBEAccessRange[2].RangeStart;
|
||||||
|
ConfigInfo->VdmPhysicalVideoMemoryLength = VBEAccessRange[2].RangeLength;
|
||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue