Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkFire01 committed Dec 2, 2023
1 parent afec226 commit be7b9d0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
3 changes: 3 additions & 0 deletions boot/freeldr/freeldr/arch/uefi/uefihw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,9 @@ UefiHwDetect(
DetectAcpiBios(SystemKey, &BusNumber);
DetectInternal(SystemKey, &BusNumber);

DetectPci(SystemKey, &BusNumber);
// DetectAcpiBios(SystemKey, &BusNumber);
DetectIsaBios(SystemKey, &BusNumber);
TRACE("DetectHardware() Done\n");
return SystemKey;
}
15 changes: 5 additions & 10 deletions sdk/include/reactos/drivers/bootvid/framebuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include <ndk/kefuncs.h>
#endif

#include <ndk/halfuncs.h>

//#include <drivers/bootvid/framebuf.h> // FIXME: Include?
#include <drivers/videoprt/vpcfgcnv.h>

Expand Down Expand Up @@ -573,6 +575,7 @@ pEnumDisplayControllerCallback(
#define GetDeviceInfoLength(info) \
((info) ? (info)->DataLength : 0)

NTSTATUS Status;
PDISPLAY_CONTEXT DisplayContext = Context;
PKEY_VALUE_FULL_INFORMATION* DeviceInformation;
PWCHAR Identifier;
Expand Down Expand Up @@ -647,14 +650,6 @@ pEnumDisplayControllerCallback(
DisplayContext->VideoConfigData,
GET_LEGACY_DATA(ConfigurationData),
GET_LEGACY_DATA_LEN(ConfigurationDataLength));
if (!NT_SUCCESS(Status) ||
(*DisplayContext->BaseAddress.QuadPart == 0) ||
(*DisplayContext->BufferSize == 0))
{
/* Fail if no framebuffer was provided */
DPRINT1("No framebuffer found!\n");
return STATUS_DEVICE_DOES_NOT_EXIST;
}

DisplayContext->Interface = BusType;
DisplayContext->BusNumber = BusNumber;
Expand Down Expand Up @@ -741,7 +736,7 @@ FindBootDisplayFromCachedConfigTree(
/* Find the first DisplayController available on any bus in the system */
DisplayContext.DeviceType = ControllerType;
DisplayContext.VideoConfigData = VideoConfigData;
for (InterfaceType = 0; InterfaceType < MaximumInterfaceType, ++InterfaceType)
for (InterfaceType = 0; InterfaceType < MaximumInterfaceType; ++InterfaceType)
{
Status = IoQueryDeviceDescription(&InterfaceType,
NULL,
Expand Down Expand Up @@ -926,7 +921,7 @@ FindBootDisplay(
* It allows context passing for the underlying HalFindBusAddressTranslation
* between different calls of the function.
**/
#if 0
#if 1
typedef BOOLEAN
(NTAPI *pHalFindBusAddressTranslation)(
_In_ PHYSICAL_ADDRESS BusAddress,
Expand Down
40 changes: 21 additions & 19 deletions win32ss/drivers/miniport/genfbvmp/genfbvmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,17 +390,17 @@ GenFbGetDeviceDataCallback(
}

/* Pre-initialize VideoConfigData */
VideoPortZeroMemory(&DeviceExtension->VideoConfigData,
sizeof(DeviceExtension->VideoConfigData));
VideoPortZeroMemory(&DeviceExtension->DisplayInfo.VideoConfigData,
sizeof(DeviceExtension->DisplayInfo.VideoConfigData));

Status = GetFramebufferVideoData(&DeviceExtension->FrameBufData.BaseAddress,
&DeviceExtension->FrameBufData.BufferSize,
&DeviceExtension->VideoConfigData,
Status = GetFramebufferVideoData(&DeviceExtension->DisplayInfo.BaseAddress,
&DeviceExtension->DisplayInfo.BufferSize,
&DeviceExtension->DisplayInfo.VideoConfigData,
GET_LEGACY_DATA(ConfigurationData),
GET_LEGACY_DATA_LEN(ConfigurationDataLength));
if (!NT_SUCCESS(Status) ||
(DeviceExtension->FrameBufData.BaseAddress.QuadPart == 0) ||
(DeviceExtension->FrameBufData.BufferSize == 0))
(DeviceExtension->DisplayInfo.BaseAddress.QuadPart == 0) ||
(DeviceExtension->DisplayInfo.BufferSize == 0))
{
/* Fail if no framebuffer was provided */
DPRINT1("No framebuffer found!\n");
Expand All @@ -422,8 +422,8 @@ GenFbGetDeviceDataCallback(
// ConfigData->ControlBase/Size and ConfigData->CursorBase/Size
// memory ports, or any other resource we get,
// besides setting up the framebuffer?
accessRanges[0].RangeStart = DeviceExtension->FrameBufData.BaseAddress;
accessRanges[0].RangeLength = DeviceExtension->FrameBufData.BufferSize;
accessRanges[0].RangeStart = DeviceExtension->DisplayInfo.BaseAddress;
accessRanges[0].RangeLength = DeviceExtension->DisplayInfo.BufferSize;
accessRanges[0].RangeInIoSpace = VIDEO_MEMORY_SPACE_MEMORY;
accessRanges[0].RangeVisible = FALSE;
accessRanges[0].RangeShareable = FALSE;
Expand All @@ -446,12 +446,12 @@ GenFbGetDeviceDataCallback(

/* Map the video memory into the system virtual
* address space so we can clear it out. */
DeviceExtension->FrameAddress =
DeviceExtension->DisplayInfo.FrameAddress =
VideoPortGetDeviceBase(DeviceExtension,
accessRanges[0].RangeStart, // Frame
accessRanges[0].RangeLength,
accessRanges[0].RangeInIoSpace);
if (!DeviceExtension->FrameAddress)
if (!DeviceExtension->DisplayInfo.FrameAddress)
{
/* We failed, release the acquired resources and bail out */
VideoPortVerifyAccessRanges(HwDeviceExtension, 0, NULL);
Expand All @@ -460,7 +460,7 @@ GenFbGetDeviceDataCallback(

DPRINT1("GenFbVmpFindAdapter: Mapped framebuffer 0x%I64x to 0x%p - size %lu\n",
accessRanges[0].RangeStart,
DeviceExtension->FrameAddress,
DeviceExtension->DisplayInfo.FrameAddress,
accessRanges[0].RangeLength);

return NO_ERROR;
Expand All @@ -486,12 +486,12 @@ GenFbGetDeviceDataCallback(
}

/* Pre-initialize MonitorConfigData */
VideoPortZeroMemory(&DeviceExtension->MonitorConfigData,
sizeof(DeviceExtension->MonitorConfigData));
VideoPortZeroMemory(&DeviceExtension->DisplayInfo.MonitorConfigData,
sizeof(DeviceExtension->DisplayInfo.MonitorConfigData));

/* Retrieve optional monitor configuration data;
* ignore any error if it does not exist. */
GetFramebufferMonitorData(&DeviceExtension->MonitorConfigData,
GetFramebufferMonitorData(&DeviceExtension->DisplayInfo.MonitorConfigData,
GET_LEGACY_DATA(ConfigurationData),
GET_LEGACY_DATA_LEN(ConfigurationDataLength));

Expand Down Expand Up @@ -540,7 +540,9 @@ GenFbVmpFindAdapter(
* Retrieve any configuration data for the display controller and monitor.
*/

VideoPortZeroMemory(FrameBufData, sizeof(*FrameBufData));
//GENFB_DISPLAY_INFO DisplayInfo;

// VideoPortZeroMemory(FrameBufData, sizeof(*FrameBufData));

/* Enumerate and find the boot-time console display controller */
// ControllerClass, DisplayController
Expand Down Expand Up @@ -605,7 +607,7 @@ GenFbVmpFindAdapter(
sizeof(AdapterDacType));

/* Video Memory in *MB* */
VRamInMB = FrameBufData->BufferSize / (1024 * 1024);
VRamInMB = DeviceExtension->DisplayInfo.BufferSize / (1024 * 1024);
VideoPortSetRegistryParameters(HwDeviceExtension,
L"HardwareInformation.MemorySize",
&VRamInMB,
Expand Down Expand Up @@ -641,8 +643,8 @@ GenFbVmpInitialize(
DPRINT1("GenFbVmpInitialize(%p)\n", HwDeviceExtension);

/* Zero the frame buffer */
VideoPortZeroDeviceMemory(DeviceExtension->FrameAddress,
DeviceExtension->FrameBufData.BufferSize);
VideoPortZeroDeviceMemory(DeviceExtension->DisplayInfo.FrameAddress,
DeviceExtension->DisplayInfo.BufferSize);

return TRUE;
}
Expand Down

0 comments on commit be7b9d0

Please sign in to comment.