From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web10.3531.1625120445935666136 for ; Wed, 30 Jun 2021 23:20:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=nqumV8it; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: ray.ni@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10031"; a="230129085" X-IronPort-AV: E=Sophos;i="5.83,313,1616482800"; d="scan'208";a="230129085" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2021 23:20:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,313,1616482800"; d="scan'208";a="644339902" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga005.fm.intel.com with ESMTP; 30 Jun 2021 23:20:44 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Wed, 30 Jun 2021 23:20:44 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Wed, 30 Jun 2021 23:20:44 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.40) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.4; Wed, 30 Jun 2021 23:20:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l63BcOBUZSlMSyv4G42goK7pYJQ2lfs4iLqQb9EihxgcPBl4TUwjfcFyjsAK7X05q39gAudFSCbPvmK6EQRosHpDlrNspOZRDTUlW9RAI88MPM8rI2LW25V8/BdGbpzkR9FmCZ37vmvAegZ7NNvbp7bpg2uApPAsPE4LA7Ko8lLakJkygmzsY8G5EwC6LWZ0wj0BQKG/7qmPzSGXvltq1qNzaXzVmR0gsDJG338haqELGiE7cIjZhH8MVZPBm/TJhZEDkOzTZ7oti22qQlEOMSRIWA8FtvriEpH2OC5MHNd9zQQ6gb22CO1YjXvIYrY5iT8eiKtB2+VbgHlGb1NTsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DebA5YJJN2tnH9PNLkWNyCdL55/9+Dnb5yNBas+zBDg=; b=ZLeQISdG3zShRKa1CUbRuvGWDLJ157avAPVgY4kFYmsEHNy53rnnaPWqoem/htce+oySxChlPXzToQypUOHkEYPlx6otiC2ka3SU1pLOdeSkVso5+s0kXXnaqZMB9QBlhcSNQzUTrk/T8TW4EOxK1wHqnswPXAK/cpKWuXqcH/v89N6Ig0Mxb/q3p8fh2xXrZA6vCQkbfsdqL/tH753o1dRMMd9yQMfqQh2TVLoBXxlpf/eQhcGq2plWIki+10mJpVzBcCzJoWVeUBuuXwlHJcP2HC8kx8h41sKHWl0khfODzBJYso/lZtJRFBSODN3UUizSruIiWQQpVtfWsBLByQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DebA5YJJN2tnH9PNLkWNyCdL55/9+Dnb5yNBas+zBDg=; b=nqumV8itHZYptBCZwBYcHWbKDXW3grhl2CQ3TN0ilBhaXFsAZQczUWd+QWtOT2YcIWwPnwdvDzwh7UNotYCLRWOyIDPr7PzKOPr3LPTqvCTu9vbqzg4kKGLlCJ5r9mR2WoI846IcZGI7bRXYlghzyqOSunjClZBywlTsJmk6ns0= Received: from CO1PR11MB4930.namprd11.prod.outlook.com (2603:10b6:303:9b::11) by MW3PR11MB4747.namprd11.prod.outlook.com (2603:10b6:303:2f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19; Thu, 1 Jul 2021 06:20:42 +0000 Received: from CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::dc21:42bd:8553:2869]) by CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::dc21:42bd:8553:2869%2]) with mapi id 15.20.4287.023; Thu, 1 Jul 2021 06:20:42 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Liu, Zhiguang" CC: "Ma, Maurice" , "Dong, Guo" , "You, Benjamin" , "Kesavan Balakrishnan, ThiyaguX" Subject: Re: [edk2-devel] [PATCH] UefiPayloadPkg: Dump hob information from boot loader Thread-Topic: [edk2-devel] [PATCH] UefiPayloadPkg: Dump hob information from boot loader Thread-Index: AQHXbbOiDTS7BtEaaEKFnDKq24PZm6stoflg Date: Thu, 1 Jul 2021 06:20:42 +0000 Message-ID: References: <20210630132626.1061-1-zhiguang.liu@intel.com> In-Reply-To: <20210630132626.1061-1-zhiguang.liu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.143.18] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5edaf24c-f14f-4e0e-572d-08d93c585ab0 x-ms-traffictypediagnostic: MW3PR11MB4747: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HgbNMVXsfSwb2mDAGGTfWgZXhuzrBcKIw3A23gNiwCjh/eIHCQ4kzVVCC8I7g3Jhf03kFlksMexJq+9dK/3Y4Gony9z56doKMi8+Rik3wHahDp2XopiZBoOyN6g5Qw8L1kCeENCG87bCX3DvWVH5UBrcTsYKy1thcGM7ccsjw2IYP1zouTGeo5+vppdnBxfHVctrMotwwC5GucST1U0v5QjlSgFub1iNdphRxpswnW5aqXwFQeZ/Aeup1gKtZg7SCFOPbah37IIhNFipZx2JRKE1VB6U3XfP9hb5qVGnWnkLm9/3+cd0yrQDyab4gWPuohSOMldQbu+JpgOA5XcQHxEkNqbgEhdyzUysrEpjyd8IyqRPZQ0LF0egCVkd5j55PCAp3WJbZuN+t4OvO9zcFgEXH3G/aAgA8Z0Z2SUqdMH4Ior0oPXcYkcE4JbotT/vQNZ8POj7sIfu2+E0qfiSF+iDzie2xaG1KQ0GL6rcWkIXKEDjasju9XDKv6JzkxaUfwB0ctze5ZDVMaLPMQGY3OAJLsD7cEuKjWc0mt0r3gme8cUHwVSSfPggfEflfk39zA67TqWtifDFPOIKwXkzbqJCRGeOr7lqdrcaa/rb378TJ5JmcEJsMkYPQ8RIIKEMf4sQmdeFRptWz4N0ergPSw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB4930.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(376002)(366004)(136003)(346002)(39860400002)(396003)(55016002)(52536014)(9686003)(4744005)(86362001)(122000001)(38100700002)(316002)(66446008)(8936002)(66476007)(64756008)(8676002)(66556008)(7696005)(6506007)(6636002)(186003)(26005)(478600001)(76116006)(54906003)(110136005)(107886003)(66946007)(2906002)(71200400001)(33656002)(5660300002)(4326008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fkS1V1Yau46YbP9Aik8LYdqakMxqhMD45lq8SFzFzwLOMFLe6vmPpvi+B1zQ?= =?us-ascii?Q?L06gtWb5qeqic2Rmf8Y9fXmj3I9DjogAqimEjgDo1hynV7jH7tMk6Bth/B+9?= =?us-ascii?Q?/G3RCHeGantPWoNMTrtEVe7AMLSAyWooaVe0aDUEVCkwTth6jNfCsWm3HzF6?= =?us-ascii?Q?IumulT+J2B8eAlqH93zOXP5nNR7BuncM2Zn57BR6zyeYzveEuJ5cTw7ilhL8?= =?us-ascii?Q?mg6Atfu2U+TLNnQqNgHxeB77xLS4JknAeqOoOmjgZwn61/Q/XTjSggKbZdU5?= =?us-ascii?Q?hI4wj9tfwLNkQODAUipy32PIrOxzvdj9Sx0hJdLdatVdzc1VScnYBbkvyM7+?= =?us-ascii?Q?WX0r96BztivXGmYvQupYCSXT5RSt8FiXFvtINNcGIn9/o71qd56qWcIRgP4A?= =?us-ascii?Q?PEvaK/+509wTmHq9OJC0lxTmtr6NtVkPFmzE36Dfr2lmwfZ/h+9zQMRwjXC5?= =?us-ascii?Q?M175CxJnaKjZmgj6Y07hI60JniHWZ86z3bfQitTnHGiXahNPkTDcPAZphjbr?= =?us-ascii?Q?KK8YZsPG3cT+Li+G/lUsjz6UCxJs2PtISV2S7OXnx9Y/NFXQFGtEUpqUmgen?= =?us-ascii?Q?EUD9dk8GaDKVX8cv/Vz/a7oFmQ1AP0wkuHFtsHl0odL6UXSkvjLcvZoICGTT?= =?us-ascii?Q?9emJDu4+97rOcVkvW8M2U7D99JrCIddCt7QIiVi+gm1cBO7duOpKRQ0tjx/s?= =?us-ascii?Q?BIArU1ghjeF3ezNYZUToYAKd1dVMtwl6SjYVoJXHXvO0epwYcEu4SGrQxyAi?= =?us-ascii?Q?ssa5MfO2+cuh5a5Dyt5hUNoZbfQdOFUZMAUsdNvCkmZUK++LG47zvrY9YMw+?= =?us-ascii?Q?Py75OkxtSZp2POc1Vw8xTy+rBalbNf5AY1gDRwoMRcKYHWaPV1gmI/DMrwZU?= =?us-ascii?Q?QKXkdhUQHD8oQk5BALaIwGx9RVTa+W0HrvXdHY0K/39KDhPEsDtlFYXEkOwB?= =?us-ascii?Q?Hm31ADHyfZ9EN72XRte7eFmkmHWPWqG0WmJuozDXCf/LQpTOvQkVMrq14Ur+?= =?us-ascii?Q?ES7PdJLPrkiU6npWrcwpNmsJS2aQqr0U4xo2c+3p8iryByPKC1ztvNw1souu?= =?us-ascii?Q?OKMrXtJp1lz8w/XVQUuoXb3Giyshyv0lNUfZbA9MZfScad2BbZSDe4zMALmr?= =?us-ascii?Q?zHVe36d3oV3KGKoHdWiIKXk3StIG2LmMOAjkfqs3YzsJN78PJjAla+O3cSAY?= =?us-ascii?Q?lEvtR9n7xHdtFJFzqX1AlcJwFXw8r025TLU0ADJaIjAJokNt3y5MNPjZ61SJ?= =?us-ascii?Q?Ey6nck0pRfmz6Eqp1OXPeX+od9BAOQ7zAhXLGcTbAWoOpsm8/2x59mCa39Eu?= =?us-ascii?Q?NGXLbVn8NT8bKJTps+ngs69a?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4930.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5edaf24c-f14f-4e0e-572d-08d93c585ab0 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jul 2021 06:20:42.5303 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 6FOayNrzolF/RQBS1+eI1OeNOlLgYvM91gCt52IPeJC0PkPAmOGtLLDU7zI9ASwBYka92w3OioTebEPXkAwV/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4747 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable +(*HOB_PRINT_HANDLER) ( + IN VOID *Hob, + IN UINTN Hobsize 1. UINT16? + +typedef struct{ + UINT16 Type; + CHAR8 *Name; + HOB_PRINT_HANDLER Function; 2. PrintHandler? + +typedef +EFI_STATUS +(*GUID_HOB_PRINT) ( + IN UINT8 *HobRaw 3. Size parameter is missing? + GUID_HOB_PRINT Function; 4. PrintHandler? + CHAR8 *Guidname; 5. GuidName? +EFI_STATUS +PrintHex ( + IN UINT8 *DataStart, + IN UINTN DataSize + ) +{ + UINTN Index1; + UINTN Index2; + UINT8 *StartAddr; + + StartAddr =3D DataStart; + for (Index1 =3D 0; Index1 * 16 < DataSize; Index1++) { 6. define 16 as a macro? + Status =3D GuidHobPrintHandleTable[Index].Function (Hob.Raw); 7. Should supply the remaining size to the Function(). + PrintHob (mHobList); 8. Use DEBUG_CODE() and make sure PcdReportStatusCodePropertyMask BIT2 is s= et in DEBUG build and clear in RELEASE build.