[ros-diffs] [mnordell] 29656: Feeble attempt at getting NT4 vga.sys working by implementing HalFrameBufferCachingInformation case for HaliQuerySystemInformation.

mnordell at svn.reactos.org mnordell at svn.reactos.org
Thu Oct 18 10:00:59 CEST 2007


Author: mnordell
Date: Thu Oct 18 12:00:59 2007
New Revision: 29656

URL: http://svn.reactos.org/svn/reactos?rev=29656&view=rev
Log:
Feeble attempt at getting NT4 vga.sys working by implementing HalFrameBufferCachingInformation case for HaliQuerySystemInformation.

Modified:
    trunk/reactos/hal/halx86/generic/sysinfo.c

Modified: trunk/reactos/hal/halx86/generic/sysinfo.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/sysinfo.c?rev=29656&r1=29655&r2=29656&view=diff
==============================================================================
--- trunk/reactos/hal/halx86/generic/sysinfo.c (original)
+++ trunk/reactos/hal/halx86/generic/sysinfo.c Thu Oct 18 12:00:59 2007
@@ -23,13 +23,54 @@
 
 NTSTATUS
 NTAPI
-HaliQuerySystemInformation(IN HAL_QUERY_INFORMATION_CLASS InformationClass,
-                           IN ULONG BufferSize,
-                           IN OUT PVOID Buffer,
-                           OUT PULONG ReturnedLength)
+HaliQuerySystemInformation(IN     HAL_QUERY_INFORMATION_CLASS InformationClass,
+                           IN     ULONG  BufferSize,
+                           IN OUT PVOID  Buffer,
+                              OUT PULONG ReturnedLength)
 {
-    UNIMPLEMENTED;
-    return STATUS_NOT_IMPLEMENTED;
+#define REPORT_THIS_CASE(X) case X: DPRINT1("Unhandled case: %s\n", #X); break
+	switch (InformationClass)
+	{
+		REPORT_THIS_CASE(HalInstalledBusInformation);
+		REPORT_THIS_CASE(HalProfileSourceInformation);
+		REPORT_THIS_CASE(HalInformationClassUnused1);
+		REPORT_THIS_CASE(HalPowerInformation);
+		REPORT_THIS_CASE(HalProcessorSpeedInformation);
+		REPORT_THIS_CASE(HalCallbackInformation);
+		REPORT_THIS_CASE(HalMapRegisterInformation);
+		REPORT_THIS_CASE(HalMcaLogInformation);
+		case HalFrameBufferCachingInformation:
+		if (BufferSize >= 1)
+		{
+			// The only caller that has been seen calling this function told
+			// us it expected a single byte back. We therefore guess it expects
+			// a BOOLEAN, and we dream up the value TRUE to (we think) tell it
+			// "Sure, the framebuffer is cached".
+			DPRINT("%s: caller expects %u bytes (should be 1)\n", "HalFrameBufferCachingInformation", BufferSize);
+			BOOLEAN ToReturn = TRUE;
+			ASSERT(sizeof(BOOLEAN) == 1);
+			*ReturnedLength = sizeof(BOOLEAN);
+			RtlCopyMemory(Buffer, &ToReturn, sizeof(BOOLEAN));
+			return STATUS_SUCCESS;
+		}
+		break;
+		REPORT_THIS_CASE(HalDisplayBiosInformation);
+		REPORT_THIS_CASE(HalProcessorFeatureInformation);
+		REPORT_THIS_CASE(HalNumaTopologyInterface);
+		REPORT_THIS_CASE(HalErrorInformation);
+		REPORT_THIS_CASE(HalCmcLogInformation);
+		REPORT_THIS_CASE(HalCpeLogInformation);
+		REPORT_THIS_CASE(HalQueryMcaInterface);
+		REPORT_THIS_CASE(HalQueryAMLIIllegalIOPortAddresses);
+		REPORT_THIS_CASE(HalQueryMaxHotPlugMemoryAddress);
+		REPORT_THIS_CASE(HalPartitionIpiInterface);
+		REPORT_THIS_CASE(HalPlatformInformation);
+		REPORT_THIS_CASE(HalQueryProfileSourceList);
+	}
+#undef REPORT_THIS_CASE
+
+	UNIMPLEMENTED;
+	return STATUS_NOT_IMPLEMENTED;
 }
 
 NTSTATUS




More information about the Ros-diffs mailing list