[BOOT] Create input parameters structures.

This commit is contained in:
2024-06-06 09:40:58 -04:00
parent 42369f91ee
commit be6f37b4dc
6 changed files with 433 additions and 7 deletions

84
BOOT/ENVIRON/LIB/rtl.c Normal file
View File

@@ -0,0 +1,84 @@
/*++
Copyright (c) 2024, Quinn Stephens.
Provided under the BSD 3-Clause license.
Module Name:
rtl.c
Abstract:
Runtime library routines.
--*/
#include <nt.h>
PVOID
RtlCopyMemory (
PVOID Destination,
CONST PVOID Source,
ULONG Length
)
/*++
Routine Description:
Copies a block of memory from Source to Destination.
Arguments:
Destination - the address to copy to.
Source - the address to copy from.
Length - the number of bytes to copy.
Return Value:
Returns Destination.
--*/
{
for (ULONG Index = 0; Index < Length; Index++) {
((PCHAR)Destination)[Index] = ((PCHAR)Source)[Index];
}
return Destination;
}
PVOID
RtlZeroMemory (
PVOID Destination,
ULONG Length
)
/*++
Routine Description:
Sets a block of memory to zero.
Arguments:
Destination - the address to zero at.
Length - the number of bytes to set.
Return Value:
Returns Destination.
--*/
{
for (ULONG Index = 0; Index < Length; Index++) {
((PCHAR)Destination)[Index] = 0;
}
return Destination;
}