mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[VBEMP] Correctly report legacy resources (VGA I/O ports and memory)
CORE-17789
This commit is contained in:
parent
3379de3924
commit
6dd94572e5
1 changed files with 14 additions and 2 deletions
|
@ -36,6 +36,13 @@
|
|||
#define LOWORD(l) ((USHORT)((ULONG_PTR)(l)))
|
||||
#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 ***********************************************/
|
||||
|
||||
ULONG NTAPI
|
||||
|
@ -53,6 +60,8 @@ DriverEntry(IN PVOID Context1, IN PVOID Context2)
|
|||
InitData.HwSetPowerState = VBESetPowerState;
|
||||
InitData.HwGetVideoChildDescriptor = VBEGetVideoChildDescriptor;
|
||||
InitData.HwDeviceExtensionSize = sizeof(VBE_DEVICE_EXTENSION);
|
||||
InitData.HwLegacyResourceList = VBEAccessRange;
|
||||
InitData.HwLegacyResourceCount = ARRAYSIZE(VBEAccessRange);
|
||||
|
||||
return VideoPortInitialize(Context1, Context2, &InitData, NULL);
|
||||
}
|
||||
|
@ -76,8 +85,11 @@ VBEFindAdapter(
|
|||
if (VideoPortIsNoVesa())
|
||||
return ERROR_DEV_NOT_EXIST;
|
||||
|
||||
ConfigInfo->VdmPhysicalVideoMemoryAddress.QuadPart = 0xa000;
|
||||
ConfigInfo->VdmPhysicalVideoMemoryLength = 0x2000;
|
||||
if (ConfigInfo->Length < sizeof(VIDEO_PORT_CONFIG_INFO))
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
ConfigInfo->VdmPhysicalVideoMemoryAddress = VBEAccessRange[2].RangeStart;
|
||||
ConfigInfo->VdmPhysicalVideoMemoryLength = VBEAccessRange[2].RangeLength;
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue