From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (NAM02-BL2-obe.outbound.protection.outlook.com [40.107.75.59]) by mx.groups.io with SMTP id smtpd.web11.16645.1602779580961104462 for ; Thu, 15 Oct 2020 09:33:01 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=Mv0uXhN0; spf=none, err=SPF record not found (domain: amd.com, ip: 40.107.75.59, mailfrom: mark.wilson@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GGCM+Yj2JxgGkJn1l0xy4QMw3r6SJk7asCnGlfaP+A8YUu/jeGW+XetS2cKHDLT8xrA+AUW5Wb/iwZPJmoSYK9+pfzC4mGgWQJfJn4uPANd6+Db2A3C0w43hXDY38CWMEzyEOjskBxOO7Dh3DRijm9KQ+9UFomaV4sndttcnrO4wsVfF8eSaRtMkPvBI6otxk1+fqgJYrwLRoIsGXrItMRufR7aUo2fbbly+TJGhctWf0Yjb2NR/EDD1OD2YW6JYeBhjEfcEdUcK0EZWQ8A+tI1NA7xnQM6H0I++2cty16SA3sXvp9S7jLRaYgI0Oa9ORoMXrM21E9h6xpyWRiQJGA== 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=TMcHexM+qrjwofT3oAiE2grXQEUSCnCaDy8g/eSzjrE=; b=X05zfc15AEd/oxm/Mu8qG7bNGh3a2Dj6ysGtf+hLiVates6yemMrPj71TKRdhUUinMRA75GuV8w0meaDb0xFwyLiKg5InQGMlMbLsALxovpe+U/JQWMcp+kfPkKpA3ML8DsvexUKBC5jwZFVRr2GEqCUIXMK6EM1gzApDsDHPPOsZqEgqyRfGg3ZDyD1WdIpbJtMP7aK5Y5aC4syVCp423aOw/QngKDJB2GxtUjGNsq2TcvvcqTwfDtbo3SUXH8Fv5kGf0cmwBPnpgKY/2ID4zSZlXopsqlcwEoAg13g+uAA4IOC8XFF57xXw/OYnVYLtXORcPoDKxATHyHMAAgK5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TMcHexM+qrjwofT3oAiE2grXQEUSCnCaDy8g/eSzjrE=; b=Mv0uXhN0b+91Yz0Dawy4NgwMXDRXsgCfiK/3RQJZNUu6ZMlPGDJi61WIDYhH9G3wWrk4T69/FoLlBM9e5g4IbZOucEZfsElmGQAvg8HnjctOpx6h5DoGRdEA6SZD6wJb+FyZJ9BdyfRC/oS7BM52xmYuBLluIbBAOmpiZ/o6lEE= Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=amd.com; Received: from DM6PR12MB3484.namprd12.prod.outlook.com (2603:10b6:5:3c::15) by DM6PR12MB4974.namprd12.prod.outlook.com (2603:10b6:5:1bb::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20; Thu, 15 Oct 2020 16:32:58 +0000 Received: from DM6PR12MB3484.namprd12.prod.outlook.com ([fe80::448b:c790:cbdd:d479]) by DM6PR12MB3484.namprd12.prod.outlook.com ([fe80::448b:c790:cbdd:d479%3]) with mapi id 15.20.3477.021; Thu, 15 Oct 2020 16:32:58 +0000 From: Mark Wilson To: devel@edk2.groups.io CC: Mark Wilson Subject: [PATCH v1 0/1] Clean up save state boundary checks and comments in functions ReadSaveStateRegisterByIndex and WriteSaveStateRegister Date: Thu, 15 Oct 2020 11:32:42 -0500 Message-ID: <20201015163243.364-1-Mark.Wilson@amd.com> X-Mailer: git-send-email 2.27.0.windows.1 X-Originating-IP: [2605:6000:1023:847e::43a4] X-ClientProxiedBy: DM5PR21CA0046.namprd21.prod.outlook.com (2603:10b6:3:ed::32) To DM6PR12MB3484.namprd12.prod.outlook.com (2603:10b6:5:3c::15) Return-Path: Mark.Wilson@amd.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from MSDN-MARWILSO.amd.com (2605:6000:1023:847e::43a4) by DM5PR21CA0046.namprd21.prod.outlook.com (2603:10b6:3:ed::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.3 via Frontend Transport; Thu, 15 Oct 2020 16:32:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c19272f8-3fb8-4811-ee32-08d87127f9b5 X-MS-TrafficTypeDiagnostic: DM6PR12MB4974: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Rg1FBTl7bk3eRGoDik3a3K5AyvGfWRpjtK0sR0T+fHyJWwKSK286/eduSP9SOjD6n3W4mxtlra7KrY4Tf+kPMlSWij8hn2zqr+k6FCal07BaSwNj4tz42GO73QjMl98akhp2+tlwcgE4Qy1B1numIicrgJCIDqGz+3WlhpPqEWRpSz+Muc+/0ItF9z7H9Dm4L+6DynqTj++Jg41vZKiHwvN3CvOFdiVmzR6TSrsszPXui77p6ev3vrQOm+7UBIDlINS3pXQxalOo5XzKs0PfBZkXXGyZoqhPdIJMpcshuoncLWy+D8ygWoxhRm0jWc3VzzBwhknvwwYOZ9SfXxcyHjXIHRXZ1amflb4xsM1eT8XOSFqjJ8i00qlBEdLj20gL X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB3484.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(366004)(52116002)(8936002)(66556008)(5660300002)(66946007)(8676002)(66476007)(7696005)(2616005)(83380400001)(186003)(6666004)(34490700002)(16526019)(2906002)(498600001)(4744005)(6486002)(4326008)(1076003)(36756003)(6916009)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: jeHIFjDp+3AsmKJdAhYwAxg3BH6mvdMu+32oR1rp0GvT0uOHAQGhJ4zOa2JEmE5wXBkEu5nUbp+burdnFqRzf+/tBq2VOfk50xb64sSWhMZfv92aotDwYaaedFfWCVSF20YMgWVCgujCmX+1l/sP8+lobJi1N0j6XPl5CWE3neKycjEwynpKaZA41K1PI07yXurFB+j1PLjWo/qeMCnGe6ab1bgv4nl/MFiy3860igeU6Wbz92qMKBksVXCsFV92qEPdKNkieokvc9q0Vs6vYb9vu1zXCPFoRTXbGe7yRINdD5E8uceXQPVupT11B2LVtPCx9ZwiPvoxWNv1pPOoQi8dNFTtxHuP1hLX0GLScIqNMqISwMYDySaBkjRk7EBK2WXyXTtWMKq716tmOmhr1WPdNUXkFM412gHP1mEGN3lVDVs6+B+QVQh7GuQk6nU5d3xu+TVxCBto2OdpI9y3EofOZci9YnQoPSWyMljQb5AS+Zlc9QUu5hMd2OdReDtWDsVJfS0ICFwJ54EXHM5StzUkmVfCjvXlHYi20staRr/Jdt5cApVP3tnFSHVwRDur6loNxNDzIwtaMgp8Hc4Lp3+18Ep+tN/3TJKsq4cTWJQErn0lzPYkANXauJS7o9cIpHV7uxHU74aJ1roP2nj3R4YsD6lyrxPsimZrg9IrK8k= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c19272f8-3fb8-4811-ee32-08d87127f9b5 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3484.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2020 16:32:58.3386 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TrdY8ywELPWm/uIyy9wDJeSuL3QAOpFK6gaa78WMwJZ0OdlyP6gqoGs8VXxDexPIZpqUv7Pxfk8lINVdcYl7+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4974 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain The update does the following: * For functions ReadSaveStateRegisterByIndex and WriteSaveStateRegister, th= e boundary check for register copy incorrectly includes if the width is DWO= RD to determine if to write upper 32-bits. This is clean up as in this case= number of bytes to copy is 0. * Correct comments for above functions. * Correct coding style spacing for CopyMem and ASSERT in above functions. Mark Wilson (1): UefiCpuPkg: Clean up save state boundary checks and comments. UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) --=20 2.27.0.windows.1