From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 29772941C4E for ; Thu, 25 Apr 2024 22:04:09 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ljCkeFB46znbFOmcuZnVl4c+gLLHr81gCWM6JEvE91w=; c=relaxed/simple; d=groups.io; h=MIME-Version:From:Date:Message-ID:Subject:To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240206; t=1714082648; v=1; b=ffuu5WmH1T2zZc8+OCwltrfPtKnTQwL8cyjZm59fPOIPFzyMM8SLKM/MXNKbT1LAbkM2y0RD Cvnj320norGcXyNaXgkatguXNUcd4ku0K/wQD29HA1DZTz+Uz7gF8/UeCiEzFir/9nDYwDL1GlZ EVSFY/pRHtomu1neVCqvm9eExbbzjZa+hQ2DrLC5u6I8cQfwLerbmJwYoX6mH2Iqg5I1Yv00WXI yGpQwc1Ugi1HIwzEC5llHP8cAJBr594tp7SL0MSiFxhNd2KzYLS/DBGwB01j0uYaR7i3atjUKR1 XHoiLuiQsD6MIU3b9nol36mywdHxAlfUnybeqaq/BzEMA== X-Received: by 127.0.0.2 with SMTP id YiHdYY7687511xUd7koBu968; Thu, 25 Apr 2024 15:04:08 -0700 X-Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by mx.groups.io with SMTP id smtpd.web11.11206.1714028286452860852 for ; Wed, 24 Apr 2024 23:58:06 -0700 X-Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-51967f75729so686642e87.0 for ; Wed, 24 Apr 2024 23:58:06 -0700 (PDT) X-Gm-Message-State: Qe00eRZo7b843N5lwKG1R9L4x7686176AA= X-Google-Smtp-Source: AGHT+IEjxQG7L5ohq+YLxwduCcRAPBtjdePBEblpgjGvEkT94UG931tAlVXKiwNIroubhmcqdaeZ7jhs9HqamN94LMU= X-Received: by 2002:a05:6512:239f:b0:51b:223f:ac47 with SMTP id c31-20020a056512239f00b0051b223fac47mr4221147lfv.41.1714028283660; Wed, 24 Apr 2024 23:58:03 -0700 (PDT) MIME-Version: 1.0 From: Ba Gia Bao Phan Date: Thu, 25 Apr 2024 08:57:52 +0200 Message-ID: Subject: [edk2-devel] Cannot access SerialPortPoll function To: devel@edk2.groups.io Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Thu, 25 Apr 2024 15:04:07 -0700 Resent-From: phanbagiabao2001@gmail.com Reply-To: devel@edk2.groups.io,phanbagiabao2001@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: multipart/alternative; boundary="000000000000fb924a0616e64e19" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=ffuu5WmH; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --000000000000fb924a0616e64e19 Content-Type: text/plain; charset="UTF-8" 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] -=-=-=-=-=-=-=-=-=-=-=- --000000000000fb924a0616e64e19 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Everyone,

I'm work= ing on a project with edk2, and these guys are trying to port edk2 to STM32= MP25 platforms. I have a problem with the module SerialPortLib, specificall= y the function SerialPortPoll. I made a test that adds a line of deb= ug in this function and adds a MmioWrite8 to a forbidden address=C2=A0 of m= y platform but I don't see anything. This demonstrates that I cannot ac= cess this function (this function is not loaded). Do you know why and how t= o solve this?

Here is my function SerialPortPoll
BOOLEAN
EFIAPI
SerialPortPoll (
=C2=A0 VOI= D
=C2=A0 )
{
=C2=A0 DEBUG ((DEBUG_INFO, "In SerialPortPolllll= lllllllllllllllllllllllllll\n"));
=C2=A0 MmioWrite8(0x80000000, 0xf= f);
=C2=A0 return FALSE;
}

And here i= s my function SerialPortWrite that works well because I can see the boot lo= g message
UINTN
EFIAPI
SerialPortWrite (
=C2=A0 IN UINT8= =C2=A0 =C2=A0 *Buffer,
=C2=A0 IN UINTN =C2=A0 =C2=A0 NumberOfBytes
)=
{
=C2=A0 UINT8 *CONST =C2=A0Final =3D &Buffer[NumberOfBytes];=C2=A0 while (Buffer < Final) {
=C2=A0 =C2=A0 // Wait until UART abl= e to accept another char
=C2=A0 =C2=A0 while (!(MmioRead32 (USART2_BASE = + R_UART_ISR) & (1<<7))) {
=C2=A0 =C2=A0 }
=C2=A0 =C2=A0 Mm= ioWrite8 (USART2_BASE + R_UART_TDR, *Buffer++);
=C2=A0 }
=C2=A0 DEBUG= ((DEBUG_INFO, "end SerialPortWriteeeeeeeeeeeeeeeee\n"));

= =C2=A0 return NumberOfBytes;
}

Thanks
= --
PHAN Ba Gia Bao
Etudiant en 5A STI - INSA Centre Val de Loire
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#118302) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--000000000000fb924a0616e64e19--