Replaced direct io space mapping by call to MmMapIoSpace()

svn path=/trunk/; revision=1002
This commit is contained in:
Eric Kohl 2000-02-24 13:16:40 +00:00
parent 6165746875
commit d7de328d0c

View file

@ -1,4 +1,4 @@
/* $Id: blue.c,v 1.19 2000/01/11 17:33:44 ekohl Exp $ /* $Id: blue.c,v 1.20 2000/02/24 13:16:40 ekohl Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -19,10 +19,11 @@
#define NDEBUG #define NDEBUG
#include <internal/debug.h> #include <internal/debug.h>
/* DEFINITIONS ***************************************************************/ /* DEFINITIONS ***************************************************************/
#define IDMAP_BASE 0xd0000000
#define VIDMEM_BASE 0xb8000 #define VIDMEM_BASE 0xb8000
#define VIDMEM_SIZE 0x2000
#define CRTC_COMMAND ((PUCHAR)0x3d4) #define CRTC_COMMAND ((PUCHAR)0x3d4)
#define CRTC_DATA ((PUCHAR)0x3d5) #define CRTC_DATA ((PUCHAR)0x3d5)
@ -70,17 +71,17 @@ NTSTATUS
ScrCreate (PDEVICE_OBJECT DeviceObject, PIRP Irp) ScrCreate (PDEVICE_OBJECT DeviceObject, PIRP Irp)
{ {
PDEVICE_EXTENSION DeviceExtension; PDEVICE_EXTENSION DeviceExtension;
PHYSICAL_ADDRESS BaseAddress;
NTSTATUS Status; NTSTATUS Status;
unsigned int offset; unsigned int offset;
BYTE data, value; BYTE data, value;
DeviceExtension = DeviceObject->DeviceExtension; DeviceExtension = DeviceObject->DeviceExtension;
/* initialize device extension */
/* get pointer to video memory */ /* get pointer to video memory */
/* FIXME : use MmMapIoSpace() */ BaseAddress.QuadPart = VIDMEM_BASE;
DeviceExtension->VideoMemory = (PBYTE)(IDMAP_BASE + VIDMEM_BASE); DeviceExtension->VideoMemory =
(PBYTE)MmMapIoSpace (BaseAddress, VIDMEM_SIZE, FALSE);
/* disable interrupts */ /* disable interrupts */
__asm__("cli\n\t"); __asm__("cli\n\t");