Code clean-up.

svn path=/trunk/; revision=11510
This commit is contained in:
Eric Kohl 2004-10-31 19:46:10 +00:00
parent 9bb9d462ba
commit 8c1d092798
10 changed files with 611 additions and 643 deletions

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: display.c,v 1.17 2004/10/31 15:56:20 navaraf Exp $ /* $Id: display.c,v 1.18 2004/10/31 19:45:16 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -179,7 +179,7 @@ static ULONG SizeY = 25;
static BOOLEAN DisplayInitialized = FALSE; static BOOLEAN DisplayInitialized = FALSE;
static BOOLEAN HalOwnsDisplay = TRUE; static BOOLEAN HalOwnsDisplay = TRUE;
static WORD *VideoBuffer = NULL; static PUSHORT VideoBuffer = NULL;
static PUCHAR GraphVideoBuffer = NULL; static PUCHAR GraphVideoBuffer = NULL;
static PHAL_RESET_DISPLAY_PARAMETERS HalResetDisplayParameters = NULL; static PHAL_RESET_DISPLAY_PARAMETERS HalResetDisplayParameters = NULL;
@ -191,7 +191,7 @@ static UCHAR SavedTextAcReg[VGA_AC_NUM_REGISTERS];
static UCHAR SavedTextGcReg[VGA_GC_NUM_REGISTERS]; static UCHAR SavedTextGcReg[VGA_GC_NUM_REGISTERS];
static UCHAR SavedTextSeqReg[VGA_SEQ_NUM_REGISTERS]; static UCHAR SavedTextSeqReg[VGA_SEQ_NUM_REGISTERS];
static UCHAR SavedTextFont[2][FONT_AMOUNT]; static UCHAR SavedTextFont[2][FONT_AMOUNT];
static BOOL TextPaletteEnabled = FALSE; static BOOLEAN TextPaletteEnabled = FALSE;
/* PRIVATE FUNCTIONS *********************************************************/ /* PRIVATE FUNCTIONS *********************************************************/
@ -214,7 +214,7 @@ HalClearDisplay (UCHAR CharAttribute)
VOID STATIC VOID STATIC
HalScrollDisplay (VOID) HalScrollDisplay (VOID)
{ {
WORD *ptr; PUSHORT ptr;
int i; int i;
ptr = VideoBuffer + SizeX; ptr = VideoBuffer + SizeX;
@ -232,7 +232,7 @@ HalScrollDisplay (VOID)
VOID STATIC FASTCALL VOID STATIC FASTCALL
HalPutCharacter (CHAR Character) HalPutCharacter (CHAR Character)
{ {
WORD *ptr; PUSHORT ptr;
ptr = VideoBuffer + ((CursorY * SizeX) + CursorX); ptr = VideoBuffer + ((CursorY * SizeX) + CursorX);
*ptr = (CHAR_ATTRIBUTE << 8) + Character; *ptr = (CHAR_ATTRIBUTE << 8) + Character;
@ -329,7 +329,7 @@ HalReadCrtc(ULONG Index)
} }
VOID STATIC FASTCALL VOID STATIC FASTCALL
HalResetSeq(BOOL Start) HalResetSeq(BOOLEAN Start)
{ {
if (Start) if (Start)
{ {
@ -342,7 +342,7 @@ HalResetSeq(BOOL Start)
} }
VOID STATIC FASTCALL VOID STATIC FASTCALL
HalBlankScreen(BOOL On) HalBlankScreen(BOOLEAN On)
{ {
UCHAR Scrn; UCHAR Scrn;
@ -577,7 +577,7 @@ HalInitializeDisplay (PLOADER_PARAMETER_BLOCK LoaderBlock)
ULONG ScanLines; ULONG ScanLines;
ULONG Data; ULONG Data;
VideoBuffer = (WORD *)(0xff3b8000); VideoBuffer = (PUSHORT)(0xff3b8000);
GraphVideoBuffer = (PUCHAR)(0xff3a0000); GraphVideoBuffer = (PUCHAR)(0xff3a0000);
/* Set cursor position */ /* Set cursor position */
@ -620,7 +620,7 @@ HalInitializeDisplay (PLOADER_PARAMETER_BLOCK LoaderBlock)
/* PUBLIC FUNCTIONS *********************************************************/ /* PUBLIC FUNCTIONS *********************************************************/
VOID STDCALL VOID STDCALL
HalReleaseDisplayOwnership() HalReleaseDisplayOwnership(VOID)
/* /*
* FUNCTION: Release ownership of display back to HAL * FUNCTION: Release ownership of display back to HAL
*/ */
@ -675,7 +675,7 @@ HalDisplayString(IN PCH String)
ULONG Flags; ULONG Flags;
/* See comment at top of file */ /* See comment at top of file */
if (! HalOwnsDisplay) if (!HalOwnsDisplay)
{ {
return; return;
} }
@ -780,10 +780,11 @@ HalSetDisplayParameters(IN ULONG CursorPosX,
CursorY = (CursorPosY < SizeY) ? CursorPosY : SizeY - 1; CursorY = (CursorPosY < SizeY) ? CursorPosY : SizeY - 1;
} }
BOOLEAN STDCALL BOOLEAN STDCALL
HalQueryDisplayOwnership() HalQueryDisplayOwnership(VOID)
{ {
return ! HalOwnsDisplay; return !HalOwnsDisplay;
} }
/* EOF */ /* EOF */

View file

@ -5,15 +5,6 @@
#ifndef __INTERNAL_HAL_HAL_H #ifndef __INTERNAL_HAL_HAL_H
#define __INTERNAL_HAL_HAL_H #define __INTERNAL_HAL_HAL_H
/*
* FUNCTION: Probes for a BIOS32 extension
*/
VOID Hal_bios32_probe(VOID);
/*
* FUNCTION: Determines if a a bios32 service is present
*/
BOOLEAN Hal_bios32_is_service_present(ULONG service);
/* display.c */ /* display.c */
VOID FASTCALL HalInitializeDisplay (PLOADER_PARAMETER_BLOCK LoaderBlock); VOID FASTCALL HalInitializeDisplay (PLOADER_PARAMETER_BLOCK LoaderBlock);

View file

@ -1,4 +1,4 @@
/* $Id: misc.c,v 1.5 2004/07/20 21:25:36 hbirr Exp $ /* $Id: misc.c,v 1.6 2004/10/31 19:45:16 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -15,7 +15,7 @@
/* FUNCTIONS ****************************************************************/ /* FUNCTIONS ****************************************************************/
VOID STDCALL VOID STDCALL
HalHandleNMI (ULONG Unused) HalHandleNMI(ULONG Unused)
{ {
UCHAR ucStatus; UCHAR ucStatus;
@ -34,25 +34,26 @@ HalHandleNMI (ULONG Unused)
KeEnterKernelDebugger (); KeEnterKernelDebugger ();
} }
VOID STDCALL VOID STDCALL
HalProcessorIdle (VOID) HalProcessorIdle(VOID)
{ {
#if 1 #if 1
Ki386EnableInterrupts(); Ki386EnableInterrupts();
Ki386HaltProcessor(); Ki386HaltProcessor();
#else #else
#endif #endif
} }
VOID STDCALL VOID STDCALL
HalRequestIpi(ULONG Unknown) HalRequestIpi(ULONG Unknown)
{ {
return; return;
} }
ULONG FASTCALL ULONG FASTCALL
HalSystemVectorDispatchEntry ( HalSystemVectorDispatchEntry (
ULONG Unknown1, ULONG Unknown1,
@ -63,43 +64,24 @@ HalSystemVectorDispatchEntry (
return 0; return 0;
} }
VOID STDCALL VOID STDCALL
KeFlushWriteBuffer ( KeFlushWriteBuffer(VOID)
VOID
)
{ {
return; return;
} }
VOID STDCALL VOID STDCALL
HalReportResourceUsage ( HalReportResourceUsage(VOID)
VOID
)
{ {
/* /*
* FIXME: Report all resources used by hal. * FIXME: Report all resources used by hal.
* Calls IoReportHalResourceUsage() * Calls IoReportHalResourceUsage()
*/ */
/* /* Initialize PCI bus. */
* Initialize PCI bus.
*/
HalpInitPciBus (); HalpInitPciBus ();
#if 0
/*
* Initialize IsaPnP bus.
*/
HalpInitIsaPnpBus ();
/*
* Initialize other busses???
*/
/*
* Probe for a BIOS32 extension
*/
Hal_bios32_probe();
#endif
return; return;
} }

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: bthread.S,v 1.9 2003/06/16 19:18:48 hbirr Exp $ /* $Id: bthread.S,v 1.10 2004/10/31 19:46:10 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -156,4 +156,3 @@ _PsBeginThreadWithContextInternal:
/* Load the rest of the thread's user mode context. */ /* Load the rest of the thread's user mode context. */
movl $0, %eax movl $0, %eax
jmp KeReturnFromSystemCallWithHook jmp KeReturnFromSystemCallWithHook

View file

@ -464,4 +464,3 @@ _irq_handler_15:
popl %ds popl %ds
popa popa
iret iret

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: syscall.S,v 1.17 2004/08/21 21:13:45 tamlin Exp $ /* $Id: syscall.S,v 1.18 2004/10/31 19:46:10 ekohl Exp $
* *
* FILE: ntoskrnl/ke/i386/syscall.S * FILE: ntoskrnl/ke/i386/syscall.S
* PURPOSE: 2E trap handler * PURPOSE: 2E trap handler
@ -199,8 +199,10 @@ new_useShadowTable:
new_shadowServiceInRange: new_shadowServiceInRange:
#ifdef DBG #ifdef DBG
/* GDB thinks the function starts here and /*
wants a standard prolog, so let's give it */ * GDB thinks the function starts here and
* wants a standard prolog, so let's give it
*/
pushl %ebp pushl %ebp
movl %esp,%ebp movl %esp,%ebp
popl %ebp popl %ebp

View file

@ -207,9 +207,3 @@ _KiV86Complete:
movl %ebp, %esp movl %ebp, %esp
popl %ebp popl %ebp
ret ret