mirror of
https://github.com/reactos/reactos.git
synced 2024-06-27 16:31:30 +00:00
[VIDEOPRT] [FORMATTING] No code change
This commit is contained in:
parent
9ab3246d43
commit
e7b3c66a42
|
@ -151,7 +151,8 @@ IntInitializeVideoAddressSpace(VOID)
|
|||
#endif
|
||||
|
||||
#if defined(_M_IX86)
|
||||
VP_STATUS NTAPI
|
||||
VP_STATUS
|
||||
NTAPI
|
||||
IntInt10AllocateBuffer(
|
||||
IN PVOID Context,
|
||||
OUT PUSHORT Seg,
|
||||
|
@ -168,9 +169,12 @@ IntInt10AllocateBuffer(
|
|||
IntAttachToCSRSS(&CallingProcess, &ApcState);
|
||||
|
||||
MemoryAddress = (PVOID)0x20000;
|
||||
Status = ZwAllocateVirtualMemory(NtCurrentProcess(), &MemoryAddress, 0,
|
||||
Length, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
|
||||
|
||||
Status = ZwAllocateVirtualMemory(NtCurrentProcess(),
|
||||
&MemoryAddress,
|
||||
0,
|
||||
Length,
|
||||
MEM_COMMIT,
|
||||
PAGE_EXECUTE_READWRITE);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
WARN_(VIDEOPRT, "- ZwAllocateVirtualMemory failed\n");
|
||||
|
@ -199,7 +203,8 @@ IntInt10AllocateBuffer(
|
|||
return NO_ERROR;
|
||||
}
|
||||
|
||||
VP_STATUS NTAPI
|
||||
VP_STATUS
|
||||
NTAPI
|
||||
IntInt10FreeBuffer(
|
||||
IN PVOID Context,
|
||||
IN USHORT Seg,
|
||||
|
@ -216,14 +221,18 @@ IntInt10FreeBuffer(
|
|||
INFO_(VIDEOPRT, "- Offset: %x\n", Off);
|
||||
|
||||
IntAttachToCSRSS(&CallingProcess, &ApcState);
|
||||
Status = ZwFreeVirtualMemory(NtCurrentProcess(), &MemoryAddress, &Size,
|
||||
Status = ZwFreeVirtualMemory(NtCurrentProcess(),
|
||||
&MemoryAddress,
|
||||
&Size,
|
||||
MEM_RELEASE);
|
||||
|
||||
IntDetachFromCSRSS(&CallingProcess, &ApcState);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
VP_STATUS NTAPI
|
||||
VP_STATUS
|
||||
NTAPI
|
||||
IntInt10ReadMemory(
|
||||
IN PVOID Context,
|
||||
IN USHORT Seg,
|
||||
|
@ -247,7 +256,8 @@ IntInt10ReadMemory(
|
|||
return NO_ERROR;
|
||||
}
|
||||
|
||||
VP_STATUS NTAPI
|
||||
VP_STATUS
|
||||
NTAPI
|
||||
IntInt10WriteMemory(
|
||||
IN PVOID Context,
|
||||
IN USHORT Seg,
|
||||
|
@ -286,7 +296,7 @@ IntInt10CallBios(
|
|||
IntAttachToCSRSS(&CallingProcess, &ApcState);
|
||||
|
||||
/* Clear the context */
|
||||
RtlZeroMemory(&BiosContext, sizeof(CONTEXT));
|
||||
RtlZeroMemory(&BiosContext, sizeof(BiosContext));
|
||||
|
||||
/* Fill out the bios arguments */
|
||||
BiosContext.Eax = BiosArguments->Eax;
|
||||
|
@ -300,8 +310,14 @@ IntInt10CallBios(
|
|||
BiosContext.SegEs = BiosArguments->SegEs;
|
||||
|
||||
/* Do the ROM BIOS call */
|
||||
(void)KeWaitForMutexObject(&VideoPortInt10Mutex, Executive, KernelMode, FALSE, NULL);
|
||||
(void)KeWaitForMutexObject(&VideoPortInt10Mutex,
|
||||
Executive,
|
||||
KernelMode,
|
||||
FALSE,
|
||||
NULL);
|
||||
|
||||
Status = Ke386CallBios(0x10, &BiosContext);
|
||||
|
||||
KeReleaseMutex(&VideoPortInt10Mutex, FALSE);
|
||||
|
||||
/* Return the arguments */
|
||||
|
@ -317,7 +333,12 @@ IntInt10CallBios(
|
|||
|
||||
/* Detach and return status */
|
||||
IntDetachFromCSRSS(&CallingProcess, &ApcState);
|
||||
if (NT_SUCCESS(Status)) return NO_ERROR;
|
||||
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
#endif
|
||||
|
@ -328,7 +349,8 @@ IntInt10CallBios(
|
|||
* @implemented
|
||||
*/
|
||||
|
||||
VP_STATUS NTAPI
|
||||
VP_STATUS
|
||||
NTAPI
|
||||
VideoPortInt10(
|
||||
IN PVOID HwDeviceExtension,
|
||||
IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments)
|
||||
|
@ -360,7 +382,11 @@ VideoPortInt10(
|
|||
BiosContext.Ebp = BiosArguments->Ebp;
|
||||
|
||||
/* Do the ROM BIOS call */
|
||||
(void)KeWaitForMutexObject(&VideoPortInt10Mutex, Executive, KernelMode, FALSE, NULL);
|
||||
(void)KeWaitForMutexObject(&VideoPortInt10Mutex,
|
||||
Executive,
|
||||
KernelMode,
|
||||
FALSE,
|
||||
NULL);
|
||||
Status = Ke386CallBios(0x10, &BiosContext);
|
||||
KeReleaseMutex(&VideoPortInt10Mutex, FALSE);
|
||||
|
||||
|
@ -375,7 +401,12 @@ VideoPortInt10(
|
|||
|
||||
/* Detach from CSRSS */
|
||||
IntDetachFromCSRSS(&CallingProcess, &ApcState);
|
||||
if (NT_SUCCESS(Status)) return NO_ERROR;
|
||||
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
#else
|
||||
/* Not implemented for anything else than X86*/
|
||||
|
|
Loading…
Reference in a new issue