public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Pete Batard" <pete@akeo.ie>
To: "Mario Bălănică" <mariobalanica02@gmail.com>, devel@edk2.groups.io
Subject: Re: [edk2-devel] [edk2-platforms][PATCH 1/1] Platform/RaspberryPi: Fix mini UART baud divisor calculation
Date: Tue, 6 Apr 2021 12:48:10 +0100	[thread overview]
Message-ID: <684c555d-9c43-38d5-188d-1abb360029ec@akeo.ie> (raw)
In-Reply-To: <31669.1617489948158034796@groups.io>

Hi Mario,

Please re-send a v2 with a commit message that explains the issue that 
is being fixed. Thanks.

For the record, I ran some tests that show that the divisor was changed 
from 1 to 2 with the latest Pi Foundation firmware (which is confirmed 
by the fact that if you switch your baudrate from 115200 to 57600, 
you'll get the expected output).

I'm not sure what game the Pi Foundation are playing at this stage, coz 
they sure don't seem to be following any official logic with how they 
actually set the serial clock, and our attempts at second guessing that 
logic are no longer working. So I guess the best we can do is go with 
whatever gets us output for the latest firmware, and hope they're not 
going to break that anytime soon (which is still better than the TF-A 
approach, where they got so fed up with this cat and mouse game that 
they dropped UART initialization altogether [1])

Regards,

/Pete

[1] 
https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/plat/rpi?h=v2.3&id=0eda713b9bd65222155900aacf3a67805351f88f

On 2021.04.03 23:45, Mario Bălănică wrote:
> Okay, I've tested the patch with the firmware from the commit mentioned 
> above and it doesn't work. The VPU clock divisor bit needs 
> PcdSerialClockRate to be set to 1 GHz (so that the quotient becomes 
> equal to the core clock).
> 
> The mailbox on the other hand always returns 200 MHz for the core clock. 
> This is definitely a bug, which got fixed it in a later commit.
> 
> There isn't any reliable way to support the firmwares with a broken 
> mailbox interface as well in this case, and I really doubt anyone would 
> want to use them with the UEFI in the first place. Your build scripts 
> always include the latest version.
> 
> I can resend the patch with a more detailed commit message if you wish.


      reply	other threads:[~2021-04-06 11:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02 17:51 [edk2-platforms][PATCH 1/1] Platform/RaspberryPi: Fix mini UART baud divisor calculation Mario Bălănică
2021-04-03  7:36 ` Ard Biesheuvel
2021-04-03 12:47   ` Mario Bălănică
2021-04-03 14:35     ` Pete Batard
2021-04-03 15:17       ` [edk2-devel] " Mario Bălănică
2021-04-03 16:01         ` Pete Batard
2021-04-03 16:15           ` Mario Bălănică
2021-04-03 16:48             ` Pete Batard
2021-04-03 16:55               ` Mario Bălănică
2021-04-03 17:32                 ` Mario Bălănică
2021-04-03 18:11                 ` Pete Batard
2021-04-03 22:45                   ` Mario Bălănică
2021-04-06 11:48                     ` Pete Batard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=684c555d-9c43-38d5-188d-1abb360029ec@akeo.ie \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox