Author: ion Date: Tue Nov 14 23:59:48 2006 New Revision: 24759
URL: http://svn.reactos.org/svn/reactos?rev=24759&view=rev Log: - Delete HAL cruft files. - Implement (or cleanup + mark as implemented, these are 4 line functions) HalDisplayString, HalAcquireDisplayOwnership, HalSetDisplayParameters, HalQueryDisplayParameters, HalInitailizeProcessor, HalAllProcessorsStarted, HalStartNextProcessor, HalProcessorIdle, HalRequestIpi. - Fix some prototype definitions and cleanup some formatting.
Removed: trunk/reactos/hal/halx86/generic/enum.c trunk/reactos/hal/halx86/generic/ipi.c trunk/reactos/hal/halx86/generic/pwroff.c Modified: trunk/reactos/hal/halx86/generic/display.c trunk/reactos/hal/halx86/generic/dma.c trunk/reactos/hal/halx86/generic/drive.c trunk/reactos/hal/halx86/generic/generic.rbuild trunk/reactos/hal/halx86/generic/halinit.c trunk/reactos/hal/halx86/generic/processor.c trunk/reactos/hal/halx86/generic/sysinfo.c trunk/reactos/include/ndk/halfuncs.h
Modified: trunk/reactos/hal/halx86/generic/display.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/display.... ============================================================================== --- trunk/reactos/hal/halx86/generic/display.c (original) +++ trunk/reactos/hal/halx86/generic/display.c Tue Nov 14 23:59:48 2006 @@ -1,20 +1,9 @@ /* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001, 2002 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * PROJECT: ReactOS HA: + * LICENSE: GPL - See COPYING in the top level directory + * FILE: ntoskrnl/hal/halx86/generic/display.c + * PURPOSE: Screen Display Routines, now useless since NT 5.1+ + * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) */
#include <hal.h> @@ -24,45 +13,52 @@
/* PUBLIC FUNCTIONS *********************************************************/
-VOID STDCALL +/* + * @implemented + */ +VOID +NTAPI HalAcquireDisplayOwnership(IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters) -/* - * FUNCTION: - * ARGUMENTS: - * ResetDisplayParameters = Pointer to a driver specific - * reset routine. - */ { + /* Stub since Windows XP implemented Inbv */ + return; }
-VOID STDCALL -HalDisplayString( - IN PCH String) /* - * FUNCTION: Switches the screen to HAL console mode (BSOD) if not there - * already and displays a string - * ARGUMENT: - * string = ASCII string to display - * NOTE: Use with care because there is no support for returning from BSOD - * mode + * @implemented */ +VOID +NTAPI +HalDisplayString(IN PCH String) { - InbvDisplayString(String); + /* Call the Inbv driver */ + InbvDisplayString(String); }
-VOID STDCALL +/* + * @implemented + */ +VOID +NTAPI HalQueryDisplayParameters(OUT PULONG DispSizeX, - OUT PULONG DispSizeY, - OUT PULONG CursorPosX, - OUT PULONG CursorPosY) + OUT PULONG DispSizeY, + OUT PULONG CursorPosX, + OUT PULONG CursorPosY) { + /* Stub since Windows XP implemented Inbv */ + return; }
- -VOID STDCALL +/* + * @implemented + */ +VOID +NTAPI HalSetDisplayParameters(IN ULONG CursorPosX, - IN ULONG CursorPosY) + IN ULONG CursorPosY) { + /* Stub since Windows XP implemented Inbv */ + return; }
/* EOF */
Modified: trunk/reactos/hal/halx86/generic/dma.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/dma.c?re... ============================================================================== --- trunk/reactos/hal/halx86/generic/dma.c (original) +++ trunk/reactos/hal/halx86/generic/dma.c Tue Nov 14 23:59:48 2006 @@ -440,7 +440,7 @@
ZwClose(Handle);
- AdapterObject->DmaHeader.Version = DeviceDescription->Version; + AdapterObject->DmaHeader.Version = (USHORT)DeviceDescription->Version; AdapterObject->DmaHeader.Size = sizeof(ADAPTER_OBJECT); AdapterObject->DmaHeader.DmaOperations = &HalpDmaOperations; AdapterObject->MapRegistersPerChannel = 1; @@ -476,7 +476,7 @@ AdapterBaseVa = (PVOID)FIELD_OFFSET(EISA_CONTROL, DmaController2);
AdapterObject->AdapterNumber = Controller; - AdapterObject->ChannelNumber = DeviceDescription->DmaChannel & 3; + AdapterObject->ChannelNumber = (UCHAR)(DeviceDescription->DmaChannel & 3); AdapterObject->PagePort = (PUCHAR)HalpEisaPortPage[DeviceDescription->DmaChannel]; AdapterObject->Width16Bits = FALSE; AdapterObject->AdapterBaseVa = AdapterBaseVa;
Modified: trunk/reactos/hal/halx86/generic/drive.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/drive.c?... ============================================================================== --- trunk/reactos/hal/halx86/generic/drive.c (original) +++ trunk/reactos/hal/halx86/generic/drive.c Tue Nov 14 23:59:48 2006 @@ -22,10 +22,10 @@ OUT PSTRING NtSystemPathString) { /* Call the kernel */ - return IoAssignDriveLetters(LoaderBlock, - NtDeviceName, - NtSystemPath, - NtSystemPathString); + IoAssignDriveLetters(LoaderBlock, + NtDeviceName, + NtSystemPath, + NtSystemPathString); }
NTSTATUS
Removed: trunk/reactos/hal/halx86/generic/enum.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/enum.c?r... ============================================================================== --- trunk/reactos/hal/halx86/generic/enum.c (original) +++ trunk/reactos/hal/halx86/generic/enum.c (removed) @@ -1,23 +1,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/hal/x86/enum.c - * PURPOSE: Motherboard device enumerator - * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net) - * UPDATE HISTORY: - * Created 01/05/2001 - */ - -/* INCLUDES *****************************************************************/ - -#include <hal.h> -#define NDEBUG -#include <debug.h> - -VOID -HalpStartEnumerator (VOID) -{ -} - -/* EOF */
Modified: trunk/reactos/hal/halx86/generic/generic.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/generic.... ============================================================================== --- trunk/reactos/hal/halx86/generic/generic.rbuild (original) +++ trunk/reactos/hal/halx86/generic/generic.rbuild Tue Nov 14 23:59:48 2006 @@ -8,7 +8,6 @@ <file>bus.c</file> <file>dma.c</file> <file>drive.c</file> - <file>enum.c</file> <file>fmutex.c</file> <file>halinit.c</file> <file>isa.c</file> @@ -30,7 +29,6 @@ <define name="_DISABLE_TIDENTS" /> <define name="_NTHAL_" /> <define name="__USE_W32API" /> - <file>ipi.c</file> <file>irql.c</file> <file>processor.c</file> <file>resource.c</file>
Modified: trunk/reactos/hal/halx86/generic/halinit.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/halinit.... ============================================================================== --- trunk/reactos/hal/halx86/generic/halinit.c (original) +++ trunk/reactos/hal/halx86/generic/halinit.c Tue Nov 14 23:59:48 2006 @@ -45,12 +45,9 @@ /* Initialize the clock interrupt */ //HalpInitPhase1();
- /* Initialize display and make the screen black */ + /* Initialize BUS handlers and DMA */ HalpInitBusHandlers(); HalpInitDma(); - - /* Enumerate the devices on the motherboard */ - HalpStartEnumerator(); } else if (BootPhase == 2) {
Removed: trunk/reactos/hal/halx86/generic/ipi.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/ipi.c?re... ============================================================================== --- trunk/reactos/hal/halx86/generic/ipi.c (original) +++ trunk/reactos/hal/halx86/generic/ipi.c (removed) @@ -1,24 +1,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: hal/halx86/generic/ipi.c - * PURPOSE: Miscellaneous hardware functions - * PROGRAMMER: Eric Kohl (ekohl@rz-online.de) - */ - -/* INCLUDES *****************************************************************/ - -#include <hal.h> -#define NDEBUG -#include <debug.h> - -/* FUNCTIONS ****************************************************************/ - -VOID STDCALL -HalRequestIpi(ULONG ProcessorNo) -{ - DPRINT("HalRequestIpi(ProcessorNo %lu)\n", ProcessorNo); -} - -/* EOF */
Modified: trunk/reactos/hal/halx86/generic/processor.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/processo... ============================================================================== --- trunk/reactos/hal/halx86/generic/processor.c (original) +++ trunk/reactos/hal/halx86/generic/processor.c Tue Nov 14 23:59:48 2006 @@ -20,6 +20,9 @@
/* FUNCTIONS *****************************************************************/
+/* + * @implemented + */ VOID NTAPI HalInitializeProcessor(IN ULONG ProcessorNumber, @@ -30,29 +33,49 @@ KeGetPcr()->StallScaleFactor = INITIAL_STALL_COUNT; }
-BOOLEAN STDCALL -HalAllProcessorsStarted (VOID) +/* + * @implemented + */ +BOOLEAN +NTAPI +HalAllProcessorsStarted(VOID) { - DPRINT("HalAllProcessorsStarted()\n"); - - return TRUE; + /* Do nothing */ + return TRUE; }
-BOOLEAN STDCALL -HalStartNextProcessor(ULONG Unknown1, - ULONG ProcessorStack) +/* + * @implemented + */ +BOOLEAN +NTAPI +HalStartNextProcessor(IN PLOADER_PARAMETER_BLOCK LoaderBlock, + IN PKPROCESSOR_STATE ProcessorState) { - DPRINT("HalStartNextProcessor(0x%lx 0x%lx)\n", Unknown1, ProcessorStack); - - return TRUE; + /* Ready to start */ + return FALSE; }
+/* + * @implemented + */ VOID NTAPI HalProcessorIdle(VOID) { - Ki386EnableInterrupts(); + _enable(); Ki386HaltProcessor(); }
+/* + * @implemented + */ +VOID +NTAPI +HalRequestIpi(ULONG Reserved) +{ + /* Not implemented on NT */ + __debugbreak(); +} + /* EOF */
Removed: trunk/reactos/hal/halx86/generic/pwroff.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/pwroff.c... ============================================================================== --- trunk/reactos/hal/halx86/generic/pwroff.c (original) +++ trunk/reactos/hal/halx86/generic/pwroff.c (removed) @@ -1,121 +1,0 @@ -/* $Id$ - * - * FILE : reactos/hal/x86/apm.c - * DESCRIPTION: Turn CPU off... - * PROJECT : ReactOS Operating System - * AUTHOR : D. Lindauer (July 11 1997) - * NOTE : This program is public domain - * REVISIONS : - * 1999-12-26 - */ - -#define APM_FUNCTION_AVAILABLE 0x5300 -#define APM_FUNCTION_CONNREAL 0x5301 -#define APM_FUNCTION_POWEROFF 0x5307 -#define APM_FUNCTION_ENABLECPU 0x530d -#define APM_FUNCTION_ENABLEAPM 0x530e - -#define APM_DEVICE_BIOS 0 -#define APM_DEVICE_ALL 1 - -#define APM_MODE_DISABLE 0 -#define APM_MODE_ENABLE 1 - - - -#if defined(__GNUC__) - -nopm db 'No power management functionality',10,13,'$' -errmsg db 'Power management error',10,13,'$' -wrongver db 'Need APM version 1.1 or better',10,13,'$' -; -; Entry point -; -go: - mov dx,offset nopm - jc error - cmp ax,101h ; See if version 1.1 or greater - mov dx,offset wrongver - jc error - - mov [ver],ax - mov ax,5301h ; Do a real mode connection - mov bx,0 ; device = BIOS - int 15h - jnc noconerr - - cmp ah,2 ; Pass if already connected - mov dx,offset errmsg ; else error - jnz error -noconerr: - mov ax,530eh ; Enable latest version of APM - mov bx,0 ; device = BIOS - mov cx,[ver] ; version - int 15h - mov dx,offset errmsg - jc error - - mov ax,530dh ; Now engage and enable CPU management - mov bx,1 ; device = all - mov cx,1 ; enable - int 15h - mov dx,offset errmsg - jc error - - mov ax,530fh - mov bx,1 ; device = ALL - mov cx,1 ; enable - int 15h - mov dx,offset errmsg - jc error - - mov dx,offset errmsg -error: - call print - mov ax,4c01h - int 21h - int 3 - end start - - -BOOLEAN -ApmCall ( - DWORD Function, - DWORD Device, - DWORD Mode - ) -{ - /* AX <== Function */ - /* BX <== Device */ - /* CX <== Mode */ - __asm__("int 21\n"); /* 0x15 */ -} - -#elif defined(_MSC_VER) -#else -#error Unknown compiler for inline assembler -#endif - - -BOOLEAN -HalPowerOff (VOID) -{ - ApmCall ( - APM_FUNCTION_AVAILABLE, - APM_DEVICE_BIOS, - 0 - ); - ApmCall ( - APM_FUNCTION_ENABLEAPM, - ); - /* Shutdown CPU */ - ApmCall ( - APM_FUNCTION_POWEROFF, - APM_DEVICE_ALL, - 3 - ); - return TRUE; -} - - -/* EOF */
Modified: trunk/reactos/hal/halx86/generic/sysinfo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/sysinfo.... ============================================================================== --- trunk/reactos/hal/halx86/generic/sysinfo.c (original) +++ trunk/reactos/hal/halx86/generic/sysinfo.c Tue Nov 14 23:59:48 2006 @@ -1,12 +1,10 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/hal/x86/sysinfo.c - * PURPOSE: Getting system information - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 - */ +* PROJECT: ReactOS HA: +* LICENSE: GPL - See COPYING in the top level directory +* FILE: ntoskrnl/hal/halx86/generic/sysinfo.c +* PURPOSE: HAL Information Routines +* PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) +*/
/* INCLUDES *****************************************************************/
@@ -14,61 +12,27 @@ #define NDEBUG #include <debug.h>
+/* FUNCTIONS *****************************************************************/
- -/* FUNCTIONS ****************************************************************/ - -NTSTATUS STDCALL +NTSTATUS +NTAPI HalpQuerySystemInformation(IN HAL_QUERY_INFORMATION_CLASS InformationClass, - IN ULONG BufferSize, - IN OUT PVOID Buffer, - OUT PULONG ReturnedLength) + IN ULONG BufferSize, + IN OUT PVOID Buffer, + OUT PULONG ReturnedLength) { - ULONG DataLength; - NTSTATUS Status; - - DPRINT1("HalpQuerySystemInformation() called\n"); - - *ReturnedLength = 0; - - DataLength = 0; - - switch(InformationClass) - { -#if 0 - case HalInstalledBusInformation: - Status = HalpQueryBusInformation(BufferSize, - Buffer, - ReturnedLength); - break; -#endif - - default: - DataLength = 0; - Status = STATUS_INVALID_LEVEL; - break; - } - - if (DataLength != 0) - { - if (DataLength > BufferSize) - DataLength = BufferSize; - -// RtlCopyMemory(); - - *ReturnedLength = DataLength; - } - - return(Status); + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; }
- -#if 0 NTSTATUS -HalpSetSystemInformation(VOID) +NTAPI +HalpSetSystemInformation(IN HAL_QUERY_INFORMATION_CLASS InformationClass, + IN ULONG BufferSize, + IN OUT PVOID Buffer) { - UNIMPLEMENTED; + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } -#endif
/* EOF */
Modified: trunk/reactos/include/ndk/halfuncs.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/halfuncs.h?rev=... ============================================================================== --- trunk/reactos/include/ndk/halfuncs.h (original) +++ trunk/reactos/include/ndk/halfuncs.h Tue Nov 14 23:59:48 2006 @@ -96,6 +96,15 @@ ULONG BootPhase, struct _LOADER_PARAMETER_BLOCK *LoaderBlock ); + +NTHALAPI +BOOLEAN +NTAPI +HalStartNextProcessor( + struct _LOADER_PARAMETER_BLOCK *LoaderBlock, + IN PKPROCESSOR_STATE ProcessorState +); + #endif
NTHALAPI @@ -103,14 +112,6 @@ NTAPI HalReturnToFirmware( FIRMWARE_REENTRY Action -); - -NTHALAPI -BOOLEAN -NTAPI -HalStartNextProcessor( - ULONG Unknown1, - ULONG Unknown2 );
//