Introduce kernel executive
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Rafal Kupiec 2023-03-16 23:40:38 +01:00
parent e6b64b741a
commit e0778d0a12
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
4 changed files with 56 additions and 0 deletions

26
sdk/xtdk/extypes.h Normal file
View File

@ -0,0 +1,26 @@
/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: sdk/xtdk/extypes.h
* DESCRIPTION: Kernel executive structures definitions
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
*/
#ifndef __XTDK_EXTYPES_H
#define __XTDK_EXTYPES_H
#include <xtbase.h>
#include <xttypes.h>
/* Executive rundown protection structure definition */
typedef struct _EX_RUNDOWN_REFERENCE
{
union
{
ULONG_PTR Count;
PVOID Ptr;
};
} EX_RUNDOWN_REFERENCE, *PEX_RUNDOWN_REFERENCE;
#endif /* __XTDK_EXTYPES_H */

View File

@ -26,6 +26,7 @@
#include <xtuefi.h>
/* Low level data types headers */
#include <extypes.h>
#include <hltypes.h>
#include <iotypes.h>
#include <ketypes.h>

View File

@ -193,6 +193,7 @@ typedef struct _EFI_VENDOR_DEVICE_PATH EFI_VENDOR_DEVICE_PATH, *PEFI_VENDOR_DEVI
typedef struct _EFI_VLAN_DEVICE_PATH EFI_VLAN_DEVICE_PATH, *PEFI_VLAN_DEVICE_PATH;
typedef struct _EPROCESS EPROCESS, *PEPROCESS;
typedef struct _ETHREAD ETHREAD, *PETHREAD;
typedef struct _EX_RUNDOWN_REFERENCE EX_RUNDOWN_REFERENCE, *PEX_RUNDOWN_REFERENCE;
typedef struct _EXCEPTION_RECORD EXCEPTION_RECORD, *PEXCEPTION_RECORD;
typedef struct _EXCEPTION_REGISTRATION_RECORD EXCEPTION_REGISTRATION_RECORD, *PEXCEPTION_REGISTRATION_RECORD;
typedef struct _FIRMWARE_INFORMATION_BLOCK FIRMWARE_INFORMATION_BLOCK, *PFIRMWARE_INFORMATION_BLOCK;

28
xtoskrnl/ex/rundown.c Normal file
View File

@ -0,0 +1,28 @@
/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtoskrnl/ex/rundown.c
* DESCRIPTION: Rundown protection mechanism
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
*/
#include <xtos.h>
/**
* Initializes the rundown protection descriptor.
*
* @param Descriptor
* Supplies a pointer to the descriptor to be initialized.
*
* @return This routine does not return any value.
*
* @since NT 5.1
*/
XTFASTCALL
VOID
ExInitializeRundownProtection(IN PEX_RUNDOWN_REFERENCE Descriptor)
{
/* Reset descriptor counter */
Descriptor->Count = 0;
}