Enable hardware layer initialization code
This commit is contained in:
parent
7b29897efb
commit
76e1fc6099
@ -18,6 +18,7 @@ list(APPEND XTOSKRNL_SOURCE
|
|||||||
${XTOSKRNL_SOURCE_DIR}/hl/cport.c
|
${XTOSKRNL_SOURCE_DIR}/hl/cport.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/hl/fbdev.c
|
${XTOSKRNL_SOURCE_DIR}/hl/fbdev.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/hl/globals.c
|
${XTOSKRNL_SOURCE_DIR}/hl/globals.c
|
||||||
|
${XTOSKRNL_SOURCE_DIR}/hl/init.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/hl/${ARCH}/cpu.c
|
${XTOSKRNL_SOURCE_DIR}/hl/${ARCH}/cpu.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/hl/${ARCH}/pic.c
|
${XTOSKRNL_SOURCE_DIR}/hl/${ARCH}/pic.c
|
||||||
${XTOSKRNL_SOURCE_DIR}/hl/${ARCH}/ioport.c
|
${XTOSKRNL_SOURCE_DIR}/hl/${ARCH}/ioport.c
|
||||||
|
34
xtoskrnl/hl/init.c
Normal file
34
xtoskrnl/hl/init.c
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/**
|
||||||
|
* PROJECT: ExectOS
|
||||||
|
* COPYRIGHT: See COPYING.md in the top level directory
|
||||||
|
* FILE: xtoskrnl/hl/init.c
|
||||||
|
* DESCRIPTION: Hardware layer initialization code
|
||||||
|
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <xtos.h>
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes the hardware layer subsystem
|
||||||
|
*
|
||||||
|
* @return This routine returns a status code.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTAPI
|
||||||
|
XTSTATUS
|
||||||
|
HlInitializeSystem(VOID)
|
||||||
|
{
|
||||||
|
XTSTATUS Status;
|
||||||
|
|
||||||
|
/* Initialize ACPI */
|
||||||
|
Status = HlpInitializeAcpi();
|
||||||
|
if(Status != STATUS_SUCCESS)
|
||||||
|
{
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return success */
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
@ -68,6 +68,10 @@ XTAPI
|
|||||||
VOID
|
VOID
|
||||||
HlInitializeProcessor();
|
HlInitializeProcessor();
|
||||||
|
|
||||||
|
XTAPI
|
||||||
|
XTSTATUS
|
||||||
|
HlInitializeSystem(VOID);
|
||||||
|
|
||||||
XTAPI
|
XTAPI
|
||||||
VOID
|
VOID
|
||||||
HlPutCharacter(IN ULONG PositionX,
|
HlPutCharacter(IN ULONG PositionX,
|
||||||
|
@ -20,6 +20,16 @@ XTAPI
|
|||||||
VOID
|
VOID
|
||||||
KepInitializeKernel(VOID)
|
KepInitializeKernel(VOID)
|
||||||
{
|
{
|
||||||
|
XTSTATUS Status;
|
||||||
|
|
||||||
|
/* Initialize hardware layer subsystem */
|
||||||
|
Status = HlInitializeSystem();
|
||||||
|
if(Status != STATUS_SUCCESS)
|
||||||
|
{
|
||||||
|
/* Hardware layer initialization failed, kernel panic */
|
||||||
|
DebugPrint(L"Failed to initialize hardware layer subsystem!\n");
|
||||||
|
KePanic(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,6 +20,16 @@ XTAPI
|
|||||||
VOID
|
VOID
|
||||||
KepInitializeKernel(VOID)
|
KepInitializeKernel(VOID)
|
||||||
{
|
{
|
||||||
|
XTSTATUS Status;
|
||||||
|
|
||||||
|
/* Initialize hardware layer subsystem */
|
||||||
|
Status = HlInitializeSystem();
|
||||||
|
if(Status != STATUS_SUCCESS)
|
||||||
|
{
|
||||||
|
/* Hardware layer initialization failed, kernel panic */
|
||||||
|
DebugPrint(L"Failed to initialize hardware layer subsystem!\n");
|
||||||
|
KePanic(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user