public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Benjamin Doron" <benjamin.doron00@gmail.com>
To: "Hsieh, PaytonX" <paytonx.hsieh@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix issues when MULTIPLE_DEBUG_PORT_SUPPORT is true
Date: Fri, 28 Apr 2023 09:54:05 -0400	[thread overview]
Message-ID: <117DD377-400D-435B-A8D0-EA7690363EC7@gmail.com> (raw)
In-Reply-To: <DM6PR11MB3803102CE98DEA6E538E3169FB6B9@DM6PR11MB3803.namprd11.prod.outlook.com>

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

Hi Payton,
Thanks for responding. I understand the idea of the patch, Gua described my idea better. I was thinking that there would be two library instances, BaseSerialPortLibHob.inf and DxeSerialPortLibHob.inf. BASE compiles only BaseSerialPortLibHob.c, and DXE compiles the BaseSerialPortLibHob.c and a small DxeSerialPortLibHob.c with the constructor and event for DXE. The idea is to have this improved behaviour with less code added.

I can implement and test the deduplication if you prefer.

Best regards,
Benjamin

On April 27, 2023 10:33:09 p.m. EDT, "Hsieh, PaytonX" <paytonx.hsieh@intel.com> wrote:
>Hi Benjamin,
>
>Due to some platform will disable the MMIO access of UART in ExitBootServices event.
>
>So we register an ExitBootServices event to avoid access the invalid MMIO space, it will cause the system hang when boot to windows OS.
>
>And the serial port library is also used in SEC and PEI phase, we will need another DXE library to avoid build error or possible system hang while the Boot Service is not available in PEI or SEC phase.
>
>From: Benjamin Doron <benjamin.doron00@gmail.com>
>Sent: Friday, April 28, 2023 1:36 AM
>To: Hsieh, PaytonX <paytonx.hsieh@intel.com>; devel@edk2.groups.io
>Subject: Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix issues when MULTIPLE_DEBUG_PORT_SUPPORT is true
>
>Hi,
>Can you deduplicate this code by moving the functions into a common, or "base" file, and DXE's constructor and event into a separate file? As I see it, it should be alright to reuse DXE's functions for other phases, the `mBaseSerialPortLibHobAtRuntime` variable will never be changed in this case.
>
>Regards,
>Benjamin

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

      reply	other threads:[~2023-04-28 13:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-27  6:13 [PATCH] UefiPayloadPkg: Fix issues when MULTIPLE_DEBUG_PORT_SUPPORT is true paytonx.hsieh
2023-04-27  6:17 ` Guo, Gua
2023-04-27 17:36 ` [edk2-devel] " Benjamin Doron
2023-04-27 22:38   ` Guo, Gua
2023-04-28  2:33   ` Hsieh, PaytonX
2023-04-28 13:54     ` Benjamin Doron [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=117DD377-400D-435B-A8D0-EA7690363EC7@gmail.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