From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.85.128.66, mailfrom: philmd@redhat.com) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by groups.io with SMTP; Thu, 11 Apr 2019 03:33:31 -0700 Received: by mail-wm1-f66.google.com with SMTP id v14so5992812wmf.2 for ; Thu, 11 Apr 2019 03:33:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2DoSqLh/5vNAbDsW7NbjQIauv+hxvDTqK3AfhAn6GT0=; b=p05u7+vEwZ1uG+92noyvDGjaeqHIrtDcmgvPRMq/dNLjH4zFugxidx8cIf+KFkha85 yw6ysoST9shfTJRmOlTQUboDtqHKJjk+pYoAhHDb//4UQwGsJz/J+clJ5nM1xsmx1Vik o8UYm62R6498C5iNkqeHsuajqVEtCtqM8j0+c/Dyzv+bix4MsMCgtu5E8qiuhvhXYkQg UK+BNVtRLwlg6MgHclMyTC3FdXcuvQ1rUf+NlNDco6PacJCBtjF+t6HWKmOVeFXHL9so BiwD9/FjdjuyJmpwGd+kWtTChfnDL6FHL/YvYJajcrpMQZdZwHUxED4Kdb554HJC4BhP T8Fw== X-Gm-Message-State: APjAAAXojCRPRiw3cHmzKMpyLhQkulwhoLCTGo6LG5DaRQN/jfT+iPi8 9ViTbnVbe7ZAe6rRWu9nSDijBA== X-Google-Smtp-Source: APXvYqzLHtxTCVgn/hgrr8IAv0g4QeDlOLJVOLt3DdsaxJ+SWCxd9xAo6mf5vhrCoZYtZe9gej8zUw== X-Received: by 2002:a1c:730c:: with SMTP id d12mr6355533wmb.10.1554978809444; Thu, 11 Apr 2019 03:33:29 -0700 (PDT) Return-Path: Received: from [192.168.1.33] (193.red-88-21-103.staticip.rima-tde.net. [88.21.103.193]) by smtp.gmail.com with ESMTPSA id r18sm7533845wme.18.2019.04.11.03.33.28 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 03:33:28 -0700 (PDT) Subject: Re: [edk2-devel] [edk2] [PATCH] MdeModulePkg/CapsulePei: Update the debug code to print 64bit data To: devel@edk2.groups.io, zhichao.gao@intel.com, "Wu, Hao A" Cc: Bret Barkelew , Michael Turner , "Gao, Liming" , "Zeng, Star" , "Wang, Jian J" , stephano References: <20190402055020.8656-1-zhichao.gao@intel.com> <3CE959C139B4C44DBEA1810E3AA6F9000B7C1722@SHSMSX101.ccr.corp.intel.com> <3CE959C139B4C44DBEA1810E3AA6F9000B7C17F2@SHSMSX101.ccr.corp.intel.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <76ebf3c6-0a37-5a3a-2215-60f1f0dccf15@redhat.com> Date: Thu, 11 Apr 2019 12:33:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <3CE959C139B4C44DBEA1810E3AA6F9000B7C17F2@SHSMSX101.ccr.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Hi Zhichao, This is not a technical comment related to your patch. I understand the migration from lists.01.org to edk2.groups.io was in part motivated to help developpers having a restricted email setup to easily use a mailing list. I see you top posting your replies so I wonder if groups.io is really helpful to you. Are you missing other features that would make your list email workflow easier? Thanks, Phil. On 4/11/19 11:33 AM, Gao, Zhichao wrote: > Thanks for you advices. > > I would better to keep the 'UINTN' with '%x' because PEIM is compiled as 32 bit object. And lots of PEIMs keep this combine. > > Thanks, > Zhichao > >> -----Original Message----- >> From: Wu, Hao A >> Sent: Thursday, April 11, 2019 4:12 PM >> To: Gao, Zhichao ; Philippe Mathieu-Daudé >> ; devel@edk2.groups.io >> Cc: Bret Barkelew ; Michael Turner >> ; Gao, Liming ; >> Zeng, Star ; Wang, Jian J >> Subject: RE: [edk2] [PATCH] MdeModulePkg/CapsulePei: Update the debug >> code to print 64bit data >> >>> -----Original Message----- >>> From: Gao, Zhichao >>> Sent: Thursday, April 11, 2019 3:47 PM >>> To: Philippe Mathieu-Daudé; devel@edk2.groups.io >>> Cc: Bret Barkelew; Michael Turner; Gao, Liming; Zeng, Star; Wu, Hao A; >>> Wang, Jian J >>> Subject: RE: [edk2] [PATCH] MdeModulePkg/CapsulePei: Update the >> debug >>> code to print 64bit data >>> >>> Sorry for missing this email. >>> >>> While I change the code, it couldn't pass the Patchcher.py because of >>> the 'EFI_D_" version MACRO. So I change all the debug message in this >> driver. >>> Maybe that is a redundant work. >> >> Hello Zhichao, >> >> For this case, you can work out a first patch to replace all the macros starting >> with 'EFI_D_' with 'DEBUG_'. And a second patch to address the real issue. >> >>> >>> Thanks, >>> Zhichao >>> >>>> -----Original Message----- >>>> From: Philippe Mathieu-Daudé [mailto:philmd@redhat.com] >>>> Sent: Tuesday, April 2, 2019 11:36 PM >>>> To: Gao, Zhichao ; edk2-devel@lists.01.org >>>> Cc: Bret Barkelew ; Michael Turner >>>> ; Gao, Liming ; >>>> Zeng, Star >>>> Subject: Re: [edk2] [PATCH] MdeModulePkg/CapsulePei: Update the >>> debug >>>> code to print 64bit data >>>> >>>> Hi Bret, >>>> >>>> On 4/2/19 7:50 AM, Zhichao Gao wrote: >>>>> From: Bret Barkelew >>>>> >>>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1677 >>>>> >>>>> For some pointer and UINT64 data, the debug code print with '%x'. >>>>> Which would loss the upper 32bit data. So update '%x' to '%lx' >>>>> for these data. >>>> >>>> Some are UINTN. Per Laszlo answer on this thread: >>>> https://lists.01.org/pipermail/edk2-devel/2016-September/002093.html >>>> for those, casting and changing format is the accepted way. >> >> After a skim of the patch, I think there seems only 2 cases that are handled in >> this patch: >> >> 1. UINT64 >> For this one, the change in this patch looks good to me. >> >> 2. Pointers >> I think we can directly use '%p' for pointers. >> >> If I happen to miss other cases, please do follow the above link to handle >> UINTN. >> >> >> Best Regards, >> Hao Wu >> >>>> >>>> However this is a change, >>>> >>>>> Change the DEBUG PrintLevel from EFI_D_ version to DEBUG_ version. >>>>> DEBUG_ version is recommended to use. >>>> >>>> and this is another change. >>>> >>>> Splitting this patch in 2 would make it more digestable. [...]