Hello Everyone,
I'm working on a project with edk2, and these guys are trying to port edk2 to STM32MP25 platforms. I have a problem with the module SerialPortLib, specifically the function SerialPortPoll. I made a test that adds a line of debug in this function and adds a MmioWrite8 to a forbidden address of my platform but I don't see anything. This demonstrates that I cannot access this function (this function is not loaded). Do you know why and how to solve this?
Here is my function SerialPortPoll
BOOLEAN
EFIAPI
SerialPortPoll (
VOID
)
{
DEBUG ((DEBUG_INFO, "In SerialPortPollllllllllllllllllllllllllllllll\n"));
MmioWrite8(0x80000000, 0xff);
return FALSE;
}
And here is my function SerialPortWrite that works well because I can see the boot log message
UINTN
EFIAPI
SerialPortWrite (
IN UINT8 *Buffer,
IN UINTN NumberOfBytes
)
{
UINT8 *CONST Final = &Buffer[NumberOfBytes];
while (Buffer < Final) {
// Wait until UART able to accept another char
while (!(MmioRead32 (USART2_BASE + R_UART_ISR) & (1<<7))) {
}
MmioWrite8 (USART2_BASE + R_UART_TDR, *Buffer++);
}
DEBUG ((DEBUG_INFO, "end SerialPortWriteeeeeeeeeeeeeeeee\n"));
return NumberOfBytes;
}
Thanks
-- PHAN Ba Gia Bao
Etudiant en 5A STI - INSA Centre Val de Loire