From: Haojian Zhuang <haojian.zhuang@linaro.org>
To: Leif Lindholm <leif.lindholm@linaro.org>,
Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [PATCH edk2-platforms v4 2/6] Platform/HiKey960: do basic initialization
Date: Wed, 23 May 2018 07:14:18 +0000 [thread overview]
Message-ID: <CY1PR15MB073032F2282967B1CBF41450976B0@CY1PR15MB0730.namprd15.prod.outlook.com> (raw)
In-Reply-To: <20180521094155.cpufarav5f6kqcfu@bivouac.eciton.net>
>> +STATIC
>> +VOID
>> +OnEndOfDxe (
>> + IN EFI_EVENT Event,
>> + IN VOID *Context
>> + )
>> +{
>> + UINT32 BootMode;
>> +
>> + BootMode = MmioRead32 (SCTRL_BAK_DATA0) & BOOT_MODE_MASK;
>> + if (BootMode == BOOT_MODE_RECOVERY) {
>> + SerialPortWrite ((UINT8 *)"WARNING: CAN NOT BOOT KERNEL IN RECOVERY MODE!\r\n", 48);
>> + SerialPortWrite ((UINT8 *)"Switch to normal boot mode, then reboot to boot kernel.\r\n", 57);
>
> I commented on v1:
> ---
> 1) Why this use of SerialPortWrite instead of Print?
> 2) This cast to (UINT8 *) works by accident. Please don't do this.
> 3) Please _never_ use hand-coded values for compile-time determined
> (and known) information. In this case the output string length.
> ---
> Please change to Print().
>
I can't use Print() at here since console isn't ready. The OnEndOfDxe() is executed
before console ready. SerialPortWrite () is the only choice to me.
I'll fix other issues with comments.
Best Regards
Haojian
next prev parent reply other threads:[~2018-05-23 7:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 4:34 [PATCH v4 0/6] enable virtual keyboard Haojian Zhuang
2018-05-14 4:34 ` [PATCH edk2-platforms v4 1/6] Platform/Hisilicon/HiKey960: add gpio platform driver Haojian Zhuang
2018-05-21 9:26 ` Leif Lindholm
2018-05-14 4:34 ` [PATCH edk2-platforms v4 2/6] Platform/HiKey960: do basic initialization Haojian Zhuang
2018-05-21 9:41 ` Leif Lindholm
2018-05-23 7:14 ` Haojian Zhuang [this message]
2018-05-14 4:34 ` [PATCH edk2-platforms v4 3/6] Platform/HiKey960: enable virtual keyboard Haojian Zhuang
2018-05-21 9:48 ` Leif Lindholm
2018-05-14 4:34 ` [PATCH edk2-platforms v4 4/6] Platform/Hisilicon/HiKey: add gpio platform driver Haojian Zhuang
2018-05-21 9:48 ` Leif Lindholm
2018-05-14 4:34 ` [PATCH edk2-platforms v4 5/6] Platform/HiKey: do basic initialization on hikey Haojian Zhuang
2018-05-21 9:54 ` Leif Lindholm
2018-05-14 4:34 ` [PATCH edk2-platforms v4 6/6] Platform/HiKey: enable virtual keyboard Haojian Zhuang
2018-05-21 9:55 ` Leif Lindholm
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=CY1PR15MB073032F2282967B1CBF41450976B0@CY1PR15MB0730.namprd15.prod.outlook.com \
--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