ReactOS  0.4.15-dev-3175-g222acf5
int10.c File Reference
#include "videoprt.h"
#include <ndk/kefuncs.h>
#include <ndk/halfuncs.h>
#include <ndk/mmfuncs.h>
#include <debug.h>
Include dependency graph for int10.c:

Go to the source code of this file.

Macros

#define NDEBUG
 
#define IsLowV86Mem(_Seg, _Off)   ((((_Seg) << 4) + (_Off)) < (0xa0000))
 

Functions

static VOID ProtectLowV86Mem (VOID)
 
static VOID UnprotectLowV86Mem (VOID)
 
NTSTATUS NTAPI IntInitializeVideoAddressSpace (VOID)
 
VP_STATUS NTAPI IntInt10AllocateBuffer (IN PVOID Context, OUT PUSHORT Seg, OUT PUSHORT Off, IN OUT PULONG Length)
 
VP_STATUS NTAPI IntInt10FreeBuffer (IN PVOID Context, IN USHORT Seg, IN USHORT Off)
 
VP_STATUS NTAPI IntInt10ReadMemory (IN PVOID Context, IN USHORT Seg, IN USHORT Off, OUT PVOID Buffer, IN ULONG Length)
 
VP_STATUS NTAPI IntInt10WriteMemory (IN PVOID Context, IN USHORT Seg, IN USHORT Off, IN PVOID Buffer, IN ULONG Length)
 
VP_STATUS NTAPI IntInt10CallBios (IN PVOID Context, IN OUT PINT10_BIOS_ARGUMENTS BiosArguments)
 
VP_STATUS NTAPI VideoPortInt10 (IN PVOID HwDeviceExtension, IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments)
 

Macro Definition Documentation

◆ IsLowV86Mem

#define IsLowV86Mem (   _Seg,
  _Off 
)    ((((_Seg) << 4) + (_Off)) < (0xa0000))

Definition at line 33 of file int10.c.

◆ NDEBUG

#define NDEBUG

Definition at line 28 of file int10.c.

Function Documentation

◆ IntInitializeVideoAddressSpace()

NTSTATUS NTAPI IntInitializeVideoAddressSpace ( VOID  )

Definition at line 200 of file int10.c.

201 {
203  NT_ASSERT(FALSE);
204  return STATUS_NOT_IMPLEMENTED;
205 }
return STATUS_NOT_IMPLEMENTED
#define FALSE
Definition: types.h:117
#define UNIMPLEMENTED
Definition: debug.h:115
#define NT_ASSERT
Definition: rtlfuncs.h:3310

Referenced by IntVideoPortDispatchOpen().

◆ IntInt10AllocateBuffer()

VP_STATUS NTAPI IntInt10AllocateBuffer ( IN PVOID  Context,
OUT PUSHORT  Seg,
OUT PUSHORT  Off,
IN OUT PULONG  Length 
)

Definition at line 210 of file int10.c.

215 {
217 #ifdef _M_IX86
218  PVOID MemoryAddress;
219  PKPROCESS CallingProcess = (PKPROCESS)PsGetCurrentProcess();
221  SIZE_T Size;
222 
223  TRACE_(VIDEOPRT, "IntInt10AllocateBuffer\n");
224 
225  IntAttachToCSRSS(&CallingProcess, &ApcState);
226 
227  Size = *Length;
228  MemoryAddress = (PVOID)0x20000;
229 
230  Status = ZwAllocateVirtualMemory(NtCurrentProcess(),
231  &MemoryAddress,
232  0,
233  &Size,
234  MEM_COMMIT,
236  if (!NT_SUCCESS(Status))
237  {
238  WARN_(VIDEOPRT, "- ZwAllocateVirtualMemory failed\n");
239  IntDetachFromCSRSS(&CallingProcess, &ApcState);
241  }
242 
243  if (MemoryAddress > (PVOID)(0x100000 - Size))
244  {
245  ZwFreeVirtualMemory(NtCurrentProcess(),
246  &MemoryAddress,
247  &Size,
248  MEM_RELEASE);
249  WARN_(VIDEOPRT, "- Unacceptable memory allocated\n");
250  IntDetachFromCSRSS(&CallingProcess, &ApcState);
252  }
253 
254  *Length = (ULONG)Size;
255  *Seg = (USHORT)((ULONG_PTR)MemoryAddress >> 4);
256  *Off = (USHORT)((ULONG_PTR)MemoryAddress & 0xF);
257 
258  INFO_(VIDEOPRT, "- Segment: %x\n", (ULONG_PTR)MemoryAddress >> 4);
259  INFO_(VIDEOPRT, "- Offset: %x\n", (ULONG_PTR)MemoryAddress & 0xF);
260  INFO_(VIDEOPRT, "- Length: %x\n", *Length);
261 
262  IntDetachFromCSRSS(&CallingProcess, &ApcState);
263 
264  return NO_ERROR;
265 #else
266  Status = x86BiosAllocateBuffer(Length, Seg, Off);
268 #endif
269 }
KAPC_STATE
Definition: ketypes.h:1280
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define INFO_(ch,...)
Definition: debug.h:159
LONG NTSTATUS
Definition: precomp.h:26
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
#define NO_ERROR
Definition: dderror.h:5
#define MEM_COMMIT
Definition: nt_native.h:1313
uint32_t ULONG_PTR
Definition: typedefs.h:65
NTSTATUS NTAPI x86BiosAllocateBuffer(_In_ ULONG *Size, _In_ USHORT *Segment, _In_ USHORT *Offset)
Definition: x86bios.c:152
#define PsGetCurrentProcess
Definition: psfuncs.h:17
void * PVOID
Definition: retypes.h:9
#define NtCurrentProcess()
Definition: nt_native.h:1657
Status
Definition: gdiplustypes.h:24
#define TRACE_(x)
Definition: compat.h:76
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
ULONG_PTR SIZE_T
Definition: typedefs.h:80
VOID FASTCALL IntAttachToCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:496
unsigned short USHORT
Definition: pedump.c:61
struct _KPROCESS * PKPROCESS
Definition: wdm.template.h:206
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1679
#define MEM_RELEASE
Definition: nt_native.h:1316
VOID FASTCALL IntDetachFromCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:509
unsigned int ULONG
Definition: retypes.h:1
#define PAGE_EXECUTE_READWRITE
Definition: nt_native.h:1308
#define WARN_(ch,...)
Definition: debug.h:157

Referenced by VideoPortQueryServices().

◆ IntInt10CallBios()

VP_STATUS NTAPI IntInt10CallBios ( IN PVOID  Context,
IN OUT PINT10_BIOS_ARGUMENTS  BiosArguments 
)

Definition at line 380 of file int10.c.

383 {
384 #ifdef _M_AMD64
385  X86_BIOS_REGISTERS BiosContext;
386 #else
388 #endif
390  PKPROCESS CallingProcess = (PKPROCESS)PsGetCurrentProcess();
392 
393  /* Attach to CSRSS */
394  IntAttachToCSRSS(&CallingProcess, &ApcState);
395 
396  /* Clear the context */
398 
399  /* Fill out the bios arguments */
400  BiosContext.Eax = BiosArguments->Eax;
401  BiosContext.Ebx = BiosArguments->Ebx;
402  BiosContext.Ecx = BiosArguments->Ecx;
403  BiosContext.Edx = BiosArguments->Edx;
404  BiosContext.Esi = BiosArguments->Esi;
405  BiosContext.Edi = BiosArguments->Edi;
406  BiosContext.Ebp = BiosArguments->Ebp;
407  BiosContext.SegDs = BiosArguments->SegDs;
408  BiosContext.SegEs = BiosArguments->SegEs;
409 
410  /* Do the ROM BIOS call */
412  Executive,
413  KernelMode,
414  FALSE,
415  NULL);
416 
417  /* The kernel needs access here */
419 #ifdef _M_AMD64
421 #else
422  Status = Ke386CallBios(0x10, &BiosContext);
423 #endif
425 
427 
428  /* Return the arguments */
429  BiosArguments->Eax = BiosContext.Eax;
430  BiosArguments->Ebx = BiosContext.Ebx;
431  BiosArguments->Ecx = BiosContext.Ecx;
432  BiosArguments->Edx = BiosContext.Edx;
433  BiosArguments->Esi = BiosContext.Esi;
434  BiosArguments->Edi = BiosContext.Edi;
435  BiosArguments->Ebp = BiosContext.Ebp;
436  BiosArguments->SegDs = (USHORT)BiosContext.SegDs;
437  BiosArguments->SegEs = (USHORT)BiosContext.SegEs;
438 
439  /* Detach and return status */
440  IntDetachFromCSRSS(&CallingProcess, &ApcState);
441 
442  if (NT_SUCCESS(Status))
443  {
444  return NO_ERROR;
445  }
446 
448 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
KAPC_STATE
Definition: ketypes.h:1280
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define KeWaitForMutexObject
Definition: kefuncs.h:555
LONG NTSTATUS
Definition: precomp.h:26
static VOID ProtectLowV86Mem(VOID)
Definition: int10.c:39
KMUTEX VideoPortInt10Mutex
Definition: videoprt.c:41
LONG NTAPI KeReleaseMutex(IN PKMUTEX Mutex, IN BOOLEAN Wait)
Definition: mutex.c:189
#define NO_ERROR
Definition: dderror.h:5
#define FALSE
Definition: types.h:117
#define PsGetCurrentProcess
Definition: psfuncs.h:17
Status
Definition: gdiplustypes.h:24
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
CALLBACK16 BiosContext
Definition: bios32.c:45
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
NTSTATUS NTAPI Ke386CallBios(IN ULONG Int, OUT PCONTEXT Context)
Definition: v86vdm.c:614
VOID FASTCALL IntAttachToCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:496
unsigned short USHORT
Definition: pedump.c:61
struct _KPROCESS * PKPROCESS
Definition: wdm.template.h:206
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1679
static VOID UnprotectLowV86Mem(VOID)
Definition: int10.c:62
#define NULL
Definition: types.h:112
VOID FASTCALL IntDetachFromCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:509
BOOLEAN NTAPI x86BiosCall(_In_ ULONG InterruptNumber, _Inout_ PX86_BIOS_REGISTERS Registers)
Definition: x86bios.c:405
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define STATUS_SUCCESS
Definition: shellext.h:65

Referenced by VideoPortInt10(), and VideoPortQueryServices().

◆ IntInt10FreeBuffer()

VP_STATUS NTAPI IntInt10FreeBuffer ( IN PVOID  Context,
IN USHORT  Seg,
IN USHORT  Off 
)

Definition at line 273 of file int10.c.

277 {
279 #ifdef _M_IX86
280  PVOID MemoryAddress = (PVOID)((ULONG_PTR)(Seg << 4) | Off);
281  PKPROCESS CallingProcess = (PKPROCESS)PsGetCurrentProcess();
283  SIZE_T Size = 0;
284 
285  TRACE_(VIDEOPRT, "IntInt10FreeBuffer\n");
286  INFO_(VIDEOPRT, "- Segment: %x\n", Seg);
287  INFO_(VIDEOPRT, "- Offset: %x\n", Off);
288 
289  IntAttachToCSRSS(&CallingProcess, &ApcState);
290  Status = ZwFreeVirtualMemory(NtCurrentProcess(),
291  &MemoryAddress,
292  &Size,
293  MEM_RELEASE);
294 
295  IntDetachFromCSRSS(&CallingProcess, &ApcState);
296 
297  return Status;
298 #else
299  Status = x86BiosFreeBuffer(Seg, Off);
301 #endif
302 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
KAPC_STATE
Definition: ketypes.h:1280
#define INFO_(ch,...)
Definition: debug.h:159
LONG NTSTATUS
Definition: precomp.h:26
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
#define NO_ERROR
Definition: dderror.h:5
uint32_t ULONG_PTR
Definition: typedefs.h:65
NTSTATUS NTAPI x86BiosFreeBuffer(_In_ USHORT Segment, _In_ USHORT Offset)
Definition: x86bios.c:181
#define PsGetCurrentProcess
Definition: psfuncs.h:17
void * PVOID
Definition: retypes.h:9
#define NtCurrentProcess()
Definition: nt_native.h:1657
Status
Definition: gdiplustypes.h:24
#define TRACE_(x)
Definition: compat.h:76
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
ULONG_PTR SIZE_T
Definition: typedefs.h:80
VOID FASTCALL IntAttachToCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:496
struct _KPROCESS * PKPROCESS
Definition: wdm.template.h:206
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1679
#define MEM_RELEASE
Definition: nt_native.h:1316
VOID FASTCALL IntDetachFromCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:509

Referenced by VideoPortQueryServices().

◆ IntInt10ReadMemory()

VP_STATUS NTAPI IntInt10ReadMemory ( IN PVOID  Context,
IN USHORT  Seg,
IN USHORT  Off,
OUT PVOID  Buffer,
IN ULONG  Length 
)

Definition at line 306 of file int10.c.

312 {
313 #ifdef _M_IX86
314  PKPROCESS CallingProcess = (PKPROCESS)PsGetCurrentProcess();
316 
317  TRACE_(VIDEOPRT, "IntInt10ReadMemory\n");
318  INFO_(VIDEOPRT, "- Segment: %x\n", Seg);
319  INFO_(VIDEOPRT, "- Offset: %x\n", Off);
320  INFO_(VIDEOPRT, "- Buffer: %x\n", Buffer);
321  INFO_(VIDEOPRT, "- Length: %x\n", Length);
322 
323  IntAttachToCSRSS(&CallingProcess, &ApcState);
324 
325  if (IsLowV86Mem(Seg, Off))
327  RtlCopyMemory(Buffer, (PVOID)((ULONG_PTR)(Seg << 4) | Off), Length);
328  if (IsLowV86Mem(Seg, Off))
330 
331  IntDetachFromCSRSS(&CallingProcess, &ApcState);
332 
333  return NO_ERROR;
334 #else
336 
337  Status = x86BiosReadMemory(Seg, Off, Buffer, Length);
339 #endif
340 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
KAPC_STATE
Definition: ketypes.h:1280
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define INFO_(ch,...)
Definition: debug.h:159
LONG NTSTATUS
Definition: precomp.h:26
static VOID ProtectLowV86Mem(VOID)
Definition: int10.c:39
#define NO_ERROR
Definition: dderror.h:5
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IsLowV86Mem(_Seg, _Off)
Definition: int10.c:33
#define PsGetCurrentProcess
Definition: psfuncs.h:17
Definition: bufpool.h:45
NTSTATUS NTAPI x86BiosReadMemory(_In_ USHORT Segment, _In_ USHORT Offset, _Out_writes_bytes_(Size) PVOID Buffer, _In_ ULONG Size)
Definition: x86bios.c:205
Status
Definition: gdiplustypes.h:24
#define TRACE_(x)
Definition: compat.h:76
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
VOID FASTCALL IntAttachToCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:496
struct _KPROCESS * PKPROCESS
Definition: wdm.template.h:206
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1679
static VOID UnprotectLowV86Mem(VOID)
Definition: int10.c:62
VOID FASTCALL IntDetachFromCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:509
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263

Referenced by VideoPortQueryServices().

◆ IntInt10WriteMemory()

VP_STATUS NTAPI IntInt10WriteMemory ( IN PVOID  Context,
IN USHORT  Seg,
IN USHORT  Off,
IN PVOID  Buffer,
IN ULONG  Length 
)

Definition at line 344 of file int10.c.

350 {
351 #ifdef _M_IX86
352  PKPROCESS CallingProcess = (PKPROCESS)PsGetCurrentProcess();
354 
355  TRACE_(VIDEOPRT, "IntInt10WriteMemory\n");
356  INFO_(VIDEOPRT, "- Segment: %x\n", Seg);
357  INFO_(VIDEOPRT, "- Offset: %x\n", Off);
358  INFO_(VIDEOPRT, "- Buffer: %x\n", Buffer);
359  INFO_(VIDEOPRT, "- Length: %x\n", Length);
360 
361  IntAttachToCSRSS(&CallingProcess, &ApcState);
362  if (IsLowV86Mem(Seg, Off))
364  RtlCopyMemory((PVOID)((ULONG_PTR)(Seg << 4) | Off), Buffer, Length);
365  if (IsLowV86Mem(Seg, Off))
367  IntDetachFromCSRSS(&CallingProcess, &ApcState);
368 
369  return NO_ERROR;
370 #else
372 
373  Status = x86BiosWriteMemory(Seg, Off, Buffer, Length);
375 #endif
376 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
KAPC_STATE
Definition: ketypes.h:1280
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define INFO_(ch,...)
Definition: debug.h:159
LONG NTSTATUS
Definition: precomp.h:26
static VOID ProtectLowV86Mem(VOID)
Definition: int10.c:39
#define NO_ERROR
Definition: dderror.h:5
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IsLowV86Mem(_Seg, _Off)
Definition: int10.c:33
#define PsGetCurrentProcess
Definition: psfuncs.h:17
Definition: bufpool.h:45
Status
Definition: gdiplustypes.h:24
#define TRACE_(x)
Definition: compat.h:76
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
VOID FASTCALL IntAttachToCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:496
struct _KPROCESS * PKPROCESS
Definition: wdm.template.h:206
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1679
static VOID UnprotectLowV86Mem(VOID)
Definition: int10.c:62
VOID FASTCALL IntDetachFromCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
Definition: videoprt.c:509
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
NTSTATUS NTAPI x86BiosWriteMemory(_In_ USHORT Segment, _In_ USHORT Offset, _In_reads_bytes_(Size) PVOID Buffer, _In_ ULONG Size)
Definition: x86bios.c:232

Referenced by VideoPortQueryServices().

◆ ProtectLowV86Mem()

static VOID ProtectLowV86Mem ( VOID  )
static

Definition at line 39 of file int10.c.

40 {
41  /* We pass a non-NULL address so that ZwAllocateVirtualMemory really does it
42  * And we truncate one page to get the right range spanned. */
43  PVOID BaseAddress = (PVOID)1;
45  SIZE_T ViewSize = 0xa0000 - PAGE_SIZE;
46 
47  /* We should only do that for CSRSS. */
49 
50  /* Commit (again) the pages, but with PAGE_NOACCESS protection */
51  Status = ZwAllocateVirtualMemory(NtCurrentProcess(),
52  &BaseAddress,
53  0,
54  &ViewSize,
55  MEM_COMMIT,
58 }
LONG NTSTATUS
Definition: precomp.h:26
PKPROCESS CsrProcess
Definition: videoprt.c:39
#define MEM_COMMIT
Definition: nt_native.h:1313
#define PsGetCurrentProcess
Definition: psfuncs.h:17
#define PAGE_NOACCESS
Definition: nt_native.h:1302
void * PVOID
Definition: retypes.h:9
#define NtCurrentProcess()
Definition: nt_native.h:1657
Status
Definition: gdiplustypes.h:24
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
#define ASSERT(a)
Definition: mode.c:44
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define PAGE_SIZE
Definition: env_spec_w32.h:49
ULONG_PTR SIZE_T
Definition: typedefs.h:80
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T ViewSize
Definition: mmfuncs.h:404

Referenced by IntInt10CallBios(), IntInt10ReadMemory(), and IntInt10WriteMemory().

◆ UnprotectLowV86Mem()

static VOID UnprotectLowV86Mem ( VOID  )
static

Definition at line 62 of file int10.c.

63 {
64  /* We pass a non-NULL address so that ZwAllocateVirtualMemory really does it
65  * And we truncate one page to get the right range spanned. */
66  PVOID BaseAddress = (PVOID)1;
68  SIZE_T ViewSize = 0xa0000 - PAGE_SIZE;
69 
70  /* We should only do that for CSRSS, for the v86 address space */
72 
73  /* Commit (again) the pages, but with PAGE_READWRITE protection */
74  Status = ZwAllocateVirtualMemory(NtCurrentProcess(),
75  &BaseAddress,
76  0,
77  &ViewSize,
78  MEM_COMMIT,
81 }
LONG NTSTATUS
Definition: precomp.h:26
PKPROCESS CsrProcess
Definition: videoprt.c:39
#define MEM_COMMIT
Definition: nt_native.h:1313
#define PsGetCurrentProcess
Definition: psfuncs.h:17
void * PVOID
Definition: retypes.h:9
#define NtCurrentProcess()
Definition: nt_native.h:1657
Status
Definition: gdiplustypes.h:24
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
#define ASSERT(a)
Definition: mode.c:44
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define PAGE_SIZE
Definition: env_spec_w32.h:49
ULONG_PTR SIZE_T
Definition: typedefs.h:80
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T ViewSize
Definition: mmfuncs.h:404
#define PAGE_READWRITE
Definition: nt_native.h:1304

Referenced by IntInt10CallBios(), IntInt10ReadMemory(), and IntInt10WriteMemory().

◆ VideoPortInt10()

VP_STATUS NTAPI VideoPortInt10 ( IN PVOID  HwDeviceExtension,
IN PVIDEO_X86_BIOS_ARGUMENTS  BiosArguments 
)

Definition at line 457 of file int10.c.

460 {
461  INT10_BIOS_ARGUMENTS Int10BiosArguments;
463 
464  if (!CsrProcess)
465  {
467  }
468 
469  /* Copy arguments to other format */
470  RtlCopyMemory(&Int10BiosArguments, BiosArguments, sizeof(*BiosArguments));
471  Int10BiosArguments.SegDs = 0;
472  Int10BiosArguments.SegEs = 0;
473 
474  /* Do the BIOS call */
475  Status = IntInt10CallBios(NULL, &Int10BiosArguments);
476 
477  /* Copy results back */
478  RtlCopyMemory(BiosArguments, &Int10BiosArguments, sizeof(*BiosArguments));
479 
480  return Status;
481 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
PKPROCESS CsrProcess
Definition: videoprt.c:39
VP_STATUS NTAPI IntInt10CallBios(IN PVOID Context, IN OUT PINT10_BIOS_ARGUMENTS BiosArguments)
Definition: int10.c:380
Status
Definition: gdiplustypes.h:24
#define NULL
Definition: types.h:112
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
LONG VP_STATUS
Definition: video.h:153

Referenced by VbeSetMode().