From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web11.5810.1592570917564804832 for ; Fri, 19 Jun 2020 05:48:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cRr4zJix; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592570916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hRzSwlS71NRltzubb3+OIpOFJ4E8IwfBPJZvdmWxxcs=; b=cRr4zJixtrhsyiLgSKi0SjwVj1cq5Or7WyrfisKxEUm8i3k1uWP2aVqmSFF/7k3jr3Arxz B29rkRnJw6zdy8NKoq10YW7/G28RKWlHoxzlLtHuFsH1GN4S5xU8azTvtY64QKxClxG4cO 78h09fbS7VhPKcbyd5SQTZeqZ80ax/w= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-298-9t7jzLXDOGSt-wKkGcmeAw-1; Fri, 19 Jun 2020 08:48:21 -0400 X-MC-Unique: 9t7jzLXDOGSt-wKkGcmeAw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8EE30106C010; Fri, 19 Jun 2020 12:48:19 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-115-60.ams2.redhat.com [10.36.115.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6CA3A5BAC6; Fri, 19 Jun 2020 12:48:17 +0000 (UTC) Subject: Re: [edk2-devel] [edk2-rfc] MdeModulePkg/StatusCodeHandler: Separate NULL class libraries for Memory and serial handlers from MdeModulePkg/Universal/StatusCodeHandler modules To: rfc@edk2.groups.io, dandan.bi@intel.com, "devel@edk2.groups.io" Cc: "Dong, Eric" , "Ni, Ray" , "Wang, Jian J" , "Wu, Hao A" , "Tan, Ming" References: From: "Laszlo Ersek" Message-ID: <5defa315-2e22-4697-e4e0-81b990ae11ba@redhat.com> Date: Fri, 19 Jun 2020 14:48:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 06/18/20 09:01, Dandan Bi wrote: > Hi All, > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2816 > > We plan to separate two kinds of NULL class libraries for Memory and serial handlers from MdeModulePkg/Universal/StatusCodeHandler/.../ StatusCodeHandlerPei/RuntimeDxe/Smm modules. > The benefit we want to gain from this separation is to 1) make the code clear and easy to maintain, 2) make platform flexible to choose any handler library they need, and it also can reduce image size since the unused handlers can be excluded. > If you have any concern or comments for this separation, please let me know. > > We plan to add new separated NULL class library MemoryStausCodeHandlerLib and SerialStatusCodeHandlerLib with different phase implementation into MdeModulePkg\Library\ directory. > The main tree structure may like below: > MdeModulePkg\Library > |------MemoryStausCodeHandlerLib > |------|------ PeiMemoryStausCodeHandlerLib.inf > |------|------ RuntimeDxeMemoryStatusCodeHandlerLib.inf > |------|------ SmmMemoryStausCodeHandlerLib.inf > |------SerialStatusCodeHandlerLib > |------|------ PeiSerialStatusCodeHandlerLib.inf > |------|------ RuntimeDxeSerialStatusCodeHandlerLib.inf > |------|------ SmmSerialStatusCodeHandlerLib.inf > > > We will update existing platform use cases in edk2 and edk2-platform repo to cover the new NULL class library to make sure this change doesn't impact any platform. > After this separation, StatusCodeHandler module usage will like below, and it's also very flexible for platform to cover more handler libraries to meet their requirements. > MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf { > > NULL|MdeModulePkg/Library/MemoryStausCodeHandlerLib/PeiMemoryStausCodeHandlerLib.inf > NULL|MdeModulePkg/Library/SerialStatusCodeHandlerLib/PeiSerialStatusCodeHandlerLib.inf > ... > } > > MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf { > > NULL|MdeModulePkg/Library/MemoryStausCodeHandlerLib/RuntimeDxeMemoryStausCodeHandlerLib.inf > NULL|MdeModulePkg/Library/SerialStatusCodeHandlerLib/RuntimeDxeSerialStatusCodeHandlerLib.inf > ... > } > > MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf { > > NULL|MdeModulePkg/Library/MemoryStausCodeHandlerLib/SmmMemoryStausCodeHandlerLib.inf > NULL|MdeModulePkg/Library/SerialStatusCodeHandlerLib/SmmSerialStatusCodeHandlerLib.inf > ... > } So I assume you're going to remove PcdStatusCodeUseSerial and PcdStatusCodeUseMemory, and when converting the existent platforms, the new NULL class resolutions in the DSC files will reflect the specific PCD values used in those DSC files until then. Is that right? I'm OK with it. Thanks Laszlo