From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mx.groups.io with SMTP id smtpd.web11.11845.1677753306142977383 for ; Thu, 02 Mar 2023 02:35:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=UznzluSw; spf=pass (domain: ventanamicro.com, ip: 209.85.216.52, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pj1-f52.google.com with SMTP id kb15so16397280pjb.1 for ; Thu, 02 Mar 2023 02:35:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fEr50ZHK3/05ZmEQZiwPZCVh6MtVKKh4gRDWYDhqtk8=; b=UznzluSwvPz2+4TG4F3mExBURxGhfcarNOKBkYxTHY54G+WDWDnq02cmqWqDIbuQMx qORdGCERr2ZC7KUQUe9F4DnrOSTXc2Mhfv4xu7HJgJByvwIF/ThCl3TyZq+qnN3y1tCl V7PpbDOgPjTf5r4uA5ofX2C5eDmzcPScZZtD/of46vyjuyOAUxwfVILuzNyznStwmjnT AtX+Of5i1V/O7fvCTN6EVAIfDo62gLd+UBmnqz7DhvGgvS0RYU7URoFy/E2BbawQ+rNy esmdTunM0ecx/KUgC1FeqfjAQIIckAXaXe2OxbsFZduufOqZE3aOC+GpILaPmM7yvPcg LJ3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fEr50ZHK3/05ZmEQZiwPZCVh6MtVKKh4gRDWYDhqtk8=; b=zFYNvGF//ph5QUYaXENsCp6VYuQREO0/mPa4GKnPFrFSVJua+98Cb6waVuwBQQuD4B +6UAM3k7QiDKuuTly+vsCMgvS7i7YAoKhOfPP7wpa8GRm1lYb6jHpCURcYLJQ+8XgAA4 xHIPVefjSJOIUudwPE7Zr7aIm57/a7YJee9IvWRepuGuPjK6OMRYZqRl/VQg7ZI4ivBM 0Ao6IB2ivzRGVfmnPI8MWHF7XJgefRiC1V2hvQjYSdMZ3EJJTSqZhpp3cME8vVy+4IJg b73LQGAY/PE1euBBX8ZOHlLxI5SP8Ra04uD5OZlIaO/0F3pPb4j/v4cOwe/IGWOjKAih BfHg== X-Gm-Message-State: AO0yUKUCEmv4ekwvJFxuCibBFPlIH4p3TD5GmswSCCvF5QHGghurTRj1 1KYGIvehLptH8CNkuqUf+//p1wVlgY8gEPkb X-Google-Smtp-Source: AK7set+wMEnaaY+vYU212LBAjE1BB/eZW83sWUTjMnBdiHzI/TXEMkhLKJcKylWyT9ne5RdEP4krGQ== X-Received: by 2002:a17:902:d2c7:b0:19c:fbdb:43cb with SMTP id n7-20020a170902d2c700b0019cfbdb43cbmr12363496plc.51.1677753305413; Thu, 02 Mar 2023 02:35:05 -0800 (PST) Return-Path: Received: from sunil-laptop ([49.206.14.226]) by smtp.gmail.com with ESMTPSA id ik6-20020a170902ab0600b0019cb4166266sm10019270plb.83.2023.03.02.02.35.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 02:35:05 -0800 (PST) Date: Thu, 2 Mar 2023 16:04:59 +0530 From: "Sunil V L" To: devel@edk2.groups.io, andrei.warkentin@intel.com Cc: "Kinney, Michael D" , "kraxel@redhat.com" , Daniel Schaefer Subject: Re: [edk2-devel] [edk2 2/2] MdePkg: add BaseSerialPortLibRiscVSbi Message-ID: References: <20230301074358.26356-1-andrei.warkentin@intel.com> <20230301074358.26356-3-andrei.warkentin@intel.com> <20230301081332.lzb5v7enjfillnfb@sirius.home.kraxel.org> <20230301090704.essvs54b2glrsjmd@sirius.home.kraxel.org> MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Andrei, It is not just mLastGetChar but mHaveDbcn also will have the same issue with XIP. So, I am wondering why not probe for the extension in every write for the SecPei case? I understand the performance concerns but does it really matter for debug output? I believe it is minor compared to the flexibility it provides for not having a fixed serial port implementation. Thanks, Sunil On Wed, Mar 01, 2023 at 05:56:36PM +0000, Andrei Warkentin wrote: > Thanks... let me go a different route. > > I'll have 1 more variant that can be used in classical SEC and PEI - only capable of output (input doesn't matter) and rename the one I already shared. I'll name these SecPeiSerialPortLibRiscVSbi and PrePiDxeSerialPortLibRiscVSbi, respectively. > > Does this sound acceptable? > > -----Original Message----- > From: Kinney, Michael D > Sent: Wednesday, March 1, 2023 11:51 AM > To: Warkentin, Andrei ; devel@edk2.groups.io; kraxel@redhat.com > Cc: Daniel Schaefer ; Sunil V L ; Kinney, Michael D > Subject: RE: [edk2-devel] [edk2 2/2] MdePkg: add BaseSerialPortLibRiscVSbi > > If a dependency on MdePkg\Include\Library\ BaseRiscVSbiLib.h and SBI services assumed memory is available and code loaded is loaded into RAM and not XIP, then BASE is ok for this component. > > You may want to make sure the library class header file and INF file header for BaseRiscVSbiLib describe that environment assumption and the INF for BaseSerialPortLibRiscVSbi also describes that environment assumption. > > Mike > > > -----Original Message----- > > From: Warkentin, Andrei > > Sent: Wednesday, March 1, 2023 9:26 AM > > To: Kinney, Michael D ; > > devel@edk2.groups.io; kraxel@redhat.com > > Cc: Daniel Schaefer ; Sunil V L > > > > Subject: RE: [edk2-devel] [edk2 2/2] MdePkg: add > > BaseSerialPortLibRiscVSbi > > > > Hi Michael, > > > > What module type should I use instead? The reason being this > > SerialPortLib implementation specifically fits into the class of UEFI > > implementations, where RAM is always available (initialized by something else prior to Tiano) and non-const globals can be used (e.g. PrePi). > > > > A > > > > -----Original Message----- > > From: Kinney, Michael D > > Sent: Wednesday, March 1, 2023 10:56 AM > > To: devel@edk2.groups.io; kraxel@redhat.com; Warkentin, Andrei > > > > Cc: Daniel Schaefer ; Sunil V L > > ; Kinney, Michael D > > > > Subject: RE: [edk2-devel] [edk2 2/2] MdePkg: add > > BaseSerialPortLibRiscVSbi > > > > Using a global is not compatible with XIP code where only const globals are supported. > > > > A module of type BASE is considered compatible with XIP components. > > > > > > Mike > > > > > -----Original Message----- > > > From: devel@edk2.groups.io On Behalf Of Gerd > > > Hoffmann > > > Sent: Wednesday, March 1, 2023 1:07 AM > > > To: Warkentin, Andrei > > > Cc: devel@edk2.groups.io; Daniel Schaefer ; > > > Sunil V L > > > Subject: Re: [edk2-devel] [edk2 2/2] MdePkg: add > > > BaseSerialPortLibRiscVSbi > > > > > > On Wed, Mar 01, 2023 at 08:50:38AM +0000, Warkentin, Andrei wrote: > > > > The library caller could call Poll() first, > > > > > > Ah, Poll is part of the library API, not just an internal helper. > > > Ok, makes sense then. > > > > > > series: > > > Acked-by: Gerd Hoffmann > > > > > > take care, > > > Gerd > > > > > > > > > > > > > > > > > > > > >