From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by mx.groups.io with SMTP id smtpd.web10.5574.1585646551005248205 for ; Tue, 31 Mar 2020 02:22:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=kYR7g8vV; spf=pass (domain: nuviainc.com, ip: 209.85.221.65, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f65.google.com with SMTP id a25so25020764wrd.0 for ; Tue, 31 Mar 2020 02:22:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wDTFy98ySo1UGaAAe0nYr9UbtRKvebCMhieRGeqkY7Y=; b=kYR7g8vVjV/UnpqwLNsMzNRg34MP09pXtb4WKNeXwajbnYA4amnlwVlZR/Y366taPY X/RjjCkDnf1yKcvRIJLTexcWQxJDil/pb/cw5XZvR+nZitBQ3u1/xskMEulHOPCDINem oq2sJYmxEpxYUIVN0/6pqY4s6b8tonm3wz3IJmfXnFDyfG2e6UefBpDz3Pbm528vs9HK Ix7Ux024ABZpcfcRBqbTX0SLxdHSax0gGF8k2e49kwP8kNWBFl1PvYaY0E1/DhI0nx4v QBNZauF9FqC92oLOy6G4CJl/mT8fT0R2QV6yahnmlRjf2XcS0TXb7raU5jyQq1HHr/2K RIGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wDTFy98ySo1UGaAAe0nYr9UbtRKvebCMhieRGeqkY7Y=; b=lN3nNcJOR7avw7JyLjamB504ikdizhDr2Dzr6NFjUbtkzsG/MhxOYY6GIFeaGPf3CO xmOv+rHMxOJgvR/b3RaZSjGngtqSw2g/CFsBhDAyQ9tXcBbdA5SdxZWFkDMyFyWjGPxN H1px1mxgWLPIXPGfFQ5H4tPsUH4iIhehvX8KAIn0HIJnQwKSk25zMgWS/ZdUWp5Z2qnE gY9/yXIQNq9vEjru5YVFS08oROnRxSTebw13RbLIm9qGqOy50nAxwvIP23XOaObsXbEj MpFsAYp/5kC7ZjpHMwJQbSFYLlRvfpLikK9UiDQao0t9Gz+o7SwyZxyQQX4QJhtXoYKt 2kVg== X-Gm-Message-State: ANhLgQ2vgkLcXXAI2Ad/8g76ZsrDfibtTay2XFzspRoOmLKuevWvm/TG dRcf7qFoRwA9oI4HujS29CWWOg== X-Google-Smtp-Source: ADFU+vszlgQY+cNaRgazHcrhjFRYPTODWasChmjse8hwHWDX1fNKH1NqtDaBjNVwgE8W3I64NIV7HA== X-Received: by 2002:adf:dcc2:: with SMTP id x2mr18573618wrm.192.1585646549379; Tue, 31 Mar 2020 02:22:29 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id f1sm26849842wrv.37.2020.03.31.02.22.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2020 02:22:28 -0700 (PDT) Date: Tue, 31 Mar 2020 10:22:26 +0100 From: "Leif Lindholm" To: "Ni, Ray" Cc: Ard Biesheuvel , "Jiang, Guomin" , "devel@edk2.groups.io" , Andrew Fish , Laszlo Ersek , Michael D Kinney Subject: Re: [edk2-devel] API breakages and their implications. Was: [PATCH 1/1] MdeModulePkg: UART Dynamic clock freq Support Message-ID: <20200331092226.GB7468@vanye> References: <20200219133135.10407-2-pankaj.bansal@oss.nxp.com> <734D49CCEBEEF84792F5B80ED585239D5C4A0C2C@SHSMSX104.ccr.corp.intel.com> <20200319153057.GV23627@bivouac.eciton.net> <20200330073518.GU22097@bivouac.eciton.net> <734D49CCEBEEF84792F5B80ED585239D5C4CD51C@SHSMSX104.ccr.corp.intel.com> MIME-Version: 1.0 In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5C4CD51C@SHSMSX104.ccr.corp.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 31, 2020 at 01:53:21 +0000, Ni, Ray wrote: > Leif, > Please understand that the concern of this change is all the platforms that uses > this serial port lib must be changed otherwise build breaks. Yes. This is the nature of collaborative development. This is something we on the ARM side have lived with since we got involved with EDK2, being the less-deployed user of the codebase, and that is fine. TianoCore specifically produced the UDK to make life easier for those who are unable to track upstream, and we have followed that up with stable tags. I would highly recommend that any team that feels that this change would be too much effort to move to edk2-stable202002. Of course, they would then need to manually cherry-pick any improvements and security fixes from master. That is their choice. Nevertheless, breaking existing platforms is a side effect, not a goal. So if an alternative solution can be found (which is not a hack that is going to affect the codebase negatively over time and simply need to be fixed properly at a later date), then clearly that is preferable. "This breaks many platforms" is a good argument for seeing if a solution can be found that does not break (as) many platforms. It is not an argument for duplicating drivers when the change needed for those platforms is trivial. These days, Linux tends to deal with API breakages (and other things) using a semantic patch tool called Coccinelle[1]. It would not be unreasonable, and indeed it would be helpful to us on the non-x86 side if something similar was adopted (and semantic patches mandated) for API breakages in EDK2. [1] http://coccinelle.lip6.fr/sp.php Regards, Leif > Ard, > Using Guided HOB sounds a good idea to me: ) > The benefits of using HOB is: > Length field in the HOB header can be used for extension if more parameters are needed. > DXE can have the HOB access as well. > > EFI_SEC_HOB_DATA_PPI can be used to return the new Guided HOB from SEC phase if needed. > > Thanks, > Ray > > > > -----Original Message----- > > From: Ard Biesheuvel > > Sent: Monday, March 30, 2020 3:45 PM > > To: Leif Lindholm > > Cc: Jiang, Guomin ; devel@edk2.groups.io; pankaj.bansal@nxp.com; Ni, Ray ; > > Wang, Jian J ; Wu, Hao A ; Ma, Maurice ; Dong, > > Guo ; You, Benjamin ; Meenakshi Aggarwal > > ; Varun Sethi ; Samer El-Haj-Mahmoud > Mahmoud@arm.com> > > Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg: UART Dynamic clock freq Support > > > > On Mon, 30 Mar 2020 at 09:35, Leif Lindholm wrote: > > > > > > Hi Jiang, > > > > > > It is not a question of effort of copying a driver, it is a question > > > that copying drivers is something that should be avoided wherever > > > practically possible. I did not think this topic was still under > > > debate. > > > > > > If the existing 16550 SerialPortLib is overspecialised to the point > > > where it only works on a subset of 16550 implementations, then it > > > should change. There are going to be more non-PC systems turning up > > > with 16550 UARTs - should they each copy/modify their drivers? > > > > > > If there are better ways of solving that problem, please suggest. > > > But more duplicated drivers is not the answer. > > > > > > > Could we use a GUIDed HOB? If it exists, we use its contents, and if > > it doesn't, we use the default set by the FixedPCD.