From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web12.583.1625070497504440741 for ; Wed, 30 Jun 2021 09:28:17 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DqDpwBkw; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625070496; 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=0NDcDBlxIMCv66bTfRL2T4Cmo3+9qdJ4ll0VrH/vVhw=; b=DqDpwBkwDEiG9pGU8ZzTP0XPSjSjSbgM7hkaWTlBvda8SqpQuUcpFK82gtu7gFOKPvCMG4 PFoaAtmoS7yMvx0cDEDppMQ1KLS+1CebBHq/uyiWIH5CyoOHj2AO5f9TJOY+XCGeq9QUUy VlDsyp4gdN+kjmi7RauO5XmQ3IPx92o= 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-536-uz1awT3LPvuQoz62zy1Oyw-1; Wed, 30 Jun 2021 12:28:12 -0400 X-MC-Unique: uz1awT3LPvuQoz62zy1Oyw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B0661100CCC0; Wed, 30 Jun 2021 16:28:11 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-100.ams2.redhat.com [10.36.112.100]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 971001001281; Wed, 30 Jun 2021 16:28:09 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH] MdeModulePkg PiSmmCore: Change MemoryAttributes message to DEBUG_VERBOSE level To: devel@edk2.groups.io, ray.ni@intel.com, Yang Gang Cc: "Dong, Eric" , Liming Gao References: <20210630055406.559-1-yanggang@byosoft.com.cn> From: "Laszlo Ersek" Message-ID: <7e423549-5db8-f3b4-b360-05a388ab3bc0@redhat.com> Date: Wed, 30 Jun 2021 18:28:07 +0200 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 06/30/21 08:36, Ni, Ray wrote: > Can you explain why VERBOSE is chosen instead of INFO? I agree it should be documented in the commit message. One good reason is if there are many messages, as logging lots of messages is costly (it slows down booting). Thanks Laszlo > > Thanks, > Ray > > -----Original Message----- > From: Yang Gang > Sent: Wednesday, June 30, 2021 1:54 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Liming Gao > Subject: [PATCH] MdeModulePkg PiSmmCore: Change MemoryAttributes message to DEBUG_VERBOSE level > > Signed-off-by: Yang Gang > Cc: Eric Dong > Cc: Ray Ni > Cc: Liming Gao > --- > .../Core/PiSmmCore/MemoryAttributesTable.c | 26 +++++++++---------- > 1 file changed, 13 insertions(+), 13 deletions(-) > > diff --git a/MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c b/MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c > index de8262ecb9..3e8a80dd7d 100644 > --- a/MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c > +++ b/MdeModulePkg/Core/PiSmmCore/MemoryAttributesTable.c > @@ -1208,10 +1208,10 @@ PublishMemoryAttributesTable ( > ASSERT (Status == EFI_BUFFER_TOO_SMALL); > > do { > - DEBUG ((DEBUG_INFO, "MemoryMapSize - 0x%x\n", MemoryMapSize)); > + DEBUG ((DEBUG_VERBOSE, "MemoryMapSize - 0x%x\n", MemoryMapSize)); > MemoryMap = AllocatePool (MemoryMapSize); > ASSERT (MemoryMap != NULL); > - DEBUG ((DEBUG_INFO, "MemoryMap - 0x%x\n", MemoryMap)); > + DEBUG ((DEBUG_VERBOSE, "MemoryMap - 0x%x\n", MemoryMap)); > > Status = SmmCoreGetMemoryMapMemoryAttributesTable ( > &MemoryMapSize, > @@ -1236,19 +1236,19 @@ PublishMemoryAttributesTable ( > MemoryAttributesTable->NumberOfEntries = (UINT32)RuntimeEntryCount; > MemoryAttributesTable->DescriptorSize = (UINT32)DescriptorSize; > MemoryAttributesTable->Reserved = 0; > - DEBUG ((DEBUG_INFO, "MemoryAttributesTable:\n")); > - DEBUG ((DEBUG_INFO, " Version - 0x%08x\n", MemoryAttributesTable->Version)); > - DEBUG ((DEBUG_INFO, " NumberOfEntries - 0x%08x\n", MemoryAttributesTable->NumberOfEntries)); > - DEBUG ((DEBUG_INFO, " DescriptorSize - 0x%08x\n", MemoryAttributesTable->DescriptorSize)); > + DEBUG ((DEBUG_VERBOSE, "MemoryAttributesTable:\n")); > + DEBUG ((DEBUG_VERBOSE, " Version - 0x%08x\n", MemoryAttributesTable->Version)); > + DEBUG ((DEBUG_VERBOSE, " NumberOfEntries - 0x%08x\n", MemoryAttributesTable->NumberOfEntries)); > + DEBUG ((DEBUG_VERBOSE, " DescriptorSize - 0x%08x\n", MemoryAttributesTable->DescriptorSize)); > MemoryAttributesEntry = (EFI_MEMORY_DESCRIPTOR *)(MemoryAttributesTable + 1); > for (Index = 0; Index < MemoryMapSize/DescriptorSize; Index++) { > CopyMem (MemoryAttributesEntry, MemoryMap, DescriptorSize); > - DEBUG ((DEBUG_INFO, "Entry (0x%x)\n", MemoryAttributesEntry)); > - DEBUG ((DEBUG_INFO, " Type - 0x%x\n", MemoryAttributesEntry->Type)); > - DEBUG ((DEBUG_INFO, " PhysicalStart - 0x%016lx\n", MemoryAttributesEntry->PhysicalStart)); > - DEBUG ((DEBUG_INFO, " VirtualStart - 0x%016lx\n", MemoryAttributesEntry->VirtualStart)); > - DEBUG ((DEBUG_INFO, " NumberOfPages - 0x%016lx\n", MemoryAttributesEntry->NumberOfPages)); > - DEBUG ((DEBUG_INFO, " Attribute - 0x%016lx\n", MemoryAttributesEntry->Attribute)); > + DEBUG ((DEBUG_VERBOSE, "Entry (0x%x)\n", MemoryAttributesEntry)); > + DEBUG ((DEBUG_VERBOSE, " Type - 0x%x\n", MemoryAttributesEntry->Type)); > + DEBUG ((DEBUG_VERBOSE, " PhysicalStart - 0x%016lx\n", MemoryAttributesEntry->PhysicalStart)); > + DEBUG ((DEBUG_VERBOSE, " VirtualStart - 0x%016lx\n", MemoryAttributesEntry->VirtualStart)); > + DEBUG ((DEBUG_VERBOSE, " NumberOfPages - 0x%016lx\n", MemoryAttributesEntry->NumberOfPages)); > + DEBUG ((DEBUG_VERBOSE, " Attribute - 0x%016lx\n", MemoryAttributesEntry->Attribute)); > MemoryAttributesEntry = NEXT_MEMORY_DESCRIPTOR(MemoryAttributesEntry, DescriptorSize); > > MemoryMap = NEXT_MEMORY_DESCRIPTOR(MemoryMap, DescriptorSize); @@ -1331,7 +1331,7 @@ SmmInstallMemoryAttributesTable ( { > SmmInstallImageRecord (); > > - DEBUG ((DEBUG_INFO, "SMM MemoryProtectionAttribute - 0x%016lx\n", mMemoryProtectionAttribute)); > + DEBUG ((DEBUG_VERBOSE, "SMM MemoryProtectionAttribute - 0x%016lx\n", > + mMemoryProtectionAttribute)); > if ((mMemoryProtectionAttribute & EFI_MEMORY_ATTRIBUTES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA) == 0) { > return EFI_SUCCESS; > } > -- > 2.23.0.windows.1 > > > > > > >