mirror of https://github.com/wolfSSL/wolfBoot.git
x86: use hlt instruction in panic()
parent
fdcb83fe38
commit
d89b44e0f1
|
@ -51,6 +51,11 @@
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void hlt()
|
||||||
|
{
|
||||||
|
__asm__ ("hlt");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Memory-mapped write access to a 32-bit register.
|
* @brief Memory-mapped write access to a 32-bit register.
|
||||||
*
|
*
|
||||||
|
@ -265,9 +270,7 @@ void delay(int msec)
|
||||||
*/
|
*/
|
||||||
void panic()
|
void panic()
|
||||||
{
|
{
|
||||||
while (1) {
|
hlt();
|
||||||
delay(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue