public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] Cannot access SerialPortPoll function
@ 2024-04-25  6:57 Ba Gia Bao Phan
  0 siblings, 0 replies; only message in thread
From: Ba Gia Bao Phan @ 2024-04-25  6:57 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 1642 bytes --]

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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118302): https://edk2.groups.io/g/devel/message/118302
Mute This Topic: https://groups.io/mt/105739991/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 2551 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-25 22:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-25  6:57 [edk2-devel] Cannot access SerialPortPoll function Ba Gia Bao Phan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox