forked from xt-sys/exectos
Implement HlClearInterruptFlag() and HlSetInterruptFlag() intrinsic routines
This commit is contained in:
parent
8f3a4aef60
commit
5b75d005a7
@ -18,6 +18,10 @@
|
|||||||
extern ULONG ComPortAddress[];
|
extern ULONG ComPortAddress[];
|
||||||
|
|
||||||
/* HAL library routines forward references */
|
/* HAL library routines forward references */
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlClearInterruptFlag();
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
HlCpuId(IN OUT PCPUID_REGISTERS Registers);
|
HlCpuId(IN OUT PCPUID_REGISTERS Registers);
|
||||||
@ -39,6 +43,10 @@ XTCDECL
|
|||||||
ULONG_PTR
|
ULONG_PTR
|
||||||
HlReadControlRegister(IN USHORT ControlRegister);
|
HlReadControlRegister(IN USHORT ControlRegister);
|
||||||
|
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlSetInterruptFlag();
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
VOID
|
VOID
|
||||||
HlWriteControlRegister(IN USHORT ControlRegister,
|
HlWriteControlRegister(IN USHORT ControlRegister,
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
extern ULONG ComPortAddress[];
|
extern ULONG ComPortAddress[];
|
||||||
|
|
||||||
/* HAL library routines forward references */
|
/* HAL library routines forward references */
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlClearInterruptFlag();
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
HlCpuId(IN OUT PCPUID_REGISTERS Registers);
|
HlCpuId(IN OUT PCPUID_REGISTERS Registers);
|
||||||
@ -39,6 +43,10 @@ XTCDECL
|
|||||||
ULONG_PTR
|
ULONG_PTR
|
||||||
HlReadControlRegister(IN USHORT ControlRegister);
|
HlReadControlRegister(IN USHORT ControlRegister);
|
||||||
|
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlSetInterruptFlag();
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
VOID
|
VOID
|
||||||
HlWriteControlRegister(IN USHORT ControlRegister,
|
HlWriteControlRegister(IN USHORT ControlRegister,
|
||||||
|
@ -380,6 +380,7 @@ BlStartNewStack()
|
|||||||
|
|
||||||
/* Infinite bootloader loop */
|
/* Infinite bootloader loop */
|
||||||
BlEfiPrint(L"System halted!");
|
BlEfiPrint(L"System halted!");
|
||||||
|
HlClearInterruptFlag();
|
||||||
HlHalt();
|
HlHalt();
|
||||||
|
|
||||||
/* Return success */
|
/* Return success */
|
||||||
@ -461,6 +462,7 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle,
|
|||||||
/* Infinite bootloader loop */
|
/* Infinite bootloader loop */
|
||||||
BlDbgPrint(L"ERROR: Unexpected exception occurred, probably did not create a new stack\n");
|
BlDbgPrint(L"ERROR: Unexpected exception occurred, probably did not create a new stack\n");
|
||||||
BlEfiPrint(L"System halted!");
|
BlEfiPrint(L"System halted!");
|
||||||
|
HlClearInterruptFlag();
|
||||||
HlHalt();
|
HlHalt();
|
||||||
|
|
||||||
/* Return success */
|
/* Return success */
|
||||||
|
@ -9,6 +9,20 @@
|
|||||||
#include "xtkmapi.h"
|
#include "xtkmapi.h"
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instructs the processor to clear the interrupt flag.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlClearInterruptFlag()
|
||||||
|
{
|
||||||
|
asm volatile("cli");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a various amount of information about the CPU.
|
* Retrieves a various amount of information about the CPU.
|
||||||
*
|
*
|
||||||
@ -176,6 +190,20 @@ HlReadControlRegister(IN USHORT ControlRegister)
|
|||||||
return Value;
|
return Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instructs the processor to set the interrupt flag.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlSetInterruptFlag()
|
||||||
|
{
|
||||||
|
asm volatile("sti");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes a value to the specified CPU control register.
|
* Writes a value to the specified CPU control register.
|
||||||
*
|
*
|
||||||
|
@ -9,6 +9,20 @@
|
|||||||
#include "xtkmapi.h"
|
#include "xtkmapi.h"
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instructs the processor to clear the interrupt flag.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlClearInterruptFlag()
|
||||||
|
{
|
||||||
|
asm volatile("cli");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a various amount of information about the CPU.
|
* Retrieves a various amount of information about the CPU.
|
||||||
*
|
*
|
||||||
@ -170,6 +184,20 @@ HlReadControlRegister(IN USHORT ControlRegister)
|
|||||||
return Value;
|
return Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instructs the processor to set the interrupt flag.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlSetInterruptFlag()
|
||||||
|
{
|
||||||
|
asm volatile("sti");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes a value to the specified CPU control register.
|
* Writes a value to the specified CPU control register.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user