From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) by mx.groups.io with SMTP id smtpd.web10.20427.1682690049664326176 for ; Fri, 28 Apr 2023 06:54:09 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gmail.com header.s=20221208 header.b=WHST0g91; spf=pass (domain: gmail.com, ip: 209.85.160.179, mailfrom: benjamin.doron00@gmail.com) Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-3ef112cac17so45627451cf.0 for ; Fri, 28 Apr 2023 06:54:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682690048; x=1685282048; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:to:from:date:from:to:cc:subject:date:message-id :reply-to; bh=l6LXgslwD82fekE776l6yx3u9Mu1A58HybV6BJDXgYo=; b=WHST0g91q8eOJTmDMqfyv+77OHI0QSrxf7mE9YQOOMlleAF6oj3PnyqT2dnsjtZxr+ 03SBmzDsVhaH1GWzla/+iE9e1WJYmqDUyVrUKWoHPLqR4c2D6APhetwIxl4wqR7DZVHJ BUmu4Vbc/pEOJmIkTVwntfN44oq5l6vNJUYgPztDAf9HjFwptcV7DldrSHR7tKYj4N21 dVadBmiaQRhhiVQR2oILMrKTsbTS+E6ndYcKop8VsujCDyho6Y8m4u7EP44GYWYwhPMF UAf822JjnmVzmZJG67HvbbRWUwJO/xgNyJinZ7MBxARrAVaSeUfTvVZi0WaQtJSLO5UG G9JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682690048; x=1685282048; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l6LXgslwD82fekE776l6yx3u9Mu1A58HybV6BJDXgYo=; b=MdCZSP+RS4P7I2rlDnTam5p2lJRweN2XYtr5yZi4p40YzjV0JXeygUnfKRivw+RXAG p0VqpWcsQ6Iay42/QcRVUxqpoXix6d7RuSqy+Cnd6zQv8JrWEdSYKVKfRr/bwHNhqowf ylj/umuxKTv0x/BOiE0YvxHK9fWQZUD5L1nvKDMbWmPK7sM1uQFZANB2imC271E9OL1r gbVD4x0lyq5vBcN3NwiZyFusGfTb6M+PLoCQ0YGarPggONm9v4H+mg49aPIBo6m4h56W 9Wpev4mRVMeSWaBgnvgOf1C8AotkSIPjLtBnCtj1ENBmaj+PaF1T5rHRkD4y+quztFlA omMg== X-Gm-Message-State: AC+VfDzXBgIpUP2adjuCqBu50NebPo71OwQIvCqMc9N1FCmthDHhZbus leTxygPNYZbOV1y+N8Y2PAs= X-Google-Smtp-Source: ACHHUZ5ZPQf7o2IKFdkI/Rkai6e51w0FjsRf1Y+jQJPpr/29lS9+f8JieJ5zbhY6zQMsm4XnWPf2xg== X-Received: by 2002:a05:622a:28b:b0:3e3:8bbc:d152 with SMTP id z11-20020a05622a028b00b003e38bbcd152mr9088957qtw.66.1682690048559; Fri, 28 Apr 2023 06:54:08 -0700 (PDT) Return-Path: Received: from ?IPv6:::1? ([2607:f2c0:e98c:e:70d6:b2cd:ea58:aed]) by smtp.gmail.com with ESMTPSA id m21-20020a05620a221500b0074df51a90b6sm6712982qkh.60.2023.04.28.06.54.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Apr 2023 06:54:08 -0700 (PDT) Date: Fri, 28 Apr 2023 09:54:05 -0400 From: "Benjamin Doron" To: "Hsieh, PaytonX" , "devel@edk2.groups.io" Subject: Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix issues when MULTIPLE_DEBUG_PORT_SUPPORT is true In-Reply-To: References: <88c2cfeb4dc16d4ae1ee934d79085ee8538ff404.1682571439.git.paytonx.hsieh@intel.com> <8437.1682616986321607120@groups.io> Message-ID: <117DD377-400D-435B-A8D0-EA7690363EC7@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----2A7P5ZQ4WPCZGGML9U8Y2EX84QJNY5 Content-Transfer-Encoding: 7bit ------2A7P5ZQ4WPCZGGML9U8Y2EX84QJNY5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Payton, Thanks for responding=2E I understand the idea of the patch, Gua described= my idea better=2E I was thinking that there would be two library instances= , BaseSerialPortLibHob=2Einf and DxeSerialPortLibHob=2Einf=2E BASE compiles= only BaseSerialPortLibHob=2Ec, and DXE compiles the BaseSerialPortLibHob= =2Ec and a small DxeSerialPortLibHob=2Ec with the constructor and event for= DXE=2E The idea is to have this improved behaviour with less code added=2E I can implement and test the deduplication if you prefer=2E Best regards, Benjamin On April 27, 2023 10:33:09 p=2Em=2E EDT, "Hsieh, PaytonX" wrote: >Hi Benjamin, > >Due to some platform will disable the MMIO access of UART in ExitBootServ= ices event=2E > >So we register an ExitBootServices event to avoid access the invalid MMIO= space, it will cause the system hang when boot to windows OS=2E > >And the serial port library is also used in SEC and PEI phase, we will ne= ed another DXE library to avoid build error or possible system hang while t= he Boot Service is not available in PEI or SEC phase=2E > >From: Benjamin Doron >Sent: Friday, April 28, 2023 1:36 AM >To: Hsieh, PaytonX ; devel@edk2=2Egroups=2Ei= o >Subject: Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix issues when MULTIPL= E_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 `mB= aseSerialPortLibHobAtRuntime` variable will never be changed in this case= =2E > >Regards, >Benjamin ------2A7P5ZQ4WPCZGGML9U8Y2EX84QJNY5 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi Payton,
Thanks for responding=2E I und= erstand the idea of the patch, Gua described my idea better=2E I was thinki= ng that there would be two library instances, BaseSerialPortLibHob=2Einf an= d DxeSerialPortLibHob=2Einf=2E BASE compiles only BaseSerialPortLibHob=2Ec,= and DXE compiles the BaseSerialPortLibHob=2Ec and a small DxeSerialPortLib= Hob=2Ec with the constructor and event for DXE=2E The idea is to have this = improved behaviour with less code added=2E

