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:
Yang Zhang
2026-09-16 14:00:59 +00:00
committed by Vijay Banerjee
parent 3e69272ae2
commit 9ecb715ab5
+3 -3
View File
@@ -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);
}