Fixed problems with vidport and vga loading

svn path=/trunk/; revision=738
This commit is contained in:
Rex Jolliff 1999-10-28 06:58:05 +00:00
parent 863afe8930
commit 11d7e1e18c
5 changed files with 45 additions and 26 deletions

View file

@ -35,7 +35,7 @@ LOADERS = dos
#
# Select the device drivers and filesystems you want
#
DEVICE_DRIVERS = blue ide keyboard null parallel serial vga vidport
DEVICE_DRIVERS = blue ide keyboard null parallel serial vidport vga
# DEVICE_DRIVERS = beep event floppy ide_test mouse sound test test1
FS_DRIVERS = vfat
# FS_DRIVERS = minix ext2 template

View file

@ -38,22 +38,39 @@ else
endif
vidport.sys: $(OBJECTS)
$(CC) -specs=../../svc_specs -mdll -o junk.tmp -Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ -Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp $(OBJECTS)
$(DLLTOOL) \
--dllname $(TARGET).sys \
--def $(TARGET).def \
--kill-at \
--output-lib $(TARGET).a
$(CC) \
$(OBJECTS) \
-Wl,-d -specs=../../svc_specs \
-mdll \
-o junk.tmp \
-Wl,--image-base,0x10000 \
-Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ \
-Wl,--defsym,_etext=etext \
-Wl,--base-file,base.tmp
- $(RM) junk.tmp
$(DLLTOOL) --dllname vidport.sys --base-file base.tmp \
--output-exp temp.exp
$(DLLTOOL) \
--dllname $(TARGET).sys \
--base-file base.tmp \
--output-exp temp.exp \
--def $(TARGET).edf
- $(RM) base.tmp
$(CC) --verbose -Wl,--image-base,0x10000 -Wl,-e,_DriverEntry@8 \
-specs=../../svc_specs -mdll -o vidport.sys $(OBJECTS) -Wl,temp.exp
$(CC) \
$(OBJECTS) \
-specs=../../svc_specs \
-mdll \
-o $(TARGET).sys \
-Wl,--image-base,0x10000 \
-Wl,-e,_DriverEntry@8 \
-Wl,--defsym,_end=end \
-Wl,--defsym,_edata=__data_end__ \
-Wl,--defsym,_etext=etext \
-Wl,temp.exp
- $(RM) temp.exp
vidport.a: vidport.sys vidport.def
$(DLLTOOL) \
--dllname vidport.sys \
--def vidport.def \
--output-lib vidport.a
include ../../../rules.mak

View file

@ -49,8 +49,6 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject,
DriverObject->MajorFunction[IRP_MJ_CLOSE] = VidDispatchOpenClose;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = VidDispatchDeviceControl;
/* FIXME: should the miniport driver be loaded here? */
return STATUS_SUCCESS;
}
@ -616,7 +614,7 @@ VideoPortWriteRegisterBufferUlong(IN PULONG Register,
VOID VideoPortZeroMemory(OUT PVOID Destination,
IN ULONG Length)
{
UNIMPLEMENTED;
RtlZeroMemory (Destination, Length);
}
VOID VideoPortZeroDeviceMemory(OUT PVOID Destination,

View file

@ -1,24 +1,24 @@
; $Id: vidport.def,v 1.1 1999/08/06 17:27:45 rex Exp $
; $Id: vidport.def,v 1.2 1999/10/28 06:58:05 rex Exp $
;
; vidport.def - export definition file for ReactOS
;
EXPORTS
VideoPortCompareMemory@12
VideoPortDebugPrint@8
VideoPortDebugPrint@0
VideoPortDisableInterrupt@4
VideoPortEnableInterrupt@4
VideoPortFreeDeviceBase@8
VideoPortGetBusData@24
VideoPortGetCurrentIrql@0
VideoPortGetDeviceBase@16
VideoPortGetDeviceBase@20
VideoPortGetDeviceData@16
VideoPortGetAccessRanges@32
VideoPortGetRegistryParameters@20
VideoPortInitialize@16
VideoPortInt10@8
VideoPortLogError@16
VideoPortMapBankedMemory@36
VideoPortMapMemory@20
VideoPortMapBankedMemory@40
VideoPortMapMemory@24
VideoPortMoveMemory@12
VideoPortReadPortUchar@4
VideoPortReadPortUshort@4

View file

@ -1,4 +1,4 @@
/* $Id: loader.c,v 1.35 1999/10/24 17:07:57 rex Exp $
/* $Id: loader.c,v 1.36 1999/10/28 06:58:05 rex Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -29,7 +29,7 @@
#include <internal/string.h>
#include <internal/symbol.h>
#define NDEBUG
//#define NDEBUG
#include <internal/debug.h>
#include "syspath.h"
@ -837,6 +837,8 @@ LdrPEGetExportAddress(PMODULE_OBJECT ModuleObject,
/* Get the IMAGE_SECTION_HEADER that contains the exports. This is
usually the .edata section, but doesn't have to be. */
SectionHeader = LdrPEGetEnclosingSectionHeader(ExportsStartRVA, ModuleObject);
DPRINT("Base:%08lx ExportsStartRVA:%08lx End:%08lx SectionHeader:%08lx\n",
ModuleObject->Base, ExportsStartRVA, ExportsEndRVA, SectionHeader);
if (!SectionHeader)
{
return 0;
@ -846,7 +848,7 @@ LdrPEGetExportAddress(PMODULE_OBJECT ModuleObject,
ExportDirectory = MakePtr(PIMAGE_EXPORT_DIRECTORY,
ModuleObject->Base,
ExportsStartRVA - Delta);
DPRINT("Export Dir:%08lx\n", ExportDirectory);
FunctionList = (PDWORD)((DWORD)ExportDirectory->AddressOfFunctions -
Delta + ModuleObject->Base);
NameList = (PDWORD)((DWORD)ExportDirectory->AddressOfNames -
@ -865,10 +867,12 @@ LdrPEGetExportAddress(PMODULE_OBJECT ModuleObject,
{
for (Idx = 0; Idx < ExportDirectory->NumberOfNames; Idx++)
{
#if 0
DPRINT(" Name:%s NameList[%d]:%s\n",
Name,
Idx,
(DWORD) ModuleObject->Base + NameList[Idx]);
#endif
if (!strcmp(Name, (PCHAR) ((DWORD)ModuleObject->Base + NameList[Idx])))
{
ExportAddress = (PVOID) ((DWORD)ModuleObject->Base +