From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web10.19228.1592838181100843967 for ; Mon, 22 Jun 2020 08:03:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OIZD9PFL; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592838180; 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=QPT/Zm2zKdXSEQeT4UsxklE0fFYN/Oadge0pDSa+VVg=; b=OIZD9PFLiOiHDzSux0t0P2+jbLCsmZev4dX3rLWBYNzn+cOaK2Xs0+tEj7iulEZXFOopEt SQPa3er1Sw1YpLj1FKxUZLHvuHkktSXhs7rn6a5p4AyFcwYUc3xA5wa1/8cNVYEMB6bLfq P3+b6MlbX0nd2xa2fF7gI70WLLlhq5s= 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-88-FyciuCTaOzy697c8MCFQRg-1; Mon, 22 Jun 2020 11:02:41 -0400 X-MC-Unique: FyciuCTaOzy697c8MCFQRg-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 7B8C619057A0; Mon, 22 Jun 2020 15:02:39 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-115-246.ams2.redhat.com [10.36.115.246]) by smtp.corp.redhat.com (Postfix) with ESMTP id 991545BAD0; Mon, 22 Jun 2020 15:02:37 +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: "Bi, Dandan" , "devel@edk2.groups.io" , "rfc@edk2.groups.io" Cc: "Dong, Eric" , "Ni, Ray" , "Wang, Jian J" , "Wu, Hao A" , "Tan, Ming" References: <5defa315-2e22-4697-e4e0-81b990ae11ba@redhat.com> From: "Laszlo Ersek" Message-ID: Date: Mon, 22 Jun 2020 17:02:36 +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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com 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/22/20 06:57, Bi, Dandan wrote: >> -----Original Message----- >> From: devel@edk2.groups.io On Behalf Of Laszlo >> Ersek >> Sent: Friday, June 19, 2020 8:48 PM >> To: rfc@edk2.groups.io; Bi, Dandan ; >> devel@edk2.groups.io >> Cc: Dong, Eric ; Ni, Ray ; Wang, >> Jian J ; Wu, Hao A ; Tan, >> Ming >> Subject: Re: [edk2-devel] [edk2-rfc] MdeModulePkg/StatusCodeHandler: >> Separate NULL class libraries for Memory and serial handlers from >> MdeModulePkg/Universal/StatusCodeHandler modules >> >> 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.in >> f { >>> >>> >> NULL|MdeModulePkg/Library/MemoryStausCodeHandlerLib/PeiMemorySt >> ausCode >>> NULL|HandlerLib.inf >>> >> NULL|MdeModulePkg/Library/SerialStatusCodeHandlerLib/PeiSerialStatusC >> o >>> NULL|deHandlerLib.inf >>> ... >>> } >>> >>> >> MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHan >> dlerRuntimeDxe.inf { >>> >>> >> NULL|MdeModulePkg/Library/MemoryStausCodeHandlerLib/RuntimeDxeM >> emorySt >>> NULL|ausCodeHandlerLib.inf >>> >> NULL|MdeModulePkg/Library/SerialStatusCodeHandlerLib/RuntimeDxeSeri >> alS >>> NULL|tatusCodeHandlerLib.inf >>> ... >>> } >>> >>> >> MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSm >> m.inf { >>> >>> >>> >> NULL|MdeModulePkg/Library/MemoryStausCodeHandlerLib/SmmMemory >> StausCode >>> HandlerLib.inf >>> >> NULL|MdeModulePkg/Library/SerialStatusCodeHandlerLib/SmmSerialStatus >> Co >>> NULL|deHandlerLib.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? >> > Thanks for pointing out the PCD part which I miss in this RFC. > This commit https://github.com/tianocore/edk2/commit/45bc28172fbf38ac21e2592c07189b55f57695e3 have updated PcdStatusCodeUseSerial and PcdStatusCodeUseMemory type. > We plan to keep PcdStatusCodeUseSerial and PcdStatusCodeUseMemory. Through NULL class resolutions in the DSC can make the code handler code included or not, then we still can control handler enable/disable through the PCD dynamically if the handler is included. > What do you think of this? Hm... OK. Thanks Laszlo