From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 29BB1AC1A29 for ; Wed, 24 Jan 2024 19:24:47 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=bzHcJ4UZ+UBO9EPYRc9SPmxsegOfKRsebqepjmXVG50=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Message-ID:Date:User-Agent:Subject:To:Cc:References:From:Autocrypt:In-Reply-To:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1706124285; v=1; b=GqQFIIztMwh7KXFXr4AZUK0esFn9VXBZ8cpUNsNEORGi1zBZeENaVPt1zAgGjujaxVEkVQsY 0+0Ev9VkVeJYcjpo70fHEAhZrSiftZvDxESYGVLUumuGGnoHVhilm5h8RdWjuGkXWhlH+PJ0u+w 4+YVsWaTa2shSpw51i1D0JT4= X-Received: by 127.0.0.2 with SMTP id FN80YY7687511xzA9w7cshx8; Wed, 24 Jan 2024 11:24:45 -0800 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.49]) by mx.groups.io with SMTP id smtpd.web11.32396.1706124284732240098 for ; Wed, 24 Jan 2024 11:24:45 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GFV2CV2o4KbUBt/zxeuFL7XQHjk30Zt3LFFxyULAcYkLCfgs3QzqrAxHxWE+tIUmuCJoQU5kbwItOapN1+EcACIAImN43nznh4s8z4JKTBPzXmQGrd2zUZm+TY16pkeVDlSuoCotyz+LNyxXkA5qr4xBO3KmiFztkZQVKjyb2Yp+Jfv1L3YVhSjI4eBL7XXdKBIzm8PGK70DmGOZPMTLAiTafnZS/u4eK+JLgROrOcCIQfLdNmxlnBqygKmkENQrHTBGfm8OpGp+LWGBqbGEfW+wcteM5FU2MGm3S2CNDmJDIJkqb1dYKWbt1M9RV6wBoRPYCdkNsHfMVyUDjwsgIQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yGqa9SizIZRRt+9GxYUtyoG5wsf5vyHu5PsDKp3YwG4=; b=ggj7L4xJqfTzWtL8l6KU4FlEepL0ow5fHyqh7OCzU/f8TqVvvKzFpygpBj7IQJdy4P4c13BhyWLOSmOlCtc/Zptvi945TtFikYd5RkEWB7C0Z4lN+YL2etH25l6TSIBEBUbTQdqP1qAIWyDKUrPkXYJMhB9Yyo688fBfnpIn3sD2fpKZrSl8WQvJpALCvFGo0b9efB2q2BB2NOO/nOdRsbnl3tFShhK3A+3Dsp3F/cHLsUJNwFopSqGwEfoRKE+u3XPHGZOTPsjmom74BElVPw1k+aR/IbPm6UCTvTRKiM6bhxieNG55uvT6NsNJdbZQ6Ph8jaqczikUJFd7572bsA== 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 X-Received: from BL1PR12MB5732.namprd12.prod.outlook.com (2603:10b6:208:387::17) by PH8PR12MB7111.namprd12.prod.outlook.com (2603:10b6:510:22d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Wed, 24 Jan 2024 19:24:42 +0000 X-Received: from BL1PR12MB5732.namprd12.prod.outlook.com ([fe80::200:c1d0:b9aa:e16c]) by BL1PR12MB5732.namprd12.prod.outlook.com ([fe80::200:c1d0:b9aa:e16c%4]) with mapi id 15.20.7202.035; Wed, 24 Jan 2024 19:24:42 +0000 Message-ID: <4d8b55a7-0898-4ab3-90d0-394b3bd533de@amd.com> Date: Wed, 24 Jan 2024 13:24:40 -0600 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/ResetVector: send post codes to qemu debug console To: Laszlo Ersek , devel@edk2.groups.io, kraxel@redhat.com Cc: Jiewen Yao , Erdem Aktas , Ard Biesheuvel , Michael Roth , Min Xu , Oliver Steffen References: <20240124153107.2112760-1-kraxel@redhat.com> <67da33f7-5038-6732-455a-2576f641f1c0@redhat.com> From: "Lendacky, Thomas via groups.io" Autocrypt: addr=thomas.lendacky@amd.com; keydata= xsFNBFaNZYkBEADxg5OW/ajpUG7zgnUQPsMqWPjeAxtu4YH3lCUjWWcbUgc2qDGAijsLTFv1 kEbaJdblwYs28z3chM7QkfCGMSM29JWR1fSwPH18WyAA84YtxfPD8bfb1Exwo0CRw1RLRScn 6aJhsZJFLKyVeaPO1eequEsFQurRhLyAfgaH9iazmOVZZmxsGiNRJkQv4YnM2rZYi+4vWnxN 1ebHf4S1puN0xzQsULhG3rUyV2uIsqBFtlxZ8/r9MwOJ2mvyTXHzHdJBViOalZAUo7VFt3Fb aNkR5OR65eTL0ViQiRgFfPDBgkFCSlaxZvc7qSOcrhol160bK87qn0SbYLfplwiXZY/b/+ez 0zBtIt+uhZJ38HnOLWdda/8kuLX3qhGL5aNz1AeqcE5TW4D8v9ndYeAXFhQI7kbOhr0ruUpA udREH98EmVJsADuq0RBcIEkojnme4wVDoFt1EG93YOnqMuif76YGEl3iv9tYcESEeLNruDN6 LDbE8blkR3151tdg8IkgREJ+dK+q0p9UsGfdd+H7pni6Jjcxz8mjKCx6wAuzvArA0Ciq+Scg hfIgoiYQegZjh2vF2lCUzWWatXJoy7IzeAB5LDl/E9vz72cVD8CwQZoEx4PCsHslVpW6A/6U NRAz6ShU77jkoYoI4hoGC7qZcwy84mmJqRygFnb8dOjHI1KxqQAR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9mDjJr NdQdtvYxECabwtPaShqnRIE7HhQPu8Xr9adirnDw1Wruafmyxnn5W3rhJy06etmP0pzL6frN y46PmDPicLjX/srgemvLtHoeVRplL9ATAkmQ7yxXc6wBSwf1BYs9gAiwXbU1vMod0AXXRBym 0qhojoaSdRP5XTShfvOYdDozraaKx5Wx8X+oZvvjbbHhHGPL2seq97fp3nZ9h8TIQXRhO+aY vFkWitqCJg== In-Reply-To: <67da33f7-5038-6732-455a-2576f641f1c0@redhat.com> X-ClientProxiedBy: DS7PR05CA0029.namprd05.prod.outlook.com (2603:10b6:5:3b9::34) To BL1PR12MB5732.namprd12.prod.outlook.com (2603:10b6:208:387::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR12MB5732:EE_|PH8PR12MB7111:EE_ X-MS-Office365-Filtering-Correlation-Id: c4a55212-5e15-4a57-fec1-08dc1d121d70 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: ZEZN2jh583DKHpaORLaWhyo2inONurhvy2EdA3DHDaJ6LVaQ4Z0tLYgMh6S5tULtAe0YkDZAM4u86z0BEfh+PhR2smWkrkU97RqPxjIKK/X4BmR6Tkwp48wFJQHokp05lp3iVDANdb4C3pYKfMYLCtoukAUL5VFM6y8SLgzcgnngnsbc5RZM592+7Fi5cW83MCDLSDyQREO6sEvBvIIn/LoI/d2/UBu716n816Yfyp3CqpZiPt0IY+rkaff5bJWDOTex3bklzYo1HVPLrMjSFeamcCiGHEis0SXdLaHLcxYcnZOkHtcvelYDg5te9GbkL3nJ14YEmlkBkhEgo/ZzGHBXCiJzCgi/4A7R5QG5Svey9pOHFrjTI6HRqNYvwa2gjEvvWdmhw+toXD9rt+FvLgZPefJIoBmnC1g0PDX34waElTfJh+i0HjTvVKscf60v+ikMM2y7Jr2zT6OPEYEYYt9kzJ40DNviA+tI8bnZicPbr5SClIVOyqtqLsR/+4vOQV2FWDPXag3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OUJR?= =?utf-8?B?cVJFQ3U5eXlEWTArZFI3c20ydTlsOWYwcEgrSWNmS1l2UTJUUlBiR3gyU1JH?= =?utf-8?B?TWxzQTU3NVIzZVdtMnpEelFMVkRscUpqNlBDd3JBVUx4Tnd5Z0ZZanJ3SlJD?= =?utf-8?B?d0pMZmFYQjFIS3g4SkZhSkJEdEluR1lYS0hQT1ptMUlBZlVnaUdVRGozZk5U?= =?utf-8?B?VFJ4SFdjYVZjaVUrY1U5NlpINjlLU1BXRkVqblg2dWVGVkdTUXRhN2NlTk5H?= =?utf-8?B?cFlkMDdGMitFYU1qRGpqaWs3MGtvemVud05wOEZrYlJrT3ZFN1loeGhxUWpD?= =?utf-8?B?aW96d2lSQ1U1b05LZHFnUHFyU3RqVjlRN3J6MFJBK2hPb0pxNHd6blB6cmRL?= =?utf-8?B?dEFOUVpreldXMTJlUEloVER2UEJPeW5jUE41VzVZWlFoT2NYVGxOUm9qVVg2?= =?utf-8?B?WFRmMFlCZjJiUUxvQVJuWFR4SHlXaGdZa1AwVHlmZm83Q1Fpem15a0M4UTNH?= =?utf-8?Q?9ZbEKlHeW/LXATsM4HLcxoLX6?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4a55212-5e15-4a57-fec1-08dc1d121d70 X-MS-Exchange-CrossTenant-AuthSource: BL1PR12MB5732.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 19:24:42.1599 (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: RjJ5//25FaUQYCeRGWF+gkpfNuIa+cbo57fiM55CCgUm/UkDfGfvaLgpqG1jvQEerG08ckl8aJ06k/gLWFilZg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7111 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,thomas.lendacky@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Tt7l5QST6ibnQJp6dGmifhi3x7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=GqQFIIzt; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 1/24/24 10:47, Laszlo Ersek wrote: > On 1/24/24 16:31, Gerd Hoffmann wrote: >> Neat when doing ResetVector coding. >> >> Signed-off-by: Gerd Hoffmann >> --- >> OvmfPkg/ResetVector/DebugCon.asm | 43 +++++++++++++++++++++++++++ >> OvmfPkg/ResetVector/ResetVector.nasmb | 2 +- >> 2 files changed, 44 insertions(+), 1 deletion(-) >> create mode 100644 OvmfPkg/ResetVector/DebugCon.asm >> >> diff --git a/OvmfPkg/ResetVector/DebugCon.asm b/OvmfPkg/ResetVector/Debu= gCon.asm >> new file mode 100644 >> index 000000000000..9c57d1a52c75 >> --- /dev/null >> +++ b/OvmfPkg/ResetVector/DebugCon.asm >> @@ -0,0 +1,43 @@ >> +;----------------------------------------------------------------------= -------- >> +; @file >> +; qemu debug console support macros (based on serial port macros) >> +; >> +; Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved. >> +; SPDX-License-Identifier: BSD-2-Clause-Patent >> +; >> +;----------------------------------------------------------------------= -------- >> + >> +%macro outToDebugPort 1 >> + mov dx, 0x402 >> + mov al, %1 >> + out dx, al >> +%endmacro >> + >> +%macro debugShowCharacter 1 >> + outToDebugPort %1 >> +%endmacro >> + >> +%macro debugShowHexDigit 1 >> + %if (%1 < 0xa) >> + debugShowCharacter BYTE ('0' + (%1)) >> + %else >> + debugShowCharacter BYTE ('a' + ((%1) - 0xa)) >> + %endif >> +%endmacro >> + >> +%macro debugNewline 0 >> + debugShowCharacter `\r` >> + debugShowCharacter `\n` >> +%endmacro >> + >> +%macro debugShowPostCode 1 >> + debugShowHexDigit (((%1) >> 4) & 0xf) >> + debugShowHexDigit ((%1) & 0xf) >> + debugNewline >> +%endmacro >> + >> +BITS 16 >> + >> +%macro debugInitialize 0 >> + ; not required >> +%endmacro >> diff --git a/OvmfPkg/ResetVector/ResetVector.nasmb b/OvmfPkg/ResetVector= /ResetVector.nasmb >> index 5832aaa8abf7..f1655ddfcde3 100644 >> --- a/OvmfPkg/ResetVector/ResetVector.nasmb >> +++ b/OvmfPkg/ResetVector/ResetVector.nasmb >> @@ -41,7 +41,7 @@ >> %elifdef DEBUG_SERIAL >> %include "SerialDebug.asm" >> %else >> - %include "DebugDisabled.asm" >> + %include "DebugCon.asm" >> %endif >> =20 >> %include "Ia32/SearchForBfvBase.asm" >=20 > (1) How much output does this produce? Trapping to QEMU for every single > character written to the debug console is very slow. If it only produces > a few bytes, that should be OK. >=20 > (2) debugInitialize could actually be put to use; the presence of the > QEMU debug console is detectable. We'd need to allocate a single byte > somewhere, detect the console in debugInitialize, save the result in > that byte, then check the byte in debugShowPostCode. Eliminates even > those few (?) traps if there is no debug console configured. >=20 > (3) I'm already hating myself for asking about this, but... is there a > way for only customizing debugInitialize and debugShowCharacter? The > rest is common with "SerialDebug.asm", and I wish I hadn't had to review > those (unchanged) macros, they make my eyes bleed :/ >=20 > Anyway, if you think any of these (or all of these!) means too much > work, I'm OK with the patch going-in as is. My concern would be around SEV-ES/SEV-SNP guest usage. The in and out=20 instruction will generate a #VC and would require a #VC handler to be in=20 place. I'm pretty sure this will cause issues for those types of guests, but it=20 might be a few days before I can get to it to verify. @Gerd, were you able= =20 to test this with those types of guests? Thanks, Tom >=20 > I'm a bit concerned about (1), TBH. >=20 > Laszlo >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114350): https://edk2.groups.io/g/devel/message/114350 Mute This Topic: https://groups.io/mt/103933942/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-