From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [edk2-platforms][PATCH 1/1] Platform/RaspberryPi: Fix mini UART baud divisor calculation To: Pete Batard ,devel@edk2.groups.io From: =?UTF-8?B?TWFyaW8gQsSDbMSDbmljxIM=?= X-Originating-Location: Braila, RO (188.24.254.88) X-Originating-Platform: Windows Chrome 89 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Sat, 03 Apr 2021 08:17:07 -0700 References: <6ebf4605-b011-a430-968b-d0f85cf91769@akeo.ie> In-Reply-To: <6ebf4605-b011-a430-968b-d0f85cf91769@akeo.ie> Message-ID: <31669.1617463027621445802@groups.io> Content-Type: multipart/alternative; boundary="77MdYfsGLcEotooqM5I9" --77MdYfsGLcEotooqM5I9 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Pete, I've submitted this patch because the mini UART serial console produces ga= rbage since UEFI v1.25 (due to the wrong baud rate). It has been tested on the firmware shipped with UEFI v1.24 and it works fi= ne. I don't see any reason to test it on older versions than this. The core clock is not fixed. I've made PcdSerialClockRate patchable here: >=20 > @@ -465,6 +464,9 @@ [PcdsFixedAtBuild.common] > gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"EDK2" > gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE >=20 > +[PcdsPatchableInModule] > + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|500000000 > + >=20 500 MHz is the default clock rate (assuming it hasn't been changed in conf= ig.txt). The PCD gets patched in both the PEI and DXE phases to the value read from= mailbox. --77MdYfsGLcEotooqM5I9 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Pete,

I've submitted this patch because the mini UART serial = console produces garbage since UEFI v1.25 (due to the wrong baud rate).&nbs= p;
It has been tested on the firmware shipped with UEFI v1.24 and it w= orks fine. I don't see any reason to test it on older versions than this.
The core clock is not fixed. I've made PcdSerialClockRate patchab= le here:
@@ -465,6 +464,9 @@ [Pc= dsFixedAtBuild.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmware= Vendor|L"EDK2"
gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TR= UE

+[PcdsPatchableInModule]=
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|500000000
+
500 MHz is the default clock rate (assuming it hasn't been changed in conf= ig.txt).
The PCD gets patched in both the PEI and DXE phases to the v= alue read from mailbox.  --77MdYfsGLcEotooqM5I9--