I can implement and test = the deduplication if you prefer=2E

Best regards,=
Benjamin


On A= pril 27, 2023 10:33:09 p=2Em=2E EDT, "Hsieh, PaytonX" <paytonx=2Ehsieh@i= ntel=2Ecom> wrote:

Hi Benjamin,

 

Due to some platform will disable the MMIO access o= f UART in ExitBootServices event=2E

 

So we register an ExitBootServices event to avoid a= ccess the invalid MMIO space, it will cause the system hang when boot to wi= ndows OS=2E  

 

And the serial port library is also used in SEC and= PEI phase, we will need another DXE library to avoid build error or possib= le system hang while the Boot Service is not available in PEI or SEC phase= =2E

 

From: Benjamin Doron <benjamin=2Edoron00@= gmail=2Ecom>
Sent: Friday, April 28, 2023 1:36 AM
To: Hsieh, PaytonX <paytonx=2Ehsieh@intel=2Ecom>; devel@edk2= =2Egroups=2Eio
Subject: Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix issues when M= ULTIPLE_DEBUG_PORT_SUPPORT is true

 

Hi,
Can you deduplicate this code by moving the functions into a common, or "b= ase" file, and DXE's constructor and event into a separate file? As I see i= t, it should be alright to reuse DXE's functions for other phases, the `mBa= seSerialPortLibHobAtRuntime` variable will never be changed in this case=2E

Regards,
Benjamin

------2A7P5ZQ4WPCZGGML9U8Y2EX84QJNY5--