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 AEC977803DF for ; Fri, 26 Jan 2024 16:16:57 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=lSsln1GW6M8q4QpOkAjfmG/oIEfmEbu0eBaJWHWYdpA=; 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: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=1706285816; v=1; b=c/0/WctvC7cnL0cjgGdUk/isnChuJCsbRBI/Bf2d0qfYviCH9Ld0uIjjYnWJmnh6qhqhddhW Ef1acIv89SDRj+upiWgoDl4rPDgtP1z1r554LYzduOfNaJg/AnOQ561UjfD2L00suYpxoauzuPj uRzXiSXN244vyVwk30Vyopk4= X-Received: by 127.0.0.2 with SMTP id HzFmYY7687511xgMMKKRDJKd; Fri, 26 Jan 2024 08:16:56 -0800 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.65]) by mx.groups.io with SMTP id smtpd.web10.1975.1706285815496277466 for ; Fri, 26 Jan 2024 08:16:55 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kg52ZPQ7wW9H0VLxS/GDmD+E4v/ReeJv5nJQfRFi057QgubDnBI5Un9r4YjnEoBO03oS9sh2DTcyGHgvazakbMvYmTiqH9CBTncznF5HFBIcDv2d3l4EOwGleh8bQlGtyaEQoxgdrGpehEOznkdXfRCsFhXhOW9e8xWD8cFEwtf4aiW3wa/9j2Y1Fa7p0d694Q1tKG4S/MLHdtLcPKj7e4ozM1r0QPCe2su8oEs/6wwvaEz0Z0iKwT4/IoqSst7d8vv80Vq6i7/qYe9nb8+hmUNVx/JXKPoJeYM2ES9GLRJpEYDpIUyC1+9vUWxDnarp4dMqVcue31U8prg7qFPQYg== 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=KjagoEWN244FlGAMOiamYt0xtlr+fZSFSjSL9umnYY4=; b=WqVahrNrmnqRyjJfG653Xw+m+6cD7DAHmgXBDU/fm27bbffQG0mfH2IT+tlU5Utb5iPjCYVUJmp1oH71VX57NjCm4GFdGYMKiJBMt+tZANq03LrzofRmd0G5tFk2G/CWtgFKM9JcCCPyx7qfFq3w/rxegnU70lxoSp/XKbP43mB9BL7zKeoInZFwUGgmYFnoVKb5/KGvC7z6RZzFOVtiDb7JCcxN0ttv+ipidK8DIwx1idfmfiE6J+vbeGPKJC2dFdK7BwcFLqdHjN3YLF/YLHZT/ouk5usScVS7kwF2NeVxNNQKSidZubxV61f/bgavGFYKGzHO+adEcZUu3mqt4A== 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 PH8PR12MB6817.namprd12.prod.outlook.com (2603:10b6:510:1c8::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.24; Fri, 26 Jan 2024 16:16:52 +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.7228.027; Fri, 26 Jan 2024 16:16:52 +0000 Message-ID: <65d6a640-9e5c-85b8-2cc1-55cd0cde338a@amd.com> Date: Fri, 26 Jan 2024 10:16:50 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [edk2-devel] [PATCH v2 1/1] OvmfPkg/ResetVector: send post codes to qemu debug console To: Gerd Hoffmann , devel@edk2.groups.io Cc: Erdem Aktas , Oliver Steffen , Jiewen Yao , Laszlo Ersek , Michael Roth , Ard Biesheuvel , Min Xu References: <20240126142913.169210-1-kraxel@redhat.com> From: "Lendacky, Thomas via groups.io" In-Reply-To: <20240126142913.169210-1-kraxel@redhat.com> X-ClientProxiedBy: SN7PR04CA0159.namprd04.prod.outlook.com (2603:10b6:806:125::14) To BL1PR12MB5732.namprd12.prod.outlook.com (2603:10b6:208:387::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR12MB5732:EE_|PH8PR12MB6817:EE_ X-MS-Office365-Filtering-Correlation-Id: a74f5a51-5754-4b1a-0952-08dc1e8a3524 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: vVFWTJkiZoQ+MIGEuWpaT1wJyOCpfS5VkzZhso/CUzg+SK7hpdp6eUd2DtgPNhPKG3fj0q1jTANe+fy6eoN2R/IduLiaL+xQaLv00zEfZ3NvLnjmX95VgvbN+jFUaZOgDqrIa2gyLL8uF6pSyIKHn+WozL7YNncs3LVNyhddtcsSFd01rVGP8BZSo6xn+rKuTN8woEt9DS/RTwJf6e4UIongZe7uymF4sxkQZNBs7RJ8Lq9f9JN6MmmQXdG1oc21MqK4YC40YiTM0zCGyfruHOOcXHlI78XN2BscV/MPHfEBsMa/+4hWmI0s+ME5ZfTGEECH8u2grRyq8KmhYKOKud/bDz6vFFcZdimBqBRKCpvQqjK2ri93wKimHB5RZ/XnXumJy556cpWxKS9AfzLOYUJ+QXg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=?utf-8?B?Wi9teGRscUJmdEoxZ2tUM3hNbmVQQk9XVXpWNEdmUXhSVmtUVWZLOTZ0bTUx?= =?utf-8?B?cCs3TDVmN2VERGVUY1J6Y3gvNXQva1VjR1VBRjBlRFVZQW9ycm9ieHc5c012?= =?utf-8?B?elhTZlhhcCs4L1BYQzNyakZ6WXM4alN3TDJnVGw5NnFxQmI4eDVKa2lGUU5v?= =?utf-8?B?RjMvTU12RjFiaFJSbXFnYUJiQStQNmEzQTl5VEpOeGcyZksrOHZnd3lGVzZJ?= =?utf-8?B?dlEzMTE0UXlSRjFqQzlKcXBSNTFKN0VVQ2JETko3WGxZRm1tQmF0UzhveHYx?= =?utf-8?B?UE9MSUNUcDBiY1hxT3VMc3BCNmUwSzdKMUNLRm52dHZRN2h5SGppQXVZdXlV?= =?utf-8?B?NG9KOEZJNXMxYmZ0LzZUQy9ieU56c1djQjkveVN5OS9KcWgwTWNOVU9NSUc4?= =?utf-8?B?N0xqVldXVUtWcjVCRXBjS29hbDV3SUc4VkhPbmJvcEpoR01lVzR5VlpNRGRt?= =?utf-8?B?OU1aVm5SczBoZ0ttSGdHOWhpem0xdFphOTdPeDNNcDhJRmR5RVJLUnB0MVN2?= =?utf-8?B?UzNlQnRrMmdXbHliUE8rVFFIZW9NSWhDREZ5YXZSZ2d4eTNNSy8ybTZaN2RE?= =?utf-8?Q?MBxH0ZdFRoNzdtpy/o2KqJNea?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a74f5a51-5754-4b1a-0952-08dc1e8a3524 X-MS-Exchange-CrossTenant-AuthSource: BL1PR12MB5732.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2024 16:16:52.7177 (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: NmiQnEizx6U2EISmHQCybrrLqqJPlrvl8yQD4CZ5xE1GsFhS1eQIwCAgvEm3z65rO3FcCY6EIGf0JBbIjAmAmA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6817 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: SPvcefZxmkfNvRQu7uInWj1Xx7686176AA= 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="c/0/Wctv"; 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/26/24 08:29, Gerd Hoffmann wrote: > Neat when doing ResetVector coding. > Incompatible with TDX and SEV, therefore not enabled by default. >=20 > Signed-off-by: Gerd Hoffmann Acked-by: Tom Lendacky > --- > OvmfPkg/ResetVector/QemuDebugCon.asm | 35 +++++++++++++++++++++++++++ > OvmfPkg/ResetVector/ResetVector.nasmb | 4 +++ > 2 files changed, 39 insertions(+) > create mode 100644 OvmfPkg/ResetVector/QemuDebugCon.asm >=20 > diff --git a/OvmfPkg/ResetVector/QemuDebugCon.asm b/OvmfPkg/ResetVector/Q= emuDebugCon.asm > new file mode 100644 > index 000000000000..e385ca1be83a > --- /dev/null > +++ b/OvmfPkg/ResetVector/QemuDebugCon.asm > @@ -0,0 +1,35 @@ > +;-----------------------------------------------------------------------= ------- > +; @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 debugShowCharacter 1 > + mov dx, 0x402 > + mov al, %1 > + out dx, al > +%endmacro > + > +%macro debugShowHexDigit 1 > + %if (%1 < 0xa) > + debugShowCharacter BYTE ('0' + (%1)) > + %else > + debugShowCharacter BYTE ('a' + ((%1) - 0xa)) > + %endif > +%endmacro > + > +%macro debugShowPostCode 1 > + debugShowHexDigit (((%1) >> 4) & 0xf) > + debugShowHexDigit ((%1) & 0xf) > + debugShowCharacter `\r` > + debugShowCharacter `\n` > +%endmacro > + > +BITS 16 > + > +%macro debugInitialize 0 > + ; not required > +%endmacro > diff --git a/OvmfPkg/ResetVector/ResetVector.nasmb b/OvmfPkg/ResetVector/= ResetVector.nasmb > index 5832aaa8abf7..69ce43ef6a96 100644 > --- a/OvmfPkg/ResetVector/ResetVector.nasmb > +++ b/OvmfPkg/ResetVector/ResetVector.nasmb > @@ -40,6 +40,10 @@ > %include "Port80Debug.asm" > %elifdef DEBUG_SERIAL > %include "SerialDebug.asm" > +%elif 0 > +; Set ^ this to 1 to enable postcodes on the qemu debug console. > +; Disabled by default because it is incompatible with SEV and TDX. > + %include "QemuDebugCon.asm" > %else > %include "DebugDisabled.asm" > %endif -=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 (#114620): https://edk2.groups.io/g/devel/message/114620 Mute This Topic: https://groups.io/mt/103976858/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-