From 3f270ca3d41151995770a4bd1dcef5a4e0901b22 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 27 Apr 2003 18:12:15 +0000 Subject: [PATCH] Removed unused bios32 support. svn path=/trunk/; revision=4603 --- reactos/hal/halx86/Makefile | 3 +- reactos/hal/halx86/bios32.c | 144 ------------------------------------ 2 files changed, 1 insertion(+), 146 deletions(-) delete mode 100644 reactos/hal/halx86/bios32.c diff --git a/reactos/hal/halx86/Makefile b/reactos/hal/halx86/Makefile index d24d7d03af2..2ac742d43ee 100644 --- a/reactos/hal/halx86/Makefile +++ b/reactos/hal/halx86/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.8 2003/04/05 09:37:44 chorns Exp $ +# $Id: Makefile,v 1.9 2003/04/27 18:12:15 ekohl Exp $ PATH_TO_TOP = ../.. @@ -42,7 +42,6 @@ endif HAL_OBJECTS = \ adapter.o \ beep.o \ - bios32.o \ bus.o \ display.o \ dma.o \ diff --git a/reactos/hal/halx86/bios32.c b/reactos/hal/halx86/bios32.c deleted file mode 100644 index 4668367610b..00000000000 --- a/reactos/hal/halx86/bios32.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/hal/pci - * PURPOSE: Interfaces to BIOS32 interface - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * 05/06/98: Created - */ - -/* - * NOTES: Sections copied from the Linux pci support - */ - -/* INCLUDES ***************************************************************/ - -#include -#include -#include - - -/* TYPES ******************************************************************/ - -typedef struct -{ - /* - * "_32_" if present - */ - unsigned int signature; - - /* - * Entry point (physical address) - */ - unsigned long int entry; - - /* - * Revision level - */ - unsigned char revision; - - /* - * Length in paragraphs - */ - unsigned char length; - - /* - * Checksum (so all bytes add up to zero) - */ - unsigned char checksum; - - unsigned char reserved[5]; -} bios32; - -BOOLEAN bios32_detected = FALSE; - -static struct -{ - unsigned long address; - unsigned short segment; -} bios32_indirect = {0,KERNEL_CS}; - -/* FUNCTIONS **************************************************************/ - -#define BIOS32_SIGNATURE (('_' << 0)+('3'<<8)+('2'<<16)+('_'<<24)) - -#if 0 -BOOL static checksum(bios32* service_entry) -/* - * FUNCTION: Checks the checksum of a bios32 service entry - * ARGUMENTS: - * service_entry = Pointer to the service entry - * RETURNS: True if the sum of the bytes in the entry was zero - * False otherwise - */ -{ - unsigned char* p = (unsigned char *)service_entry; - int i; - unsigned char sum=0; - - for (i=0; i<(service_entry->length*16); i++) - { - sum=sum+p[i]; - } -// DbgPrint("sum = %d\n",sum); - if (sum==0) - { - return(TRUE); - } - return(FALSE); -} -#endif - -BOOLEAN Hal_bios32_is_service_present(ULONG service) -{ - unsigned char return_code; - unsigned int address; - unsigned int length; - unsigned int entry; - - __asm__("lcall *(%%edi)" - : "=a" (return_code), - "=b" (address), - "=c" (length), - "=d" (entry) - : "0" (service), - "1" (0), - "D" (&bios32_indirect)); - if (return_code==0) - { - return(address+entry); - } - return(0); -} - -VOID Hal_bios32_probe() -/* - * FUNCTION: Probes for an BIOS32 extension - * RETURNS: True if detected - */ -{ - DbgPrint ("Hal_bios32_probe()\n"); - - return; -#if 0 - int i; - - for (i=0xe0000;i<=0xffff0;i++) - { - bios32* service_entry = (bios32 *)physical_to_linear(i); - if ( service_entry->signature != BIOS32_SIGNATURE ) - { - continue; - } - DbgPrint("Signature detected at %x\n",i); - if (!checksum(service_entry)) - { - continue; - } - DbgPrint("ReactOS: BIOS32 detected at %x\n",i); - bios32_indirect.address = service_entry->entry; - bios32_detected=TRUE; - } -#endif -}