mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-10-06 10:59:48 +08:00
bsps/shared/acpi: Use vprintk for AcpiOsPrintf
AcpiOsPrintf() and AcpiOsVprintf() used vprintf(), which relies on standard I/O and newlib reentrancy structures. When acpi_tables_initialize() is called from bsp_start(), the system has not completed initialization and no thread is executing yet. Calling vprintf() at this stage attempts to read libc_reent via a null pointer, which on x86_64 targets causes a triple fault crash during boot. Use vprintk() from <rtems/bspIo.h> instead of vprintf() to route ACPICA OSL output through the early polled kernel character device. Fixes #5751.
This commit is contained in:
committed by
Vijay Banerjee
parent
3e69272ae2
commit
9ecb715ab5
@@ -27,18 +27,18 @@
|
||||
|
||||
#include <acpi/acpica/acpi.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
void AcpiOsPrintf(const char* Format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, Format);
|
||||
vprintf(Format, ap);
|
||||
vprintk(Format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void AcpiOsVprintf(const char* Format, va_list Args)
|
||||
{
|
||||
vprintf(Format, Args);
|
||||
vprintk(Format, Args);
|
||||
}
|
||||
Reference in New Issue
Block a user