From nobody Sat May 18 10:07:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=2; a=rsa-sha256; t=1648719888; cv=pass; d=zohomail.com; s=zohoarc; b=Uj8JpwBKc3OA8Q/UE5PRUYRWzonImTkUbs6/3vkPKs1VIEM5/hto+N8cGjv5R4EhaiohiBwdbKDm1Io6Xeb0cMTZKcnsAQ9wldrLwu4CSuYGjSTbkvug3tE7W4Dta6BX7vyBYEFz6lEFtVnw1i4fNgvnYc7O0Cd/zv1zin+nwjE= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648719888; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=voY3bdBFf59fNk/Uj9SHwXXjsrtdUHrNi408J4DKvGE=; b=nmToF+FcnDSBVPi6EPP2Ge6+lGMQd2JCihOtUTD1OdqrQaWrgyhcT+AtKoj/4yCoBMxZdXZa1C6Y/n6AxfLs/55cUooKhyQ/53AznHFixljIMlwXBFaVYnJpbq3icegU1iZlOZC+w5yEU4YguMAKC/0umD6dbpHJTFX6leJjIrs= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1648719888445543.5441095106557; Thu, 31 Mar 2022 02:44:48 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.296836.505406 (Exim 4.92) (envelope-from ) id 1nZrLm-000464-93; Thu, 31 Mar 2022 09:44:18 +0000 Received: by outflank-mailman (output) from mailman id 296836.505406; Thu, 31 Mar 2022 09:44:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrLm-00045x-4h; Thu, 31 Mar 2022 09:44:18 +0000 Received: by outflank-mailman (input) for mailman id 296836; Thu, 31 Mar 2022 09:44:17 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrLk-00045p-Uw for xen-devel@lists.xenproject.org; Thu, 31 Mar 2022 09:44:16 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 20c3e33f-b0d7-11ec-a405-831a346695d4; Thu, 31 Mar 2022 11:44:15 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2054.outbound.protection.outlook.com [104.47.13.54]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-29-_Zx8KvpfOFC4ipwVfs8MMg-1; Thu, 31 Mar 2022 11:44:14 +0200 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) by AM6PR04MB4648.eurprd04.prod.outlook.com (2603:10a6:20b:1b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.23; Thu, 31 Mar 2022 09:44:12 +0000 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476]) by DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476%7]) with mapi id 15.20.5123.021; Thu, 31 Mar 2022 09:44:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 20c3e33f-b0d7-11ec-a405-831a346695d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1648719855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=voY3bdBFf59fNk/Uj9SHwXXjsrtdUHrNi408J4DKvGE=; b=PonIiyPJ8xi0RxPUAUFSHwbsdj9RaDI4hIYYidOa3l3PShAbfp7hf1HCAGTU7LsH+ONUQA WXL5Eh69gGSV32ap9qnBILC5ggQrtUcvSMaOFobtOvQndpHE34Trc4CAiJAM1aheZNSc2F /GAYLbfzxo4sVDtEk5Z/oGQ7MwF6KMg= X-MC-Unique: _Zx8KvpfOFC4ipwVfs8MMg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aGBB3IaIQaaAJTyc6pgLpim2uzkIORrZFszSuuPPQOKyCJKlyCr+rs+Kwvvaof6AYOMX0kR5xHk9ju685fxDoHVhPHAYVcr6sh46gJgpuRxc4UWHvFQjwekkXkTe9YbXPUb05f4le1m4RZToADDfvsgEJ3EXnFY+NnhWba2Tabj8JHXQKj0hv6kOb/212vFL9MzvGfI7RT6iLWG4tdC7ED5/t3kF/ugAe/aGIVf6y1E0iOKt4QmBHfmtqhpmeYSKBB8ngGA5pAY4wyu97BRVGczuvPwtdGjSuTBRLDzZLDQpmY+BtuzeCG+UsaimgxZEDVvFRfcL6rjPjM/Wt/1+WA== 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=voY3bdBFf59fNk/Uj9SHwXXjsrtdUHrNi408J4DKvGE=; b=XU0lJtzet8bNjEAwuuPC5HXgmkL7haDRzUJx3tnq9s1GYh2huYAbUTFSpIQzrZn+NyXqhqboTMncFJJpu1Sb+F2d6VrJkeHoekCbk1fVUtgNVr/2kxOc4OSgvdHhEueiRi4GxRI9pfJCOMp7tidf9ThvAYAyTFZ0myRIIfZZ1F8h9RoXztTEJQzGQfUE8Fg6w8xYWBVsJfTO8afIEOr8GU7uaE51fa97qBTeb//GURwYr4DtfPnw5nvcQiCudfkP0kJYZ7wFkph2BWsWncFY1cg2NdqJH09CxzoHR60Cbxc+3eUC3CXbEbaAugNc4TMLXYL5v5NvtBP1LNzNIkXV+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <3fb7f3e9-a6cf-4f8e-1141-100848b1bdd0@suse.com> Date: Thu, 31 Mar 2022 11:44:10 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: [PATCH v4 1/8] x86/boot: make "vga=current" work with graphics modes Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , "community.manager@xenproject.org" , Henry Wang References: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> In-Reply-To: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AS9PR0301CA0059.eurprd03.prod.outlook.com (2603:10a6:20b:469::21) To DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ece3c8bd-43bc-4a8d-222f-08da12fb02c6 X-MS-TrafficTypeDiagnostic: AM6PR04MB4648:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 80A4EL+eI6t7xUX909/xDGhdfA3RNbvT8RSHhliLzKMd4lf4BEri2+v8JPRFGtqW+9f3Rvl9NyxIWH14TG+h1M6YNNkXAatL/KB5KRCegiDx4a6EKnK7yq79yO4j+vG0QOusFCcFDO5s5GfcQBZT5nAu3vnTgLHTbR8wcIKhIhhz7BEPpsbLNz6IiyASS+8d+QrBWHBtWkcqEjEBwqkfoZhYVyDqa4DTN4J9w+4AA5L+I1gJrvhYbgW6kK9kPwqbLT0UpOkvXoDGnrAuqJiC0SHijpCGhkymDGqSqPk+OR0usPZeTKBPg/Mx235IPRWcFy1Acq5+7/N0zmAPgZ/+SnBeNoOCtiSW4GybNzqtXAzlklaWjE78487WDueqLZ28ih0RjabjMBdkqgE2+GrUQSdhtilgyLH6BhgHWE69lO3hWxhlIyDdxg9Up+hi8EvHIONc2GxrxyCMzthDDgwtAyE2O+r1ILIdFewSBLW7p+WMiN8Y0oO1DxeBw4Lzi8Y4wnCYEOmKksO1rZHYYpWmrIpUgYmUhvNaEKeZV4AIFdab9HqL8NKT47al27X3s4cOqAx7+3CMA9U44VV0dZVhCbLPRXuJLILfXSf3s3QETvDw0sMlD5/PUzIWa1ooqxQPToBC1Fdp4tmGh6aK3drkW9CHgXdSimP91cmuu8OgnoQThm9yQ1PwyFcwJPglMJfk9GwmdmHDeOTjfE8fnjHg85r2lPsCLtEIoXBXPzvXpgQjj4QWFui6z9oh6ptE+ehspzFWI5DLOZuQIxKCXGX37EAiIGisSwxFDkMAWhzIoINL7ymZTlOCCaa4kgkT2LnBiI/Vk0vC73Q1rebKf1uxzw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8616.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(6916009)(316002)(2616005)(86362001)(31696002)(4326008)(26005)(5660300002)(54906003)(38100700002)(8676002)(8936002)(186003)(2906002)(36756003)(83380400001)(6512007)(66946007)(66556008)(66476007)(508600001)(6506007)(31686004)(6486002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dml1bnJJYVN1T0RkT1lKejFlanRUSWY2K3RQTG8zeThOWSs3cEZrVytJdWUz?= =?utf-8?B?WlY5dW5ybUFSL2dVMU9qQ0JUckFaVWprTUMzaUJjN3ZzRGJiUmMrRnQ5WjUz?= =?utf-8?B?VkhWNDlhUk1GWW4yWTdmU09kdVdCckNCV1I2cHR6ZjBMdWp3aFhwcDJxZ0dn?= =?utf-8?B?bFEwU1FWbXlIbGNybDF5MVVyMkM5L2NrS2cvYUVWbG9FR0c2U1VwV1Y1TXNa?= =?utf-8?B?OXdCWTdoMm5ub05qYUtmN2xrcUJEUFdJajJWVWRBWElleS9ENzlCM1JpTDhB?= =?utf-8?B?RkRsN1NqUk1DYWhGenJweGZsTSthNE1mRUFFQlIvOW5uY2dxb2FzUndRUmNB?= =?utf-8?B?dWg3QWpKcXhWQ0dKQjNrZitPOXhsa0R5dkdVU2tpT1Ixa1RLYnBZYUVCcEpa?= =?utf-8?B?NFZzMzZxODV0M0JS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g2YWJ3NWtv?= =?utf-8?B?c1ZaRjNlNlZWWTkzYVRWbXRRc2FBYmNZa3pGT3cwWlVYTDdOLy9QZTVtWjQ4?= =?utf-8?B?OWxmOGZjWmRxcGM5TEJwQ3EwdkZEVSthY1JXVysxV1h1blphWEQ5Zz09?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: ece3c8bd-43bc-4a8d-222f-08da12fb02c6 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8616.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2022 09:44:12.0539 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EJqxkes8nz84/DSHiQjx0dY81P4ef8p15sbRNV4asNPyzpTS2UZeYxyv1f8HDLhJMdgUKdMPE9Tdw55OvOxBZw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4648 X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1648719890019100001 Content-Type: text/plain; charset="utf-8" GrUB2 can be told to leave the screen in the graphics mode it has been using (or any other one), via "set gfxpayload=3Dkeep" (or suitable variants thereof). In this case we can avoid doing another mode switch ourselves. This in particular avoids possibly setting the screen to a less desirable mode: On one of my test systems the set of modes reported available by the VESA BIOS depends on whether the interposed KVM switch has that machine set as the active one. If it's not active, only modes up to 1024x768 get reported, while when active 1280x1024 modes are also included. For things to always work with an explicitly specified mode (via the "vga=3D" option), that mode therefore needs be a 1024x768 one. For some reason this only works for me with "multiboot2" (and "module2"); "multiboot" (and "module") still forces the screen into text mode, despite my reading of the sources suggesting otherwise. For starters I'm limiting this to graphics modes; I do think this ought to also work for text modes, but - I can't tell whether GrUB2 can set any text mode other than 80x25 (I've only found plain "text" to be valid as a "gfxpayload" setting), - I'm uncertain whether supporting that is worth it, since I'm uncertain how many people would be running their systems/screens in text mode, - I'd like to limit the amount of code added to the realmode trampoline. For starters I'm also limiting mode information retrieval to raw BIOS accesses. This will allow things to work (in principle) also with other boot environments where a graphics mode can be left in place. The downside is that this then still is dependent upon switching back to real mode, so retrieving the needed information from multiboot info is likely going to be desirable down the road. Signed-off-by: Jan Beulich Acked-by: Henry Wang Acked-by: Roger Pau Monn=C3=A9 --- I'm not convinced boot_vid_mode really needs setting here; I'm doing so mainly because setvesabysize also does. --- v4: Add changelog entry. v2: Use 0x9b instead of 0x99 for attributes check: I think the value used by check_vesa also wants to be converted, to match vesa2's. (Perhaps the value wants to become a #define, albeit before doing so I'd question the requirement of the mode to be a color one.) --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog =20 ## [unstable UNRELEASED](https://xenbits.xen.org/gitweb/?p=3Dxen.git;a=3Ds= hortlog;h=3Dstaging) - TBD =20 +### Changed + - On x86 "vga=3Dcurrent" can now be used together with GrUB2's gfxpayload= setting. Note that + this requires use of "multiboot2" (and "module2") as the GrUB commands = loading Xen. + ### Removed / support downgraded - dropped support for the (x86-only) "vesa-mtrr" and "vesa-remap" command= line options =20 --- a/xen/arch/x86/boot/video.S +++ b/xen/arch/x86/boot/video.S @@ -575,7 +575,6 @@ set14: movw $0x1111, %ax movb $0x01, %ah # Define cursor scan lines 11-12 movw $0x0b0c, %cx int $0x10 -set_current: stc ret =20 @@ -693,6 +692,39 @@ vga_modes: .word VIDEO_80x60, 0x50,0x3c,0 # 80x60 vga_modes_end: =20 +# If the current mode is a VESA graphics one, obtain its parameters. +set_current: + leaw vesa_glob_info, %di + movw $0x4f00, %ax + int $0x10 + cmpw $0x004f, %ax + jne .Lsetc_done + + movw $0x4f03, %ax + int $0x10 + cmpw $0x004f, %ax + jne .Lsetc_done + + leaw vesa_mode_info, %di # Get mode information structure + movw %bx, %cx + movw $0x4f01, %ax + int $0x10 + cmpw $0x004f, %ax + jne .Lsetc_done + + movb (%di), %al # Check mode attributes + andb $0x9b, %al + cmpb $0x9b, %al + jne .Lsetc_done # Doh! No linear frame buffer + + movb $1, bootsym(graphic_mode) + movw %bx, bootsym(boot_vid_mode) + movw %bx, bootsym(video_mode) + +.Lsetc_done: + stc + ret + # Detect VESA modes. vesa_modes: movw %di, %bp # BP=3Doriginal mode table end From nobody Sat May 18 10:07:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=2; a=rsa-sha256; t=1648719934; cv=pass; d=zohomail.com; s=zohoarc; b=PIPTBQVIZYgh/9Jh5sllqknBPzAT2a0krWsUAxu2AH+IBdBaCFvQXugOR2mN+DcwCET3DYD2JBBCgn3J7Kb9zaiwho0QEzSYJ9r3DTyYuIBV9NW7lYH/7eeJWE9yTvTALzt018YBu1CSPupTJ54nG3YlIRlERfef+b/CO/tu78U= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648719934; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ETCbNIJzLPkDjltdqaHsnx3bgSxxGyhUZegn+m7VW7s=; b=GC51632KF6bAa2GYCCS3cPqPQs6HlghDQVPRSp+qawHOQeGmAFaat8OKkF3EyijVTnQ3UuI+oRR95LE4u8nqQLW/bPaf+2cVP6r2kxkdYk6soZuw+OUU9or032TlteB7Ny6g6+mBTnYeI5188kHaBZQ+1dOCGk3lgv1sOnO9XGw= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1648719934868272.79748273466976; Thu, 31 Mar 2022 02:45:34 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.296841.505417 (Exim 4.92) (envelope-from ) id 1nZrMc-0004hN-M9; Thu, 31 Mar 2022 09:45:10 +0000 Received: by outflank-mailman (output) from mailman id 296841.505417; Thu, 31 Mar 2022 09:45:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrMc-0004hG-J0; Thu, 31 Mar 2022 09:45:10 +0000 Received: by outflank-mailman (input) for mailman id 296841; Thu, 31 Mar 2022 09:45:09 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrMb-00045p-C0 for xen-devel@lists.xenproject.org; Thu, 31 Mar 2022 09:45:09 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.111.102]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 3ffe2257-b0d7-11ec-a405-831a346695d4; Thu, 31 Mar 2022 11:45:08 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2050.outbound.protection.outlook.com [104.47.14.50]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-34-cc--GB0mPdO8edoJe2G7cQ-1; Thu, 31 Mar 2022 11:45:05 +0200 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) by AM6PR04MB4872.eurprd04.prod.outlook.com (2603:10a6:20b:e::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.21; Thu, 31 Mar 2022 09:45:04 +0000 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476]) by DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476%7]) with mapi id 15.20.5123.021; Thu, 31 Mar 2022 09:45:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3ffe2257-b0d7-11ec-a405-831a346695d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1648719907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ETCbNIJzLPkDjltdqaHsnx3bgSxxGyhUZegn+m7VW7s=; b=DEV74t5ThA16n7UEV02wmHM2xTfvePy+n8i2QcmlxYU2ZR96urpIz1ZVdYBC/+FIxJiRxo 8MFcFLpBSZOQQvCFNNW4svsc2i3Y9XT5uWKkxfs7Sl7XkoyOQYBcTnQOjoRyYieatGsJQQ k9KLWh2/CWQwER3atDkYC6Qyd3WzluA= X-MC-Unique: cc--GB0mPdO8edoJe2G7cQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nPSNShYPeNTBM70sgV242KuliwJZXFzDgjmCeTFOjdMkqCkJ+bVNqdlKP4NI4kc4IocJqFIyxo5CxRlrHS4AMy60KNm6MVXNdtYESf4Z/szAn1Rgw2Ip+ZoOIRoAF5H8WNrS+7XxQ9MR0f6WR8fqG0F1LellpsGm/q1zFDJaWdr9Mn9ZNin+efyvxmFBOGEpBjQZOyOEe70gNWpHfOYi4WEWRv8A3zYZQDkfQncozun/0fuxJen0pEj9kjAaYxaFzcpdns+VJk0yxQsLBjxKEEFyuf4IyqUqIdF13noSowbZnUKdF/I1Kqd2z05FlFjjXvW/HUz5S9EColab0FgGDQ== 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=ETCbNIJzLPkDjltdqaHsnx3bgSxxGyhUZegn+m7VW7s=; b=VQ2rId46MUo9qVGStwlcbx+W3VFT8i4oFkP3+dRbZkSVkd8xrenD4XLtYwcTHiSrpSUgMRRYdJFqEt4BOJzsDygPIWb+AgHnyt57Vt/nFW57XGeI6Oxk6jVdPYHHhwuZ24ppQOQFN8PcAjGlPvUQbLMFOUPcUzkOMqjKfdxaRaXLTOlv86n0HE9F+BtDzK3mf77EbBHOqoi4PEuFPcaiXEkf7/Y1nPFjiTxjGyAUk6y2mhn/JvygE5BpshqOYQ4/DeVQm67rD1O0GB94HIb/S9c5oLDCvgvTTzyxkYYqIukSffbQ+Kg/Ntyue6bah0QQ/WSzgHBLavszimdRa/sRcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <6fc25224-7985-73a6-8877-bc209f64bf8c@suse.com> Date: Thu, 31 Mar 2022 11:45:02 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: [PATCH v4 2/8] x86/boot: obtain video info from boot loader Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu References: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> In-Reply-To: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AS9PR0301CA0035.eurprd03.prod.outlook.com (2603:10a6:20b:469::15) To DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 18c6fe6d-3178-46bf-5432-08da12fb21b7 X-MS-TrafficTypeDiagnostic: AM6PR04MB4872:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TP9uEOny0fAKHiNy/8F7hDU+H4IiZnus0ENZsFB9lPMap+HC/3RTiNM4xhLuyaiHxMJXBqNchChhn/SpGDFTBJzHie9n5umJXjK1qFR1wftJ5bg/Bj4CwaC0kjSv1bx6qQ+4RcMUT/Eogrz5V3StVVn0LHhgBtv94rR+XWd6rcEWR+X85K7I/HG5fRgBfK0yey4gq6xLTSwaSOXF7tPfpqigdDH5Py/9Tco/06OqUblR8ytjOknvaKnLBNXP3JmQGGTs2hZNn/Rf+jSTEHskW1tWGBSouwuvd1EPTzlGJtT7hlF/iIbqkZELvcIdRnDd46VsSa2HWWz7FHeXO3vJN+iml8RlIaD3NhyQijjmBqyinA1y2aTy08zpet7tTwL3Z8nf2472tG7urFsbw/TgeLLFkuBEJO8H0wVNmOTgHAl6VbzViFakdCAcpMKjcU+NQQdH6PABQoS9j5/50cumxEfo3HYI2HFFCy6AbsZ8r7bfeGeGeoLnxnWxEtY1joWi+YmhGW0bl7hNu7Cspf1g1CVR8cnNpT84mHC2+SM5uQBiqBcNmaJXREvYVB7dVKOnOgkfZ3tBv+vxA9Jn6Yqr80bXGKduHuZwTlIVWbBz3/ied1y66k3jiab3Rv8b5585HwNEih7cj+XOelePq/Tf4oSqVRf8DaQCsri2GQaFUWzFAOPTgLyJAXP3gYuxa/+dzBWsaCACZGwLyEaJh8GsfTeMN44NeQ9XzQ08kzzox9KYB5vIagk/YXcT5/RWw9nJ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8616.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(6512007)(86362001)(8936002)(6506007)(31696002)(54906003)(8676002)(66946007)(4326008)(66556008)(6916009)(316002)(508600001)(6486002)(66476007)(38100700002)(5660300002)(26005)(186003)(36756003)(31686004)(2616005)(2906002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dW1MUGRSMlZVTnlkYTNGNVd1Mkdza0MyNnMxREhwTStlUGNreWRBYVk3NTVU?= =?utf-8?B?ZlpROFNNU2RLOXFadUlEQU5sNDJWTzdjY2ZueStoOC9jSDFIbnNtMzdNRm9v?= =?utf-8?B?V2NGM0E3ZkpFbTRMdXJGR0tkUWp4SEx3MXUvYlJaVlRMaXFGMG03amkxdWh4?= =?utf-8?B?eWQyRXUreDZROGhTV1k4dmN4aHRwVmVrNlpoMjN3eGxaaE5vWk1XYzJ0dmxP?= =?utf-8?B?d3haUmxDNlNQdUFJTzhzTlhoL3ptOXhqU2VQVm1NREVLYmdMY2d0WUhrNVNQ?= =?utf-8?B?WFVERjJ0RUs3ZFdJSTR5ckJSZnpx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f-8?B?aUk4eFFjaUNMdUgwcm9PWC9OMHRibGVtdm53VnhtTUlnM2hYeXVMTW9XYldM?= =?utf-8?B?SC9MMmFGMGpsL1hVNFQvbkJsMmgvWDd3OGVFY3J1Nm9kMVhKZ0ZtUHkvYUhz?= =?utf-8?B?S2NFK2tFNmczNzNmaW1GWmFYdkdGWURuNnZ1U0FwQXpndVlLR3RsajIwZmdP?= =?utf-8?B?eERFMS8vK1FFSkVrTzA5aUVvVXQzTkthSlZNR3IzdE9OdXJsOHlPQT09?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18c6fe6d-3178-46bf-5432-08da12fb21b7 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8616.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2022 09:45:04.0757 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KPM9OuvAHC+/LoM1pmWItF+hZbocw1jr35vHw2/dJL1/vLjouZbz0i9jzltGskog/P5I+wvDtNwCcM93XqVPZw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4872 X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1648719936498100001 Content-Type: text/plain; charset="utf-8" With MB2 the boot loader may provide this information, allowing us to obtain it without needing to enter real mode (assuming we don't need to set a new mode from "vga=3D", but can instead inherit the one the bootloader may have established). Signed-off-by: Jan Beulich Acked-by: Roger Pau Monn=C3=A9 --- v4: Re-base. v3: Re-base. v2: New. --- a/xen/arch/x86/boot/defs.h +++ b/xen/arch/x86/boot/defs.h @@ -53,6 +53,7 @@ typedef unsigned int u32; typedef unsigned long long u64; typedef unsigned int size_t; typedef u8 uint8_t; +typedef u16 uint16_t; typedef u32 uint32_t; typedef u64 uint64_t; =20 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -562,12 +562,18 @@ trampoline_setup: mov %esi, sym_esi(xen_phys_start) mov %esi, sym_esi(trampoline_xen_phys_start) =20 - mov sym_esi(trampoline_phys), %ecx - /* Get bottom-most low-memory stack address. */ + mov sym_esi(trampoline_phys), %ecx add $TRAMPOLINE_SPACE,%ecx =20 +#ifdef CONFIG_VIDEO + lea sym_esi(boot_vid_info), %edx +#else + xor %edx, %edx +#endif + /* Save Multiboot / PVH info struct (after relocation) for later u= se. */ + push %edx /* Boot video info to be filled from M= B2. */ push %ecx /* Bottom-most low-memory stack addres= s. */ push %ebx /* Multiboot / PVH information address= . */ push %eax /* Magic number. */ --- a/xen/arch/x86/boot/reloc.c +++ b/xen/arch/x86/boot/reloc.c @@ -14,9 +14,10 @@ =20 /* * This entry point is entered from xen/arch/x86/boot/head.S with: - * - 0x4(%esp) =3D MAGIC, - * - 0x8(%esp) =3D INFORMATION_ADDRESS, - * - 0xc(%esp) =3D TOPMOST_LOW_MEMORY_STACK_ADDRESS. + * - 0x04(%esp) =3D MAGIC, + * - 0x08(%esp) =3D INFORMATION_ADDRESS, + * - 0x0c(%esp) =3D TOPMOST_LOW_MEMORY_STACK_ADDRESS. + * - 0x10(%esp) =3D BOOT_VIDEO_INFO_ADDRESS. */ asm ( " .text \n" @@ -32,6 +33,39 @@ asm ( #include "../../../include/xen/kconfig.h" #include =20 +#ifdef CONFIG_VIDEO +# include "video.h" + +/* VESA control information */ +struct __packed vesa_ctrl_info { + uint8_t signature[4]; + uint16_t version; + uint32_t oem_name; + uint32_t capabilities; + uint32_t mode_list; + uint16_t mem_size; + /* We don't use any further fields. */ +}; + +/* VESA 2.0 mode information */ +struct vesa_mode_info { + uint16_t attrib; + uint8_t window[14]; /* We don't use the individual fields. */ + uint16_t bytes_per_line; + uint16_t width; + uint16_t height; + uint8_t cell_width; + uint8_t cell_height; + uint8_t nr_planes; + uint8_t depth; + uint8_t memory[5]; /* We don't use the individual fields. */ + struct boot_video_colors colors; + uint8_t direct_color; + uint32_t base; + /* We don't use any further fields. */ +}; +#endif /* CONFIG_VIDEO */ + #define get_mb2_data(tag, type, member) (((multiboot2_tag_##type##_t *)(= tag))->member) #define get_mb2_string(tag, type, member) ((u32)get_mb2_data(tag, type, me= mber)) =20 @@ -146,7 +180,7 @@ static multiboot_info_t *mbi_reloc(u32 m return mbi_out; } =20 -static multiboot_info_t *mbi2_reloc(u32 mbi_in) +static multiboot_info_t *mbi2_reloc(uint32_t mbi_in, uint32_t video_out) { const multiboot2_fixed_t *mbi_fix =3D _p(mbi_in); const multiboot2_memory_map_t *mmap_src; @@ -154,6 +188,9 @@ static multiboot_info_t *mbi2_reloc(u32 module_t *mbi_out_mods =3D NULL; memory_map_t *mmap_dst; multiboot_info_t *mbi_out; +#ifdef CONFIG_VIDEO + struct boot_video_info *video =3D NULL; +#endif u32 ptr; unsigned int i, mod_idx =3D 0; =20 @@ -254,17 +291,64 @@ static multiboot_info_t *mbi2_reloc(u32 ++mod_idx; break; =20 +#ifdef CONFIG_VIDEO + case MULTIBOOT2_TAG_TYPE_VBE: + if ( video_out ) + { + const struct vesa_ctrl_info *ci; + const struct vesa_mode_info *mi; + + video =3D _p(video_out); + ci =3D (void *)get_mb2_data(tag, vbe, vbe_control_info); + mi =3D (void *)get_mb2_data(tag, vbe, vbe_mode_info); + + if ( ci->version >=3D 0x0200 && (mi->attrib & 0x9b) =3D=3D= 0x9b ) + { + video->capabilities =3D ci->capabilities; + video->lfb_linelength =3D mi->bytes_per_line; + video->lfb_width =3D mi->width; + video->lfb_height =3D mi->height; + video->lfb_depth =3D mi->depth; + video->lfb_base =3D mi->base; + video->lfb_size =3D ci->mem_size; + video->colors =3D mi->colors; + video->vesa_attrib =3D mi->attrib; + } + + video->vesapm.seg =3D get_mb2_data(tag, vbe, vbe_interface= _seg); + video->vesapm.off =3D get_mb2_data(tag, vbe, vbe_interface= _off); + } + break; + + case MULTIBOOT2_TAG_TYPE_FRAMEBUFFER: + if ( (get_mb2_data(tag, framebuffer, framebuffer_type) !=3D + MULTIBOOT2_FRAMEBUFFER_TYPE_RGB) ) + { + video_out =3D 0; + video =3D NULL; + } + break; +#endif /* CONFIG_VIDEO */ + case MULTIBOOT2_TAG_TYPE_END: - return mbi_out; + goto end; /* Cannot "break;" here. */ =20 default: break; } =20 + end: + +#ifdef CONFIG_VIDEO + if ( video ) + video->orig_video_isVGA =3D 0x23; +#endif + return mbi_out; } =20 -void * __stdcall reloc(u32 magic, u32 in, u32 trampoline) +void *__stdcall reloc(uint32_t magic, uint32_t in, uint32_t trampoline, + uint32_t video_info) { alloc =3D trampoline; =20 @@ -274,7 +358,7 @@ void * __stdcall reloc(u32 magic, u32 in return mbi_reloc(in); =20 case MULTIBOOT2_BOOTLOADER_MAGIC: - return mbi2_reloc(in); + return mbi2_reloc(in, video_info); =20 case XEN_HVM_START_MAGIC_VALUE: if ( IS_ENABLED(CONFIG_PVH_GUEST) ) --- a/xen/arch/x86/boot/video.h +++ b/xen/arch/x86/boot/video.h @@ -28,4 +28,45 @@ /* The "recalculate timings" flag */ #define VIDEO_RECALC 0x8000 =20 +#ifndef __ASSEMBLY__ +struct boot_video_info { + uint8_t orig_x; /* 0x00 */ + uint8_t orig_y; /* 0x01 */ + uint8_t orig_video_mode; /* 0x02 */ + uint8_t orig_video_cols; /* 0x03 */ + uint8_t orig_video_lines; /* 0x04 */ + uint8_t orig_video_isVGA; /* 0x05 */ + uint16_t orig_video_points; /* 0x06 */ + + /* VESA graphic mode -- linear frame buffer */ + uint32_t capabilities; /* 0x08 */ + uint16_t lfb_linelength; /* 0x0c */ + uint16_t lfb_width; /* 0x0e */ + uint16_t lfb_height; /* 0x10 */ + uint16_t lfb_depth; /* 0x12 */ + uint32_t lfb_base; /* 0x14 */ + uint32_t lfb_size; /* 0x18 */ + union { + struct { + uint8_t red_size; /* 0x1c */ + uint8_t red_pos; /* 0x1d */ + uint8_t green_size; /* 0x1e */ + uint8_t green_pos; /* 0x1f */ + uint8_t blue_size; /* 0x20 */ + uint8_t blue_pos; /* 0x21 */ + uint8_t rsvd_size; /* 0x22 */ + uint8_t rsvd_pos; /* 0x23 */ + }; + struct boot_video_colors { + uint8_t rgbr[8]; + } colors; + }; + struct { + uint16_t seg; /* 0x24 */ + uint16_t off; /* 0x26 */ + } vesapm; + uint16_t vesa_attrib; /* 0x28 */ +}; +#endif /* __ASSEMBLY__ */ + #endif /* __BOOT_VIDEO_H__ */ --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -532,35 +532,7 @@ static void __init setup_max_pdx(unsigne static struct e820map __initdata boot_e820; =20 #ifdef CONFIG_VIDEO -struct boot_video_info { - u8 orig_x; /* 0x00 */ - u8 orig_y; /* 0x01 */ - u8 orig_video_mode; /* 0x02 */ - u8 orig_video_cols; /* 0x03 */ - u8 orig_video_lines; /* 0x04 */ - u8 orig_video_isVGA; /* 0x05 */ - u16 orig_video_points; /* 0x06 */ - - /* VESA graphic mode -- linear frame buffer */ - u32 capabilities; /* 0x08 */ - u16 lfb_linelength; /* 0x0c */ - u16 lfb_width; /* 0x0e */ - u16 lfb_height; /* 0x10 */ - u16 lfb_depth; /* 0x12 */ - u32 lfb_base; /* 0x14 */ - u32 lfb_size; /* 0x18 */ - u8 red_size; /* 0x1c */ - u8 red_pos; /* 0x1d */ - u8 green_size; /* 0x1e */ - u8 green_pos; /* 0x1f */ - u8 blue_size; /* 0x20 */ - u8 blue_pos; /* 0x21 */ - u8 rsvd_size; /* 0x22 */ - u8 rsvd_pos; /* 0x23 */ - u16 vesapm_seg; /* 0x24 */ - u16 vesapm_off; /* 0x26 */ - u16 vesa_attrib; /* 0x28 */ -}; +# include "boot/video.h" extern struct boot_video_info boot_vid_info; #endif =20 --- a/xen/include/xen/multiboot2.h +++ b/xen/include/xen/multiboot2.h @@ -158,6 +158,59 @@ typedef struct { multiboot2_memory_map_t entries[]; } multiboot2_tag_mmap_t; =20 +typedef struct +{ + uint32_t type; + uint32_t size; + uint16_t vbe_mode; + uint16_t vbe_interface_seg; + uint16_t vbe_interface_off; + uint16_t vbe_interface_len; + uint8_t vbe_control_info[512]; + uint8_t vbe_mode_info[256]; +} multiboot2_tag_vbe_t; + +typedef struct +{ + uint8_t red; + uint8_t green; + uint8_t blue; +} multiboot2_color_t; + +typedef struct +{ + uint32_t type; + uint32_t size; + uint64_t framebuffer_addr; + uint32_t framebuffer_pitch; + uint32_t framebuffer_width; + uint32_t framebuffer_height; + uint8_t framebuffer_bpp; +#define MULTIBOOT2_FRAMEBUFFER_TYPE_INDEXED 0 +#define MULTIBOOT2_FRAMEBUFFER_TYPE_RGB 1 +#define MULTIBOOT2_FRAMEBUFFER_TYPE_EGA_TEXT 2 + uint8_t framebuffer_type; + uint16_t reserved; + + union + { + struct + { + uint16_t framebuffer_palette_num_colors; + multiboot2_color_t framebuffer_palette[]; + }; + struct + { + uint8_t framebuffer_red_field_position; + uint8_t framebuffer_red_mask_size; + uint8_t framebuffer_green_field_position; + uint8_t framebuffer_green_mask_size; + uint8_t framebuffer_blue_field_position; + uint8_t framebuffer_blue_mask_size; + }; + }; +} multiboot2_tag_framebuffer_t; + typedef struct { u32 type; u32 size; From nobody Sat May 18 10:07:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=2; a=rsa-sha256; t=1648719974; cv=pass; d=zohomail.com; s=zohoarc; b=JsBrMvcaEiY6SFurXpFXrcgcyq/yiw5cspn+gDDtc9fFCSVKeJPNIm2c7K4gyBJ0BHgAFwrSiBTtI01IQUsYt+PaXQ/UTt8QmF2zeYPRc5oOZR1KbuY2pV6Z7icYhaQdD303jSMG9M+/wCCoqHJQWKokwpWFy30VVpwyNWEgiLc= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648719974; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=m25bQHGvRlZ6OFGo8TfnVKsBCikksi3mWW9OB5EgvG4=; b=WdfwDmlE1RAdbmgyUnIsInuxeca0oSa0q5qR2vWSzxkIdNyGITlXmcnID7Ul7wGMhhIMPry/OYJDoBX33nR117ifOiBLxGrLfT1261UtV9AyYHuJE0qCHrUnYs+CnT4Om6q7qWY0RH4MbsFVSwvj0f7S2BFBrlr0iVcfJny9IHA= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1648719974493252.67994427694146; Thu, 31 Mar 2022 02:46:14 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.296843.505427 (Exim 4.92) (envelope-from ) id 1nZrND-0005Gj-Vl; Thu, 31 Mar 2022 09:45:47 +0000 Received: by outflank-mailman (output) from mailman id 296843.505427; Thu, 31 Mar 2022 09:45:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrND-0005Gc-Sp; Thu, 31 Mar 2022 09:45:47 +0000 Received: by outflank-mailman (input) for mailman id 296843; Thu, 31 Mar 2022 09:45:46 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrNB-0005Fx-TD for xen-devel@lists.xenproject.org; Thu, 31 Mar 2022 09:45:46 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 55da7f19-b0d7-11ec-a405-831a346695d4; Thu, 31 Mar 2022 11:45:44 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2169.outbound.protection.outlook.com [104.47.17.169]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-25--BRcJu6zMqa_lHsaJYM9qQ-1; Thu, 31 Mar 2022 11:45:41 +0200 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) by HE1PR0402MB2828.eurprd04.prod.outlook.com (2603:10a6:3:da::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.21; Thu, 31 Mar 2022 09:45:38 +0000 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476]) by DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476%7]) with mapi id 15.20.5123.021; Thu, 31 Mar 2022 09:45:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 55da7f19-b0d7-11ec-a405-831a346695d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1648719944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m25bQHGvRlZ6OFGo8TfnVKsBCikksi3mWW9OB5EgvG4=; b=IdtEel9lxtzZo3Tr3XuOr/kQ9jpt9d8SciuWJ8l9eytaqUV1bVLkx0Q8abI4+YOJxjsc/d fAp2nXPebAWmCJ19HzWVH9HFfPFax2Yl3hdtanLgnLq2bzWYBTrE1sLCWsEt0JmU0DkCoa OdO2Bl4MnrzVQGmQ/qJGJgMdzMY5UpU= X-MC-Unique: -BRcJu6zMqa_lHsaJYM9qQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Otxb3qpVgo1DpQ8T9p/IMyIl3QEWoRQ41nbycsk/XjZKqteODX+7MiKiKijsTObT3h/Ir5+bHp6+lhx1Pkg+HAUm1be/dBHobkZ2Bk4zfXgvDrJYz1GCZWanq4wGg8eI0hKea7dSwdCucFMFxeobSFaOZLPLiSUODqCItmPayHcs3brtUzLnDxrnqA5fhyI6GXHCJR0DlOmnraiOK9rjvdExHksLDwl4nuRszzVpeMJ+wKsZjoB4yQu6UEyS1Jf8tyq4u0d4qnK3tnI6mVhRgqsA9RYsYD3YUBdUM1TzGDxQlQWpHDHyo4qAQBguCGSJiCdrPxPXdSXZlEHC+XqJqg== 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=m25bQHGvRlZ6OFGo8TfnVKsBCikksi3mWW9OB5EgvG4=; b=bwSWXy4EPuTbO7Tysuv7vIPL7eSa+6oFiOrZ4S4FsV72g+tZRgp+JRr9k+0OOdGY3yazDcIw8Tgu7lQULslQ2lh7q/j2NCbXXxDWcShRV21fYFmDrkAMEtoGkJGkJFH+naa0vbRNvhEOmLGoVX+8LRzoyQW6ucHDkqtsPgvL5JiJ9nkuQ8Q4PC20TJ244s4awUxNcDaSyHyjPJ84vCGl9r8KwWEh1W4ukDG8Mm5ClVfSl8R2MopLwp5FOyUIqQhBjapxDJQ0etVsTlJtF11VYehF6tUWAsmAPvHVEBcasp2zitHuiYUXTzjy46+MljG63d7w7FevwClCWKn4RT38gQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: Date: Thu, 31 Mar 2022 11:45:36 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: [PATCH v4 3/8] x86/EFI: retrieve EDID Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Julien Grall , Stefano Stabellini , Volodymyr Babchuk , Bertrand Marquis References: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> In-Reply-To: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM6P191CA0033.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8b::46) To DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b44cde77-0441-4ee7-db06-08da12fb3657 X-MS-TrafficTypeDiagnostic: HE1PR0402MB2828:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EvMrlE7EOu69WZp2NY76Z7FrCpazd4T0hyEV7p8dPEDBE0weQ5Rpa9r7CscgtMGTLT79+y8qJGRVTuroNjzkY211zlRBT5ksciUM2BlspkJOPYBcQOI3ClTPCyinU5xQ24guKM6OqwUI1bh66Obx6TZfnUrz0q+RcZmB/0z6I95QItw+pLSEmuWQDfqGYb9p7VjKeM+zlBbo6BB9EsoetbXEhhKLujTNGFWgQVp+5JCIsZEgLHr7tQb+7oc+9gu+o9tUMtKFNxKax64QLnxMVLmoDQEof9Qz2kYf490PNe2Dv6tS8I4pNxW1RjPKt6BARIzmh2jEQTp26KtIlKNW7e7XkBbL2e1JDFeoojtPRMlp2kgF3tZcrC9T9M9Toqh3r4EuQGv6cUK251rhitXI88Gd5JRuoTfBvrvmo/36HPMJkh6+TvpEeltgC81KM1J2dq/iR10w78JmCmi5ll570fiM18dT0H2akI5CeXXFYwJcwOKFsi2OW6wabDbONaxyyhh3yV0Z8NC0lc92UUR7M1qLsDUpuNnvBc1kSaZSevCzKi7BZ0EwgGifKMFmeHw/FyMzWDAlT78eGi4rmTh5xgan4aawAmzWhyYrutf0qS8A2/AFEO+/VF74HaDeHYXmybQUR0ZEV77nyYIBZ41lyi85yGcWtcKWbsgTDgD50uDGuIxZjcCfvuRz9rHOmbgfmFLJGbPt5e5hBWqulJRgQXeOfbUJRb8iuHpRTKN0xi2enYsuOQRzpn0RtssWuYbuKLtDHjZIUeNKeqQkwUYcBQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8616.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(83380400001)(8676002)(66946007)(86362001)(66556008)(4326008)(36756003)(6506007)(31686004)(2906002)(8936002)(66476007)(5660300002)(31696002)(54906003)(6916009)(508600001)(38100700002)(6486002)(186003)(6512007)(26005)(316002)(2616005)(21314003)(45980500001)(43740500002);DIR:OUT;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dVJrTzdScEx6WGxh?= =?utf-8?B?R09DdDQvd3JNZGlJUE1jM1NHengxVmhBc0xqbmNMVkNlS1JqUld5RDNLN3VH?= =?utf-8?B?YnRMUncrV1kva0RDeDFSYTRjcCs5NysxeHRkemk0SWRkVEZCNk5VZkZTWDZP?= =?utf-8?B?amdvYTNSNXpkMVVZZW42akl6VFFYbXFMb0JzTG83aUJsNk4zZWRUNnova0VH?= =?utf-8?B?TjJmYVZjWmpscTRJTUozWGpETVJyL0ZpMUpYNE10eHdBSWo1bGlud3RDK0Rw?= =?utf-8?B?ZU5Wd0dZNW8wRVVyWG5TWXkrOVdGWWM2cHNVTTgwVkVybWJSQ05SOGlLaytq?= =?utf-8?B?Y2ZIYStMV3hKZWFtNEdJb0ExVi8yRTVwZlNjUlZVRFdVRVpmVDUzdWRCLzVV?= =?utf-8?B?aUJjS0dhK3Q4ZUtiVUpyUHlOLy8rNTBHSmtvL0ZnblpkNmFGRUdzWUVxQVlO?= =?utf-8?B?cUVWVlY4MC9IaFFVeVJzemxaVG1jOWFicTFVWXBiczlsL2VHb3B0MVgzUVpN?= =?utf-8?B?OGh4UU9kN0ZDdWFFWm1VblpwdVMyc2xUNDA0bTBDY2tuMG16RDFIcXN2MGNR?= =?utf-8?B?OVJmMHQrZDhhS2wzQkFwK25vZ0xXNXJXYkd0K1l3Z3pRNllaTjFtQT09?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: b44cde77-0441-4ee7-db06-08da12fb3657 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8616.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2022 09:45:38.5571 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: w2SiAJFyLNHtoHm4FE1+i7FtICm1KO/9nMAKqUb9h4NPnZGpulkggZFloi3TC1Kl8lHck7Av/SCPSxpvZgwtYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0402MB2828 X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1648719976715100001 Content-Type: text/plain; charset="utf-8" When booting directly from EFI, obtaining this information from EFI is the only possible way. And even when booting with a boot loader interposed, it's more clean not to use legacy BIOS calls for this purpose. (The downside being that there are no "capabilities" that we can retrieve the EFI way.) To achieve this we need to propagate the handle used to obtain the EFI_GRAPHICS_OUTPUT_PROTOCOL instance for further obtaining an EFI_EDID_*_PROTOCOL instance, which has been part of the spec since 2.5. Signed-off-by: Jan Beulich Acked-by: Bertrand Marquis #arm Reviewed-by: Luca Fancellu --- Setting boot_edid_caps to zero isn't desirable, but arbitrarily setting one or both of the two low bits also doesn't seem appropriate. GrUB also checks an "agp-internal-edid" variable. As I haven't been able to find any related documentation, and as GrUB being happy about the variable being any size (rather than at least / precisely 128 bytes), I didn't follow that route. --- v3: Re-base. v2: New. --- a/xen/arch/arm/efi/efi-boot.h +++ b/xen/arch/arm/efi/efi-boot.h @@ -464,6 +464,10 @@ static void __init efi_arch_edd(void) { } =20 +static void __init efi_arch_edid(EFI_HANDLE gop_handle) +{ +} + static void __init efi_arch_memory_setup(void) { } --- a/xen/arch/x86/boot/video.S +++ b/xen/arch/x86/boot/video.S @@ -922,7 +922,14 @@ store_edid: pushw %dx pushw %di =20 - cmpb $1, bootsym(opt_edid) # EDID disabled on cmdline (edid= =3Dno)? + movb bootsym(opt_edid), %al + cmpw $0x1313, bootsym(boot_edid_caps) # Data already retrieved? + je .Lcheck_edid + cmpb $2, %al # EDID forced on cmdline (edid=3Df= orce)? + jne .Lno_edid + +.Lcheck_edid: + cmpb $1, %al # EDID disabled on cmdline (edid= =3Dno)? je .Lno_edid =20 leaw vesa_glob_info, %di --- a/xen/arch/x86/efi/efi-boot.h +++ b/xen/arch/x86/efi/efi-boot.h @@ -568,6 +568,49 @@ static void __init efi_arch_video_init(E #endif } =20 +#ifdef CONFIG_VIDEO +static bool __init copy_edid(const void *buf, unsigned int size) +{ + /* + * Be conservative - for both undersized and oversized blobs it is unc= lear + * what to actually do with them. The more that unlike the VESA BIOS + * interface we also have no associated "capabilities" value (which mi= ght + * carry a hint as to possible interpretation). + */ + if ( size !=3D ARRAY_SIZE(boot_edid_info) ) + return false; + + memcpy(boot_edid_info, buf, size); + boot_edid_caps =3D 0; + + return true; +} +#endif + +static void __init efi_arch_edid(EFI_HANDLE gop_handle) +{ +#ifdef CONFIG_VIDEO + static EFI_GUID __initdata active_guid =3D EFI_EDID_ACTIVE_PROTOCOL_GU= ID; + static EFI_GUID __initdata discovered_guid =3D EFI_EDID_DISCOVERED_PRO= TOCOL_GUID; + EFI_EDID_ACTIVE_PROTOCOL *active_edid; + EFI_EDID_DISCOVERED_PROTOCOL *discovered_edid; + EFI_STATUS status; + + status =3D efi_bs->OpenProtocol(gop_handle, &active_guid, + (void **)&active_edid, efi_ih, NULL, + EFI_OPEN_PROTOCOL_GET_PROTOCOL); + if ( status =3D=3D EFI_SUCCESS && + copy_edid(active_edid->Edid, active_edid->SizeOfEdid) ) + return; + + status =3D efi_bs->OpenProtocol(gop_handle, &discovered_guid, + (void **)&discovered_edid, efi_ih, NULL, + EFI_OPEN_PROTOCOL_GET_PROTOCOL); + if ( status =3D=3D EFI_SUCCESS ) + copy_edid(discovered_edid->Edid, discovered_edid->SizeOfEdid); +#endif +} + static void __init efi_arch_memory_setup(void) { unsigned int i; @@ -729,6 +772,7 @@ static void __init efi_arch_flush_dcache void __init efi_multiboot2(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *Syste= mTable) { EFI_GRAPHICS_OUTPUT_PROTOCOL *gop; + EFI_HANDLE gop_handle; UINTN cols, gop_mode =3D ~0, rows; =20 __set_bit(EFI_BOOT, &efi_flags); @@ -742,11 +786,15 @@ void __init efi_multiboot2(EFI_HANDLE Im &cols, &rows) =3D=3D EFI_SUCCESS ) efi_arch_console_init(cols, rows); =20 - gop =3D efi_get_gop(); + gop =3D efi_get_gop(&gop_handle); =20 if ( gop ) + { gop_mode =3D efi_find_gop_mode(gop, 0, 0, 0); =20 + efi_arch_edid(gop_handle); + } + efi_arch_edd(); efi_arch_cpu(); =20 --- a/xen/common/efi/boot.c +++ b/xen/common/efi/boot.c @@ -118,7 +118,7 @@ static bool read_section(const EFI_LOADE =20 static void efi_init(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable= ); static void efi_console_set_mode(void); -static EFI_GRAPHICS_OUTPUT_PROTOCOL *efi_get_gop(void); +static EFI_GRAPHICS_OUTPUT_PROTOCOL *efi_get_gop(EFI_HANDLE *gop_handle); static UINTN efi_find_gop_mode(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop, UINTN cols, UINTN rows, UINTN depth); static void efi_tables(void); @@ -758,7 +758,7 @@ static void __init efi_console_set_mode( StdOut->SetMode(StdOut, best); } =20 -static EFI_GRAPHICS_OUTPUT_PROTOCOL __init *efi_get_gop(void) +static EFI_GRAPHICS_OUTPUT_PROTOCOL __init *efi_get_gop(EFI_HANDLE *gop_ha= ndle) { EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *mode_info; EFI_GRAPHICS_OUTPUT_PROTOCOL *gop =3D NULL; @@ -783,7 +783,10 @@ static EFI_GRAPHICS_OUTPUT_PROTOCOL __in continue; status =3D gop->QueryMode(gop, gop->Mode->Mode, &info_size, &mode_= info); if ( !EFI_ERROR(status) ) + { + *gop_handle =3D handles[i]; break; + } } if ( handles ) efi_bs->FreePool(handles); @@ -1222,6 +1225,7 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SY if ( use_cfg_file ) { EFI_FILE_HANDLE dir_handle; + EFI_HANDLE gop_handle; UINTN depth, cols, rows, size; =20 size =3D cols =3D rows =3D depth =3D 0; @@ -1230,7 +1234,7 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SY &cols, &rows) =3D=3D EFI_SUCCESS ) efi_arch_console_init(cols, rows); =20 - gop =3D efi_get_gop(); + gop =3D efi_get_gop(&gop_handle); =20 /* Get the file system interface. */ dir_handle =3D get_parent_handle(loaded_image, &file_name); @@ -1360,7 +1364,11 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SY dir_handle->Close(dir_handle); =20 if ( gop && !base_video ) + { gop_mode =3D efi_find_gop_mode(gop, cols, rows, depth); + + efi_arch_edid(gop_handle); + } } =20 /* Get the number of boot modules specified on the DT or an error (<0)= */ @@ -1387,7 +1395,6 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SY =20 efi_arch_edd(); =20 - /* XXX Collect EDID info. */ efi_arch_cpu(); =20 efi_tables(); --- a/xen/include/efi/efiprot.h +++ b/xen/include/efi/efiprot.h @@ -724,5 +724,52 @@ struct _EFI_GRAPHICS_OUTPUT_PROTOCOL { EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT Blt; EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode; }; + +/* + * EFI EDID Discovered Protocol + * UEFI Specification Version 2.5 Section 11.9 + */ +#define EFI_EDID_DISCOVERED_PROTOCOL_GUID \ + { 0x1C0C34F6, 0xD380, 0x41FA, { 0xA0, 0x49, 0x8a, 0xD0, 0x6C, 0x1A, 0x= 66, 0xAA} } + +typedef struct _EFI_EDID_DISCOVERED_PROTOCOL { + UINT32 SizeOfEdid; + UINT8 *Edid; +} EFI_EDID_DISCOVERED_PROTOCOL; + +/* + * EFI EDID Active Protocol + * UEFI Specification Version 2.5 Section 11.9 + */ +#define EFI_EDID_ACTIVE_PROTOCOL_GUID \ + { 0xBD8C1056, 0x9F36, 0x44EC, { 0x92, 0xA8, 0xA6, 0x33, 0x7F, 0x81, 0x= 79, 0x86} } + +typedef struct _EFI_EDID_ACTIVE_PROTOCOL { + UINT32 SizeOfEdid; + UINT8 *Edid; +} EFI_EDID_ACTIVE_PROTOCOL; + +/* + * EFI EDID Override Protocol + * UEFI Specification Version 2.5 Section 11.9 + */ +#define EFI_EDID_OVERRIDE_PROTOCOL_GUID \ + { 0x48ECB431, 0xFB72, 0x45C0, { 0xA9, 0x22, 0xF4, 0x58, 0xFE, 0x04, 0x= 0B, 0xD5} } + +INTERFACE_DECL(_EFI_EDID_OVERRIDE_PROTOCOL); + +typedef +EFI_STATUS +(EFIAPI *EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID) ( + IN struct _EFI_EDID_OVERRIDE_PROTOCOL *This, + IN EFI_HANDLE *ChildHandle, + OUT UINT32 *Attributes, + IN OUT UINTN *EdidSize, + IN OUT UINT8 **Edid); + +typedef struct _EFI_EDID_OVERRIDE_PROTOCOL { + EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID GetEdid; +} EFI_EDID_OVERRIDE_PROTOCOL; + #endif From nobody Sat May 18 10:07:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=2; a=rsa-sha256; t=1648720167; cv=pass; d=zohomail.com; s=zohoarc; b=dEYQgdbm4WvRVhJpQ45hqGfiHAn0IvoIqFJ1t9kiXwXo3OGf00mLw2FqzMlOU/mTapjmvyKJNgS5NoGiNpfg/OTsE9JJyfCQjo7y/LE6yWU2dKuN5q8bd63iKDo8pDDLW+oc8YYfU98N/xdnVAMvBwm+CYsWf/u3tTTeHmj+7Nc= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648720167; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+iOZotKkLcJY4CXebIky0sg+x0ejVE7dgfMqo24AelE=; b=PlgkiClgvbK1u16/p7A59KTHmJxovt4OtQ0iVVsuefI3lqSXvIKCQOhBmTHyfFvsOxSsUqe14cqrKOTAvssLB2KOocuJCZFUBbleV39i1jrFeJ/KM623ZWS3EN2QmfksbYlBPnybp45GVQau6B2u8ynecXjP3C8earTNTIWPmus= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1648720167503555.3321933699292; Thu, 31 Mar 2022 02:49:27 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.296851.505438 (Exim 4.92) (envelope-from ) id 1nZrQJ-00061N-IE; Thu, 31 Mar 2022 09:48:59 +0000 Received: by outflank-mailman (output) from mailman id 296851.505438; Thu, 31 Mar 2022 09:48:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrQJ-00061G-FG; Thu, 31 Mar 2022 09:48:59 +0000 Received: by outflank-mailman (input) for mailman id 296851; Thu, 31 Mar 2022 09:48:58 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrQI-00061A-Am for xen-devel@lists.xenproject.org; Thu, 31 Mar 2022 09:48:58 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.111.102]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c8b1afa1-b0d7-11ec-8fbc-03012f2f19d4; Thu, 31 Mar 2022 11:48:57 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2108.outbound.protection.outlook.com [104.47.18.108]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-22-vT_QhzW5OQ6fFsj6KKT39g-1; Thu, 31 Mar 2022 11:48:55 +0200 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) by DB8PR04MB5658.eurprd04.prod.outlook.com (2603:10a6:10:b2::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.21; Thu, 31 Mar 2022 09:48:53 +0000 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476]) by DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476%7]) with mapi id 15.20.5123.021; Thu, 31 Mar 2022 09:48:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c8b1afa1-b0d7-11ec-8fbc-03012f2f19d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1648720137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+iOZotKkLcJY4CXebIky0sg+x0ejVE7dgfMqo24AelE=; b=mSZ+pWlHMapCjOv8Z5jMUFOZ31LDjO8M+c1k1sGz5DM3c6l1URMMLAM4OaGm/lZYDXL/sx RlaVeNxrerz1JdNARauPanNZ6nGM73MD/0+Mxzz7iHepvnUeuyOUK8hhnRKkd0UQQ8PMB0 k/paZDVLiuQIlGTax664qcdGw+BlYhs= X-MC-Unique: vT_QhzW5OQ6fFsj6KKT39g-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cqsBu+6ePMeKPUKtlK+T6vluiV064gyg20OE+23C8O/tqo2sMVI2JTaqiCxoLzZ7uZHHl0khz5kobi+VWWpJzZphHspnbXlhudXNLwltSa8wp4axIPSj3sgMaapjs2Tsvk9qxbwRX4VE/6AZGVaBYjAuM+lsWUDFTtvTdBkpinlUl6aJVl0YIiBYWhCVGyU0i1X1QleG1aX3LgqYT+7uY7iV3x5P2DDfMBs4d/1Zwm3UOVRzBG1612bVGtTDPBjfHrilA7kZ5hmIgk7yN5jaSUuvozkb/RFh8ZXA7aLIklwxbGdTwxm7ieBs+Zfd65WBIM8m2wFsCOrsAdrYoh/g/w== 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=+iOZotKkLcJY4CXebIky0sg+x0ejVE7dgfMqo24AelE=; b=M0BjXn32/8ZRyQH0wWtsIVi6N28EeS6yHYI32DM239fiGn0cXprZqge/BE/aufuRvaX3B0aGYDSIsz3rM/Ot5pgOk34n4l08scdq8bxOXzjkKrVKRLZsfFjgm7rl4q7fNA8l6SxYJiomSqkPnY/ZC9ji3oxbhISSHiFrjCSFz/Nul2YuCdoxGCi/SyOgLsNRM0iD9b5G4ObEEi54OulC9uEh/mCEo5S/yPviqHBtGYGfceDp/nJYlYe6Oepa7EGtG34SuQzjmanJ6MqgVgDg6/N2Om7mpbDLpbqD1p4tHxdo7Km0Ng/GzCLNulnNSotyk9sK67UbEa2ENbLfKwRckQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: Date: Thu, 31 Mar 2022 11:48:51 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: [PATCH v4 4/8] x86/boot: simplify mode_table Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= References: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> In-Reply-To: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AS9PR04CA0066.eurprd04.prod.outlook.com (2603:10a6:20b:48b::19) To DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a3ebcdac-364f-435a-3742-08da12fbaa48 X-MS-TrafficTypeDiagnostic: DB8PR04MB5658:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qUfHIdCNJkTPD82OeCwJKceR7ekoUcB7WoLUsRDPY2fskgk8Akw4gOXK8iRF9LPzUlZfLMVv4fR4qYVaUUJwaw7WmLeY3tELTzIj4hPIYM1G/pFHRH/X81MYj0zMRRMrDKFBI13zOsNIi6w4pu20V2uCwTHJkMjeaz2AtNFaIL2rsqKf5bKbUmZXR2BcbvSmG54Q9xLiVoz2PCiFFAfg14m2A/6o8SY05J6lfsxDhr6x9uIs1nrHV6nNEOLF5od9oRl4iQreRGIQsSLxRcbyGpxKHmt5TBFuVkDZGpruGrvJHoZDy+RfHBKcrHCsmFl4uzIoVRiV674nF1cUfJRNuJGBv/dzquJ/fOkP5dRXlgrizXieqgTlsNjUFQjEVf1GDxoIIuIaMyjLQLFCoItWxA+UMVu2/+1bMs/ATnjt72+jIN3blxmX1glBM70rEsEtC+gXof89exBzIG3porE1jXY9Ww5h79hmPPgOr6SjoE7/MHeRJZWZTYby/1yzBbLYU9/Zb1ooQroCTv4SP9jjnoI6wvVKavHNPIpj13ueNxw2PkWR3UzUfOS7aG2DD/FgW8CdiXLebqk/7cpBoHmi4zhG7v7uP3VTUZJbRnRCJVInRrcUDBBOMQ521Ax7pF4EhS6/0f/KBjeDAJWB/ECBjMQPwiZ3ByHqZYzddJNGnpatgvg3e4SqG+gsPKV0sfVUdxw8WuGTfHy9NN5N8XJeqst1gkW2NLyLi5tAT3YdgJF9zYDsJz0LFYvKeZLyjFiF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8616.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(6916009)(54906003)(316002)(66476007)(8676002)(6512007)(6506007)(66946007)(31696002)(86362001)(508600001)(6486002)(66556008)(38100700002)(2616005)(4326008)(5660300002)(26005)(186003)(8936002)(2906002)(36756003)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZXB6bHQwdHZqaDFCSkVMNi9vZHB3SW8raGRaMkgwalhyNTJZUmIvdnBPa0k4?= =?utf-8?B?YlNzV1Jpbk5hL0hvSE1ycmhCY2dOV01mYktkRGFVQk5welZKM2I5WFJkOHo0?= =?utf-8?B?a1N0ZTV1dzJMckZ4RThqY082dm1kZm5zN3h3RmUvSFlXOWhmZFdjYThlRnMw?= =?utf-8?B?YXQ5TU0zVzNJdDd1Zkk4SE5Fa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kdtRGl1?= =?utf-8?B?L05ORGFodlcxS0ozbk9EbXpEOG83Y1Q1SjAvNCsyZHV4aE1hOHFiancvRkhp?= =?utf-8?B?b3ZPNWpyZGY1T09BRi9Mc0hFcjBSZ0NLYnJCT3RtVFVjdlloQXVTZjZ3Zzkz?= =?utf-8?B?VFBrWnFTQ3JYOEJEYnRmWThleEw0SVQwRzNkZGRHOXNRZnVORTRTeHA2cWR1?= =?utf-8?B?ZEs3Vkk0Ri9DQ1dFZ3B0c2QzTFNydk5mQ3Jvd3JDR3ZTc2pmZFhsR1dZcWxT?= =?utf-8?B?WkZ2cjV2QnhUMTU2cEpKOVBncFo0Zldza0xuZks5YUwwR3ozeHIvTHRheEw3?= =?utf-8?B?L2F4clBtSEFKR3JrR2lHbGdqMFhBNURxV3VkT2xpcklwZXhZazFSZz09?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3ebcdac-364f-435a-3742-08da12fbaa48 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8616.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2022 09:48:53.3840 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zI9RqP+WY0dJJvIj1GogcqYMv9v7jimkfSPI8TNIF1/EU7r3de2T2f97UsYvPx8AtHOwcdHlLXBrI/TKFjRrGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB5658 X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1648720168887100001 Content-Type: text/plain; charset="utf-8" There's no point in writing 80x25 text mode information via multiple insns all storing immediate values. The data can simply be included first thing in the vga_modes table, allowing the already present REP MOVSB to take care of everything in one go. While touching this also correct a related but stale comment. Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monn=C3=A9 --- a/xen/arch/x86/boot/video.S +++ b/xen/arch/x86/boot/video.S @@ -655,8 +655,9 @@ outidx: outb %al, %dx # Build the table of video modes (stored after the setup.S code at the # `modelist' label. Each video mode record looks like: # .word MODE-ID (our special mode ID (see above)) -# .byte rows (number of rows) -# .byte columns (number of columns) +# .word rows (number of rows) +# .word columns (number of columns) +# .word 0 (color depth; gfx modes only) # Returns address of the end of the table in DI, the end is marked # with a ASK_VGA ID. mode_table: @@ -665,12 +666,6 @@ mode_table: jnz mtab1 =20 leaw modelist, %di # Store standard modes: - movw $VIDEO_80x25,(%di) # The 80x25 mode (ALL) - movw $0x50,2(%di) - movw $0x19,4(%di) - movw $0x00,6(%di) - addw $8,%di - leaw bootsym(vga_modes), %si # All modes for std VGA movw $vga_modes_end-vga_modes, %cx rep movsb @@ -684,6 +679,7 @@ ret0: ret =20 # Modes usable on all standard VGAs vga_modes: + .word VIDEO_80x25, 0x50,0x19,0 # 80x25 .word VIDEO_80x50, 0x50,0x32,0 # 80x50 .word VIDEO_80x43, 0x50,0x2b,0 # 80x43 .word VIDEO_80x28, 0x50,0x1c,0 # 80x28 From nobody Sat May 18 10:07:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=2; a=rsa-sha256; t=1648720205; cv=pass; d=zohomail.com; s=zohoarc; b=BuTByqwlyo2Bea/4HyGx1KfaP6FpXKWPs2DGqpChE7HPEs0eIDko+Obz6TdCREuo8QfvS2U38vckl78P+mYQDTfGYnhz4xnrWTpQzenn4dIo6u0WhEXax81q2yUVqZHrBD7lg+nGCI9uRCTqoSbPTzlSsHZSuMcSixv9QpGJyo4= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648720205; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GFSJGrEWRuZxL/lqFamJoez8zlHu39Sdg/lvj6ulEMc=; b=EhdR+a9VgCb30nV1Y+B2xw9xfoqx21NKNY34yd0DoSaFIdmId//jhzJo5w1KxOHlMMlgTOt3Q4zgoRHwwVjhz4R3RA6VDp3yuwbQ+eEC8A3csRankAR2xne+HZXqJLJJyn/f0yBXlBay4RsRhFmYDBJM4ZvoHwZUjVSRk0c/TcY= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1648720205013652.8159828842847; Thu, 31 Mar 2022 02:50:05 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.296854.505449 (Exim 4.92) (envelope-from ) id 1nZrQq-0006Xp-Qr; Thu, 31 Mar 2022 09:49:32 +0000 Received: by outflank-mailman (output) from mailman id 296854.505449; Thu, 31 Mar 2022 09:49:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrQq-0006Xi-Nu; Thu, 31 Mar 2022 09:49:32 +0000 Received: by outflank-mailman (input) for mailman id 296854; Thu, 31 Mar 2022 09:49:31 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrQp-00061A-5O for xen-devel@lists.xenproject.org; Thu, 31 Mar 2022 09:49:31 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id dc672d3a-b0d7-11ec-8fbc-03012f2f19d4; Thu, 31 Mar 2022 11:49:30 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2112.outbound.protection.outlook.com [104.47.18.112]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-23-9cWyOcaZPTeJwQBJ-cg6Jw-1; Thu, 31 Mar 2022 11:49:27 +0200 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) by VI1PR04MB3264.eurprd04.prod.outlook.com (2603:10a6:802:11::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.16; Thu, 31 Mar 2022 09:49:26 +0000 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476]) by DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476%7]) with mapi id 15.20.5123.021; Thu, 31 Mar 2022 09:49:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: dc672d3a-b0d7-11ec-8fbc-03012f2f19d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1648720170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GFSJGrEWRuZxL/lqFamJoez8zlHu39Sdg/lvj6ulEMc=; b=aoBnjt6+glCRqKYvhWRwLixJ4A9ZW7DQtJeH7/BPfeZhmwrvJ8M1bRFRctzJHFI+iiEdY3 cSkryCGRxDc74iY0W/F1sQGrKQ9HJ/VJJLNWdbaEtU0N4VVBa5L12BgcQqxC7gSUEUAHDB Dywbaou16EJHj8ZVBcRNP+wWUQnDXDE= X-MC-Unique: 9cWyOcaZPTeJwQBJ-cg6Jw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q6HKUaI6hAPF/qfzmEeIG6ashHBUg+9ou4depZltvtzFff8xmu7AOs0dAW8+LNrsKJyYIt/hr0ZX4Karux+QwICWEPbNqBM53krR96bLxz2oM7UazJ+TxcQ4eKV0EI+A2vxVwODXYN/aM3EiE+iuNidAjCtuKQBhsdRh3/OGLDneFksRgyS2ndHY63zQli4RVed6j9m4Rqnj+ZnMm+14aOkLQo8as6xsa57AiFmlwEtqYGKOGCCE2NzYzomWBpTuM+AXR/ELNIsd3iJyXyBjBXXJwakF91KXWETcRJF+5s7peCvwqOf9S0eWqRdWHe9mV5SKzGldeJSF8EU7vEW0cQ== 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=GFSJGrEWRuZxL/lqFamJoez8zlHu39Sdg/lvj6ulEMc=; b=PUNrxXtszns2zAt4EE89WeOv0ElhZIAfxDPx8qimtm9ciqTOsE9qlV/XI/EK3xA27v6aQ6FWiFOM+bJ+P27npkBc5BcQYcrwRSNtUE1HCZAcTC/SE+HkfDwyEgroHJY2CXCGsPZV4xYaCNqUfFjll0K1LAQWpju9pfHkMtgLpXvilnmpvrgN2ZSGciT0lVmShCTXHnVhAwniVUw2HiTKMf79Y/S31xx5Fi8iFpIr2eBLB3deWDY6Mekfe4AEkZh9LTtSMJwSwIHnhr7uNZLAh7VRW1wflZT80bBp04Y51a82k8+cr8gxFTExyAeTw/AluS9vXVyAVsEXoPNsvCNHVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <5e4ee27b-4904-b2bc-1650-df148b47387f@suse.com> Date: Thu, 31 Mar 2022 11:49:24 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: [PATCH v4 5/8] x86/boot: fold branches in video handling code Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= References: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> In-Reply-To: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AS9PR04CA0065.eurprd04.prod.outlook.com (2603:10a6:20b:48b::21) To DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a8ca1b11-0074-4c80-8d31-08da12fbbe17 X-MS-TrafficTypeDiagnostic: VI1PR04MB3264:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N0vAaVsYAgOpWwNgby88QHYSw08UBgReEVbBDMQwPp+5w5tj8020q1xSbOo0SjmDAfJDTig8OPZClLtwNNnuXBlVb15dWF5dhfC+1eK8yPaZsX+1fuWsxo16pLx+yqVJQ+5Mc/6wcNWojbWC6tJ8p/Zm5Ur9f8+WAsv58So1USCTP9ExQaoUftuJqR6ddF92nguBipfhGBFP4PrQM2LBrXsfkdllSHVgVD695xC7bshTCXoojqp33kbz7+Lgpd8pUt5UMTgZOqCFU3HiLr9d/CkGucjBi/pjszM//pHXf7Hv05gNmRTy8mYfuxvn39KbGBNW5ytLle0F6ot1lv6FaM5tNaHP44BRE8GqbmuyVvoAWI2mv2cD+XW1mCIwB7JPlUFkyXgrtu7G92T3pyMllE7IBFwpuUiB2g81yUhe8F9wrcAMwNVqML0rHvnY9SXasDvfulH5z5UxsjxWhyEdqAfrQKfZmcp/GpjYVnODqmT2S3Tj5GjvExzI3X4Vxhc44IH8BBndvyuY2ZyKClCKjc2+Yg8JzAElnO3Hk8BE5dS7u++7sYGiuFg78E6FDCwTNtJ0zO76kJ9GCUhwLOTah0FM/R6/Jk0Oj8sHi2bqrtewFNexl4I7rmhUUr6QOahIdDYXYJkM6bbeT/WtPN+hq1FUtMGqBVCGlAIllT+sAvSCw/MDL8AXDHU3yooL2AKIO3O9iyHeJhjL/ID+uQbSu5AFXR+I1NqqxT8MJz2o637mDJ8VegxCtuqvtmLY4qQ5 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8616.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(31696002)(54906003)(6506007)(2906002)(86362001)(4326008)(8676002)(66476007)(66556008)(66946007)(508600001)(6512007)(6916009)(31686004)(36756003)(316002)(6486002)(2616005)(38100700002)(186003)(26005)(4744005)(8936002)(5660300002)(83380400001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiS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Nc1dnOGY0YllDR29vVUVjSkNZRElTbVdkbVVybzl5?= =?utf-8?B?eFZUSWZaWmtpczFTTklJMlFJckx1L1BiTHRrczh6QXYzNUhUZ1ExMTM3V2Rl?= =?utf-8?B?RDdQZkpFS0lhSkl2ZTNIcXo3TDM4THVpL1ZiQUJuQXJlNzUyb3pnLzllbThk?= =?utf-8?B?UksxNFV4Ri9QOVVvZFRpeXY0ODhzZmJjS2IyMTFrRjNsMGRjN2lGbDFIanpj?= =?utf-8?B?bnFza0pYVWRtTGFvbWMwZ1FhSzB0cTR2N3A1Ris2bC8vOGI2a0U5RVdOM2Zm?= =?utf-8?B?N1lydjRaOXlORURHWjIzVndSKzQvRjVEbE54ejY0VEliVzBGVk9WNHJtWmIy?= =?utf-8?B?VVhJNHJwdUZQUlQ4VEg0OE5va2tadkttODl2ZUpjVzVCRk9JcWhLaGFWd1kx?= =?utf-8?B?NFBsNFl5K2FpWFV5RC9CaXJBUkpXSkwvQWJ6aGdWMzRJdHZIUm1ma3I5V2Q2?= =?utf-8?B?MHI1YTl5R0xWRFNSQit3L3c5VXpLOWQvR2NEV21hMkwrUXRlMVFEVTlEcytH?= =?utf-8?B?VEFwajBwQWJWZjlKdjJQL2NFOFROcDFsQ3p5cG5EN202b2R6eCs5Zz09?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8ca1b11-0074-4c80-8d31-08da12fbbe17 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8616.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2022 09:49:26.2902 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: J32NOlCrpnEaeGoxte9mf0E6ec6EiQnGqhRDXfbVS8bDRSDNZR6DC7Fo+G9AHhGhQlg17xcaNQ24rVJmFHhLoA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3264 X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1648720207154100001 Content-Type: text/plain; charset="utf-8" Using Jcc to branch around a JMP is necessary only in pre-386 code, where Jcc is limited to disp8. Use the opposite Jcc directly in two places. Since it's adjacent, also convert an ORB to TESTB. Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monn=C3=A9 --- a/xen/arch/x86/boot/video.S +++ b/xen/arch/x86/boot/video.S @@ -332,8 +332,7 @@ lment: movb $0, (%di) cmpw $0x656d, (%si) # 'me' jnz lmhx cmpw $0x756e, 2(%si) # 'nu' - jnz lmhx - jmp listm + jz listm =20 lmhx: xorw %bx, %bx # Else =3D> mode ID in hex lmhex: lodsb @@ -401,10 +400,8 @@ mode_set: cmpb $VIDEO_FIRST_VESA>>8, %ah jnc check_vesa =20 - orb %ah, %ah - jnz setbad - - jmp setmenu + testb %ah, %ah + jz setmenu =20 setbad: clc ret From nobody Sat May 18 10:07:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=2; a=rsa-sha256; t=1648720232; cv=pass; d=zohomail.com; s=zohoarc; b=HeknAsYdPakCXvRcjAs13tDigWBxtWUW3fqq7H1Uzrkt1DHaySAYnj+2vLHexoHR/qfE4a8MCsLe13OEtuuIQ3PhqqJUFr9YvF/y5+3C3W5c924po792xAC0bA02xbR0dtmuckRfwokrLjr+KqXJ2/1mqj0nvzy47Y8o/mnaWYc= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648720232; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=juBJGq4ZapzX50bKGD151YensGcEVFSl2L4HTOV0500=; b=GRKVcmIX8/yCIFQ7jztHk5WXfU74HrEUrTlcw4UEvLI8n6KmRARFlWnmoFoTWecZeGUNsN0KwP9kwAQi85ihIVf2P9Ox+HCrvlomJ8STtqHSVaex3Gu25Cn+9pMuHa6gZMWcpTlkUNSwsz3dqQJNpmB1n4V2jowmmIV7DUf1teo= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1648720232115423.402017654176; Thu, 31 Mar 2022 02:50:32 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.296857.505461 (Exim 4.92) (envelope-from ) id 1nZrRQ-0007m4-65; Thu, 31 Mar 2022 09:50:08 +0000 Received: by outflank-mailman (output) from mailman id 296857.505461; Thu, 31 Mar 2022 09:50:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrRQ-0007lx-1R; Thu, 31 Mar 2022 09:50:08 +0000 Received: by outflank-mailman (input) for mailman id 296857; Thu, 31 Mar 2022 09:50:07 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrRP-0007le-1H for xen-devel@lists.xenproject.org; Thu, 31 Mar 2022 09:50:07 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f190cfb4-b0d7-11ec-8fbc-03012f2f19d4; Thu, 31 Mar 2022 11:50:06 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2108.outbound.protection.outlook.com [104.47.17.108]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-19-Upvu56G9M9SPSt_Bp4NJDw-1; Thu, 31 Mar 2022 11:50:03 +0200 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) by AS4PR04MB9650.eurprd04.prod.outlook.com (2603:10a6:20b:4cd::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.22; Thu, 31 Mar 2022 09:50:02 +0000 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476]) by DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476%7]) with mapi id 15.20.5123.021; Thu, 31 Mar 2022 09:50:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f190cfb4-b0d7-11ec-8fbc-03012f2f19d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1648720205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=juBJGq4ZapzX50bKGD151YensGcEVFSl2L4HTOV0500=; b=RClEyANyI7gWsL37BhRxyCrBl/h0O70WZ2eUoPmlLGxa+w8vC+gbclGy0SmLUss3Q03yag dtvCvQTku32+ab2u1f1zpjH1RbvHTR9L9IVUQjoY/eWSiEM4XS7tSmcDAkzYbIOjdS1b/5 XPxJRx/yyufOpQ7uYmg/4mH/bFO/KzQ= X-MC-Unique: Upvu56G9M9SPSt_Bp4NJDw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xqd+qw58Q/VJExivereJhYcTpxmmB2iJa5o2xUKA46HvNbv9m69CxCqcWey9a2tqXjzGg8BsJxSqrXJRh4pwNo5ZJqeLwYI8f6ofATmcb8yqzIDXsxzq2m5101YfDW0/N8cutkYcrqhClzMjkAURgYNXeYswNx9lYwAwSGntG10hgXYJY4Usx/8HqmoVHZjUelL48xIWWFnX41UqaskwcNdZmOLc9CIdKwyoWOlobaUZ886KUd9XXmzTCGi+WCkpc8LAFVw3vyiQBcCxRteQYOx6HM4jIHTqOt/t09rxzA/HgKrXIk3k4R7fXuyQH6nQNjrPZGcujQ4CHPe9JnUN6w== 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=juBJGq4ZapzX50bKGD151YensGcEVFSl2L4HTOV0500=; b=eF7JoghCr9UiYn0FMVy7CXJFqXKq41aj/uW3Z0ev74gutwzg2krTD0V3VI/w9eJKNVC3ogqWbzaH5XIWFU9K3MWGwMT3trjigHiUqFcDQ+GteM2Z5OnUHuuQ1jVSkvdKOvMb+Alj9oFbgu3FpVMhLXrDKWQ8mAo+aMhx88DHCg+xK1i5BhPZIIibHir/V2athC6KqBacTgaVryUE7fiPW7EjZiiiZrEYixOezChx1w9nR8s43Om48SQ37Rd62IW8hKmyOqNmlrmUYpleB5/rcC7CcXM+hKtKOJMJ3P6jsEI6yZMwQxLz+jGOUyaU6ZBUu3+6S2ls7HiQWKFXIgbLcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <8b66f631-18be-7819-7982-c56c03220595@suse.com> Date: Thu, 31 Mar 2022 11:50:00 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: [PATCH v4 6/8] x86/boot: fold/replace moves in video handling code Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= References: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> In-Reply-To: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AS8PR04CA0002.eurprd04.prod.outlook.com (2603:10a6:20b:310::7) To DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: efc601af-a35c-4b40-466a-08da12fbd363 X-MS-TrafficTypeDiagnostic: AS4PR04MB9650:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x+DERFW5Zqkod6Cj5ofwWLSEL1c8gTPULkgcgEQJ2WJaLgjI0s5/WeW4Ng6OXKFKLs8biV5eo/uNoELq1KapeZyDsvDckMpnxv8iuB6Dti6Qv9C2BqG6Z5pvWoVXmHkzPV35NUrCddFnh/5F+mRLyOX4Jo7E19o8VnC49T4Bmko7qFmeeV9bej5DV6mjMCMKeeBT0RolV5a32B0ksf39+kKvDbry8qPLT0+t0Sl0AoT+invfgfrXv8rLeUPijYoB6ixoW4XQRzLkmefAJoKf5obw5hmLbMOezkO8Ib+yuvL/px0Y7IWQD6imbS/d6reVYs2d+PhVmxdBHZDPGzKk72xWh+xI819RVwsrh55bC2Jhr3mFNBqxIpntdyCTc9GIKsCm35SXgCnlPuRWXBhBqocE+hf4Wn2WNxF4j+axrbZQh1KaX8GngJJcNKr+iP8S2KMWSjCpub8O7AIwqf4suS0TLlTL1kLkul/wFnWEiJ5NHXOxPK+BC+rv5kTMaWubhfzt/3Ayiko1ikfsKXl8/Gc13v3DLGEFg3UNz/53LoPs18THiLXHaWHfSyNOQaZ3PVM6XlTGNLqz2hCVWVh6hG+4DN101IqmCd9PNgE/HMmfGiH7cNPCpfXs5EhriZw9URnABD+hC9zzgymuAPY0go6KOQBdiBzaZsyzaW7pEFFw/kNRrA21/z8ESrC/bU9bCLQikY5+tZhEakdq0/FuGuUskm6X1btKIJtKsiemmFWWqqbYPF3ttRRDPvoHqP0e X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8616.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(5660300002)(508600001)(66476007)(6916009)(26005)(36756003)(2616005)(66946007)(186003)(54906003)(316002)(8676002)(31696002)(86362001)(66556008)(8936002)(6486002)(4326008)(2906002)(6512007)(6506007)(31686004)(38100700002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MGJJWTVaaDZnSEYzTU0yMy9LZkQzd0ZPbG1QNzZsWWRkRkdsNG5XSkhiYlNh?= =?utf-8?B?YllKZlBkSEU2R0dnUUdqQk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2R3dL?= =?utf-8?B?azVzRlkzM0hxb0htNmJsZXFZMUZVV3N1L3NFV1dreVVUVWZwaHZxeE4rSW55?= =?utf-8?B?bWlhL3plSVZSRUVjU25SdDdScE00YitYWVExQ3NyQ1lFZHN4UEZrZDJHTGJu?= =?utf-8?B?OGRQLzBiZG51QTd5NWhEa3RaVGxrdGpKNVJjYjczVGtqdXlBMEZjeXQwUmJU?= =?utf-8?B?anFITm04aFdKbCtoREFaWENxTnVNN3JkalNQM1VjQ1hGdDI3RjhjMy9WUTAv?= =?utf-8?B?c3ZhL2s3Y1NnTXVSK0puK2NjVnFYVDhhS3Q5QitaY254cFhTM3doTlgzQ0tN?= =?utf-8?B?alZZM0dQcEhzZ3hHK09wVXZCaW41TXJhVkZ0SWViYXN4R2QzQ1N0YTk2eFBS?= =?utf-8?B?ZW9tRG5SWkN6bythOVVsWFB0Q2JFbWYwRzdxZU1oRW9IYXJnQXJFWG5kTVVM?= =?utf-8?B?aThBWHh6STQ1VTh3UVM4UC9uS1I3L1luSFRJQXp1RDNwVkordGgvQT09?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: efc601af-a35c-4b40-466a-08da12fbd363 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8616.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2022 09:50:02.1748 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BKzQJXXLNLYMhdzrvC3bLnKcWKvUpeTDLHuAqcGV1MzaO4HPxIB3W1RsuzMHxWOYsQtJV/gMQa50nvqc/bn1QQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9650 X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1648720233352100003 Content-Type: text/plain; charset="utf-8" Replace (mainly) MOV forms with shorter insns (or sequences thereof). Signed-off-by: Jan Beulich Acked-by: Roger Pau Monn=C3=A9 --- Of course there's more room for improvement. For example there look to be a number of LEAs which really could be MOVs. --- a/xen/arch/x86/boot/video.S +++ b/xen/arch/x86/boot/video.S @@ -121,8 +121,7 @@ mopar_gr: movw %ax, _param(PARAM_LFB_WIDTH) movw 20(%di), %ax movw %ax, _param(PARAM_LFB_HEIGHT) - movb 25(%di), %al - movb $0, %ah + movzbw 25(%di), %ax movw %ax, _param(PARAM_LFB_DEPTH) movl 40(%di), %eax movl %eax, _param(PARAM_LFB_BASE) @@ -135,8 +134,7 @@ mopar_gr: =20 # get video mem size leaw vesa_glob_info, %di - xorl %eax, %eax - movw 18(%di), %ax + movzwl 18(%di), %eax movl %eax, _param(PARAM_LFB_SIZE) =20 # store mode capabilities @@ -144,14 +142,11 @@ mopar_gr: movl %eax, _param(PARAM_CAPABILITIES) =20 # switching the DAC to 8-bit is for <=3D 8 bpp only - movw _param(PARAM_LFB_DEPTH), %ax - cmpw $8, %ax + cmpw $8, _param(PARAM_LFB_DEPTH) jg dac_done =20 # get DAC switching capability - xorl %eax, %eax - movb 10(%di), %al - testb $1, %al + testb $1, 10(%di) jz dac_set =20 # attempt to switch DAC to 8-bit @@ -164,17 +159,17 @@ mopar_gr: =20 dac_set: # set color size to DAC size - movb bootsym(dac_size), %al + movzbw bootsym(dac_size), %ax movb %al, _param(PARAM_LFB_COLORS+0) movb %al, _param(PARAM_LFB_COLORS+2) movb %al, _param(PARAM_LFB_COLORS+4) movb %al, _param(PARAM_LFB_COLORS+6) =20 # set color offsets to 0 - movb $0, _param(PARAM_LFB_COLORS+1) - movb $0, _param(PARAM_LFB_COLORS+3) - movb $0, _param(PARAM_LFB_COLORS+5) - movb $0, _param(PARAM_LFB_COLORS+7) + movb %ah, _param(PARAM_LFB_COLORS+1) + movb %ah, _param(PARAM_LFB_COLORS+3) + movb %ah, _param(PARAM_LFB_COLORS+5) + movb %ah, _param(PARAM_LFB_COLORS+7) =20 dac_done: # get protected mode interface information @@ -504,7 +499,8 @@ setvesabysize: call mode_table leaw modelist,%si 1: add $8,%si - cmpw $ASK_VGA,-8(%si) # End? + movw -8(%si),%bx + cmpw $ASK_VGA,%bx # End? je setbad movw -6(%si),%ax cmpw %ax,bootsym(vesa_size)+0 @@ -515,9 +511,7 @@ setvesabysize: movw -2(%si),%ax cmpw %ax,bootsym(vesa_size)+4 jne 1b - movw -8(%si),%ax - movw %ax,%bx - movw %ax,bootsym(boot_vid_mode) + movw %bx,bootsym(boot_vid_mode) jmp check_vesa =20 # Table of routines for setting of the special modes. @@ -773,8 +767,7 @@ vesa2: pushw %cx movw %bx, 2(%di) movw 0x14(%di), %bx # Height movw %bx, 4(%di) - xorw %bx, %bx - movb 0x19(%di), %bl # Depth + movzbw 0x19(%di), %bx # Depth movw %bx, 6(%di) =20 addw $8, %di # The mode is valid. Store it. @@ -901,8 +894,7 @@ gettime: movb %dh, %al # %dh contains the seconds andb $0x0f, %al movb %dh, %ah - movb $0x04, %cl - shrb %cl, %ah + shrb $4, %ah aad popw %cx ret @@ -959,8 +951,8 @@ store_edid: .Lforce_edid: movw $0x4f15, %ax # do VBE/DDC movw $0x01, %bx - movw $0x00, %cx - movw $0x00, %dx + xorw %cx, %cx + xorw %dx, %dx movw $bootsym(boot_edid_info), %di int $0x10 From nobody Sat May 18 10:07:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=2; a=rsa-sha256; t=1648720259; cv=pass; d=zohomail.com; s=zohoarc; b=EUvLikrVc+RKhw7KbONPFRCl8XXZ3SJ8ggjxM7yvhTs2mBInwB3iI2XC1mJYTeuhVrNyiZvwZDUGb032FMrodeGte5SRyK1kZ6WWpM0VdpHfIjRFLZE3co9gXd6bJpuf4loG5kWPfBXOl7aMNa6THIV8aZsz9GrRANnU/yODd+k= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648720259; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Fb7K4sY64D9J9sN6DhUdaWAIhUcQkX9yK1qzj7M9L8g=; b=a6o8wnfE2QyFcS0HKId46lxJ9PyTvjtkXdL0y7vxZKFMnY3cXkWgopatuUszJnamBBmkLTW2BwmWUaVxs0JlJheNgy18zhpJm5YgwbQI6qJtIgr1XF+aYHw+i8yUdX3RDst16Ntmb+pIlVi9tPbukUL29U348J3jFrxPrPvLHqk= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1648720259056410.8767391161964; Thu, 31 Mar 2022 02:50:59 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.296860.505472 (Exim 4.92) (envelope-from ) id 1nZrRm-0008PP-HV; Thu, 31 Mar 2022 09:50:30 +0000 Received: by outflank-mailman (output) from mailman id 296860.505472; Thu, 31 Mar 2022 09:50:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrRm-0008PI-ET; Thu, 31 Mar 2022 09:50:30 +0000 Received: by outflank-mailman (input) for mailman id 296860; Thu, 31 Mar 2022 09:50:28 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrRk-0006u5-Kp for xen-devel@lists.xenproject.org; Thu, 31 Mar 2022 09:50:28 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id fe6241e3-b0d7-11ec-a405-831a346695d4; Thu, 31 Mar 2022 11:50:27 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2104.outbound.protection.outlook.com [104.47.17.104]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-9-JmfEzXE7Nzqk5lDZDet1DA-1; Thu, 31 Mar 2022 11:50:25 +0200 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) by AS4PR04MB9650.eurprd04.prod.outlook.com (2603:10a6:20b:4cd::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.22; Thu, 31 Mar 2022 09:50:23 +0000 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476]) by DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476%7]) with mapi id 15.20.5123.021; Thu, 31 Mar 2022 09:50:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: fe6241e3-b0d7-11ec-a405-831a346695d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1648720227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Fb7K4sY64D9J9sN6DhUdaWAIhUcQkX9yK1qzj7M9L8g=; b=Tfdlg0NRhiQKRxaNrdJu3fmKdo3DFNunPxHF+DXkmEZA3mqyT88CSZkmx+38KjaAtHLzIk 4gEVv6CZQ4EO+ZmP4qrAp2eK8hqpKSw+FoGmtG1VAb5Cdelz9LfXqpYjJxu5WgCjLz5qJC 5Si2ja8RG0zEo9vEZsuLHRvW5Jf8prU= X-MC-Unique: JmfEzXE7Nzqk5lDZDet1DA-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g39uerfTZViCOSLz6tP14DhRz5jlE+hdNkDMHBhcy2xDEcPB8KlnE/XzL8PseLGBkGpLv3Bg3Zqya2a3v+P29RqJcJBbQ5gNkfnlGM5ks4bmSU/Q27N2f9P/8NuB2394ItYeCRq5GnySBQstpel+z4xjoEHaXKvyuCgQCx/OO2Kz2mguB09zgD31CWIZbfFhoXnG0laf6jCvgXivum4Qj3MK5gKIkVpVUZfmkt+CnbhjqVJ89knpauLDiTqrCUU6DBuQAHVrAJtUy8Mka9YUcQ2VBvrOIHmQ9zBK2J9zKF8oGlLvshD1eqKLF/w62lLbPvTV/FFj/In9Knjk6SptPg== 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=Fb7K4sY64D9J9sN6DhUdaWAIhUcQkX9yK1qzj7M9L8g=; b=I8cWiW3JEmt2My8XkAJA4YPPxrN6+Du4gDpW7e/vQT1yUMJBNl8qQLjxs4Rja2KJLn6Grc/BIVHbHpo77roMGSB0llbxjsaEW0usn5PumubPJhk5xu/YXFWKqpp7wCIh6EEcCPwGlrAqAX2L3ly7Rb/j2Nyx3K7W1w87L1vAT7hnRANWMSe6iegl3EGODvLqICDVoLn9fNHTM42Smj9aH7T+gnYmfuiFfFfqGbHORGEsRh1JQ6EflzzXWZQUnuaHedtbb+eXLTDQGloRXaTTEIni1faW/LgdCzGZh202MSB5aLtxRXEdEDHIenTFO2vTa9THXOGh5e2hWJRdZPj1wA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <48666252-a448-9c17-cacf-2788fe1a3c17@suse.com> Date: Thu, 31 Mar 2022 11:50:20 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: [PATCH v4 7/8] x86/boot: LEA -> MOV in video handling code Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= References: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> In-Reply-To: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM6P192CA0070.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::47) To DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f4a382e7-2e40-463a-81d4-08da12fbe067 X-MS-TrafficTypeDiagnostic: AS4PR04MB9650:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ndXqZvFoKFEKXFZVnCZfF31/dxoR1W/8g1Br4T34gEMr0vran/2qE61Gfm9dRzQa9BQw/L3bSMzWoJANlaZoszQOVN9YcYkLYcvuTIKZfvJAf/pLeVkieLTO1l1mtTvrQlWMr0ofkjiqTUqtLSHexGNRmcFWmeUwpLroTHEkfUsayUdMy+FtYSkl6zRDWl9IcvjH3t6JYv8d9DKuCXEFlAlvM+mbrlM4gPLvS2maAGtdQXMqiHo3btaQPeJIOnaE6uZU9KEqK+w9JuLL+j1Pr/LbeBdqSFhFNZC6bSqEMkwL09QRE0jOdp6WbZBQs8KuW05j1TsNTRI0nx1S6eHiqpA8ZsdNHQV229dM//Xa2F+RPCBoib924xI0rZv4i7t7FGOnu3PZX8PT9jneUJpx68kO9WzdPCH+8Zlf+Vb0IoFrPOeaTY0Bn99tsSPOG6x5jkjimcZF/MLGEDQH/EKgEhiB6WTLwpV0+VcDIkyZa2Jj+rojFP4NeU4mVa0tDtVtZAdMwJSL+NuujNk29WKOOBKkQvIdzkOOF4H3G6+g00X7bZPb1bNWPTabqJcIbtnc89QfqqApXz/w9IgWLi6VH43BzfDLPnjQy8bgOACjMKxy1jhrNvnuR5PWQcS5MXLrP0Xm30vIlrr7InFnrJsj9w70ayC8WDmL83mc7iUqc+Y4M2/PmLtq5Y25JixQsrfDwFEJjC94p4x62SZr/HhbloY/N7QaEN/lrvnFYdcF8VE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8616.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(5660300002)(508600001)(66476007)(6916009)(26005)(36756003)(2616005)(66946007)(186003)(54906003)(316002)(8676002)(31696002)(86362001)(66556008)(8936002)(6486002)(4326008)(2906002)(6512007)(6506007)(31686004)(38100700002)(83380400001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RFBRQmpDZTdyQlZkZjVwK09Zaks5U20vYUFuUVhZbFhxcVpnZEI2SVlsUTg5?= =?utf-8?B?S2d0ZFpBd25jMXZrNTJ2b2lqUGtzallkV09BTmhhcTNXdUlIK2REMGtHS1Rk?= =?utf-8?B?M01VU0VHVnFmcjZjdTVCRk5uaXVOSVdqRzA5bFNETWJYODYzVU1CdEVyZUQw?= =?utf-8?B?dmk3SlVxNmNoTmlFKzhBTVAwZWxNSjYwb2p1c2dGR1ZMYVFjY0h0cGRCWWFZ?= =?utf-8?B?OFJQZzFjcDBlNEp0RXJXekpsUTBnL0M4eGg5WHV5VTYrdzEyamhpVEFkY1Y1?= =?utf-8?B?bWVKb2RnV3V3dlVZc0t2Umo4UG5mWDAySmZnRXdraVdJeVpEQ3YreHp3dUhM?= =?utf-8?B?QkJmSkdXUy9vbXhtZ01XdWNaa2NwWlQ1VFI5cUVpS2Q5THNMaTFpeU0vUEF1?= =?utf-8?B?am12TjZUOGZYejNMcHdFNUhCNHBxUXJjV3h2dE1PYlZjdnRJQStXb2lEOGhv?= =?utf-8?B?VDR2cXErUnBEdzNVcEJmL1A2d0lpRTB6VXJzOUg4Z1k2VlVHSE1hNnptQ2FU?= =?utf-8?B?Z01MS205VXMySUxOWFVCeDMxOGV3d1NsTXhwcUxISVhBRTVsTjNMZWY1OHBU?= =?utf-8?B?QjUwZkRVYTczdlRndlE2WlNHSkZnanlnMlFEbDk0YmoycW41dEtRWjB4bDVw?= =?utf-8?B?WUVPZ2NYV0tTbHh6NzhIZ201aUU5bmc0NFRGZVpyL1JkTFFhNTdBckFIZFFh?= =?utf-8?B?bEd0SlRyZ01ZMGprcFdENnhsNC9TV2ViMmtNa0xMcGxHcnpBWHRqOTNRWkNq?= =?utf-8?B?OTk3VVIwZj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-8?B?dEpiUmxwMVZldFlIUlFTVXRZc2d0NUNCSFMrc3IxMm8wbEp5YlpqZWxkUmpI?= =?utf-8?B?Szc1Y2NjQzc3TlVJNzZNQVJUcy8rdU92WmQ5NWJaN3FCekZxZjdXdG1qWWdw?= =?utf-8?B?RmtmeGtFL0NVR0FYWk5LWmt3ZWFHd2R6V3BmVnUvUG8rQUJqdHh2OURWYWNL?= =?utf-8?B?YUdhQkFwbFlTMnlPSEE5ako2Y0tsWk1UNWRkZHVrUGtWbW5nR05WUHJhQ2Jp?= =?utf-8?B?Y0xJdllHNCtjdVpka1dqd1JyM25nM0dQZTRjUWJkd1FhMklKeEplanRqMzN1?= =?utf-8?B?cUUxbitPSi9yOTlBL1RoWXJrcU1PMHRsUld2cVowWEpBSitudmg1UnRmenhX?= =?utf-8?B?QjRJVWtVYVZxOEJNbEJGVzdCTzVOU3NYZXc2cjgvdk9LZFFSZ21hS29BWEtT?= =?utf-8?B?Y0s4QmhZNGRPKzlleUQ2OVdqZVFuQWF0UE9hYlZXckV5Vi9adkZFcVpSbm1J?= =?utf-8?B?UkQwN2ljZHlVVTk0T1RzalJkcjZBdFp3Z0dkY284RWYwa2FxVFR3WkgvSS9w?= =?utf-8?B?VjVnYVFrS0pCRUlyTGhzdDlqN0pSdXhiQ0MyMHorQ05qdjIwNGRvOUoyUk5y?= =?utf-8?B?eDNrb2VHL3hHZnRwUkNMZkxrOTNuUmtoYzJrVjNYdG93ZitIUmdxdz09?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4a382e7-2e40-463a-81d4-08da12fbe067 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8616.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2022 09:50:23.8411 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iBpu9gf0yvNU54SvTOiJRfWsZvFHcPeiQF36/CvmmGhWaGf/+B0jWOKtleyVf6bCRSc4CICPq8BclmkpGG7OpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9650 X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1648720260528100001 Content-Type: text/plain; charset="utf-8" Replace most LEA instances with (one byte shorter) MOV. Signed-off-by: Jan Beulich Acked-by: Roger Pau Monn=C3=A9 --- v4: New. --- a/xen/arch/x86/boot/video.S +++ b/xen/arch/x86/boot/video.S @@ -60,7 +60,7 @@ video: xorw %ax, %ax call mode_set # Set the mode jc vid1 =20 - leaw bootsym(badmdt), %si # Invalid mode ID + movw $bootsym(badmdt), %si # Invalid mode ID call prtstr vid2: call mode_menu vid1: call store_edid @@ -113,7 +113,7 @@ mopar2: movb %al, _param(PARAM_VIDEO_ =20 # Fetching of VESA frame buffer parameters mopar_gr: - leaw vesa_mode_info, %di + movw $vesa_mode_info, %di movb $0x23, _param(PARAM_HAVE_VGA) movw 16(%di), %ax movw %ax, _param(PARAM_LFB_LINELENGTH) @@ -133,7 +133,7 @@ mopar_gr: movw %ax, _param(PARAM_VESA_ATTRIB) =20 # get video mem size - leaw vesa_glob_info, %di + movw $vesa_glob_info, %di movzwl 18(%di), %eax movl %eax, _param(PARAM_LFB_SIZE) =20 @@ -189,7 +189,7 @@ no_pm: pushw %ds =20 # The video mode menu mode_menu: - leaw bootsym(keymsg), %si # "Return/Space/Timeout" message + movw $bootsym(keymsg), %si # "Return/Space/Timeout" message call prtstr call flush nokey: call getkt @@ -206,22 +206,22 @@ nokey: call getkt defmd1: ret # No mode chosen? Default 80x25 =20 listm: call mode_table # List mode table -listm0: leaw bootsym(name_bann), %si # Print adapter name +listm0: movw $bootsym(name_bann), %si # Print adapter name call prtstr movw bootsym(card_name), %si orw %si, %si jnz an2 =20 - leaw bootsym(vga_name), %si + movw $bootsym(vga_name), %si jmp an1 =20 an2: call prtstr - leaw bootsym(svga_name), %si + movw $bootsym(svga_name), %si an1: call prtstr - leaw bootsym(listhdr), %si # Table header + movw $bootsym(listhdr), %si # Table header call prtstr movb $0x30, %dl # DL holds mode number - leaw modelist, %si + movw $modelist, %si lm1: cmpw $ASK_VGA, (%si) # End? jz lm2 =20 @@ -240,7 +240,7 @@ lm1: cmpw $ASK_VGA, (%si) testb $0xff,(%si) jnz 1f push %si - leaw bootsym(textmode), %si + movw $bootsym(textmode), %si call prtstr pop %si lodsw @@ -257,7 +257,7 @@ lm1: cmpw $ASK_VGA, (%si) =20 cmpb $'z'+1, %dl jnz skip_bail - leaw bootsym(menu_bail_msg), %si + movw $bootsym(menu_bail_msg), %si call prtstr jmp lm2 =20 @@ -266,13 +266,13 @@ skip_bail: jnz skip_pause push %si push %dx - leaw bootsym(menu_more_msg), %si # '' + movw $bootsym(menu_more_msg), %si # '' call prtstr call flush 1: call getkey cmpb $0x20, %al # SPACE ? jne 1b # yes - manual mode selection - leaw bootsym(crlft), %si + movw $bootsym(crlft), %si call prtstr pop %dx pop %si @@ -283,9 +283,9 @@ skip_pause: movb $'a', %dl jmp lm1 =20 -lm2: leaw bootsym(prompt), %si # Mode prompt +lm2: movw $bootsym(prompt), %si # Mode prompt call prtstr - leaw bootsym(edit_buf), %di # Editor buffer + movw $bootsym(edit_buf), %di # Editor buffer lm3: call getkey cmpb $0x0d, %al # Enter? jz lment @@ -315,9 +315,9 @@ lmbs: cmpw $bootsym(edit_buf), %di jmp lm3 =20 lment: movb $0, (%di) - leaw bootsym(crlft), %si + movw $bootsym(crlft), %si call prtstr - leaw bootsym(edit_buf), %si + movw $bootsym(edit_buf), %si cmpb $0, (%si) # Empty string =3D default mode jz lmdef =20 @@ -373,7 +373,7 @@ mnusel: lodsb lmuse: call mode_set jc lmdef =20 -lmbad: leaw bootsym(unknt), %si +lmbad: movw $bootsym(unknt), %si call prtstr jmp mode_menu lmdef: ret @@ -424,13 +424,13 @@ setmenu: jmp mode_set =20 check_vesa: - leaw vesa_glob_info, %di + movw $vesa_glob_info, %di movw $0x4f00, %ax int $0x10 cmpw $0x004f, %ax jnz setbad =20 - leaw vesa_mode_info, %di # Get mode information structure + movw $vesa_mode_info, %di # Get mode information structure leaw -VIDEO_FIRST_VESA(%bx), %cx movw $0x4f01, %ax int $0x10 @@ -497,7 +497,7 @@ inidx: outb %al, %dx =20 setvesabysize: call mode_table - leaw modelist,%si + movw $modelist,%si 1: add $8,%si movw -8(%si),%bx cmpw $ASK_VGA,%bx # End? @@ -656,8 +656,8 @@ mode_table: orw %di, %di jnz mtab1 =20 - leaw modelist, %di # Store standard modes: - leaw bootsym(vga_modes), %si # All modes for std VGA + movw $modelist, %di # Store standard modes: + movw $bootsym(vga_modes), %si # All modes for std VGA movw $vga_modes_end-vga_modes, %cx rep movsb =20 @@ -665,7 +665,7 @@ mode_table: =20 movw $ASK_VGA, (%di) # End marker movw %di, bootsym(mt_end) -mtab1: leaw modelist, %si # SI=3Dmode list, DI=3Dlist end +mtab1: movw $modelist, %si # SI=3Dmode list, DI=3Dlist end ret0: ret =20 # Modes usable on all standard VGAs @@ -681,7 +681,7 @@ vga_modes_end: =20 # If the current mode is a VESA graphics one, obtain its parameters. set_current: - leaw vesa_glob_info, %di + movw $vesa_glob_info, %di movw $0x4f00, %ax int $0x10 cmpw $0x004f, %ax @@ -692,7 +692,7 @@ set_current: cmpw $0x004f, %ax jne .Lsetc_done =20 - leaw vesa_mode_info, %di # Get mode information structure + movw $vesa_mode_info, %di # Get mode information structure movw %bx, %cx movw $0x4f01, %ax int $0x10 @@ -715,7 +715,7 @@ set_current: # Detect VESA modes. vesa_modes: movw %di, %bp # BP=3Doriginal mode table end - leaw vesa_glob_info, %di + movw $vesa_glob_info, %di movw $0x4f00, %ax # VESA Get card info call int $0x10 movw %di, %si @@ -772,7 +772,7 @@ vesa2: pushw %cx =20 addw $8, %di # The mode is valid. Store it. vesan: loop vesa1 # Next mode. Limit exceeded =3D> e= rror -vesae: leaw bootsym(vesaer), %si +vesae: movw $bootsym(vesaer), %si call prtstr movw %bp, %di # Discard already found modes. vesar: popw %gs @@ -917,7 +917,7 @@ store_edid: cmpb $1, %al # EDID disabled on cmdline (edid= =3Dno)? je .Lno_edid =20 - leaw vesa_glob_info, %di + movw $vesa_glob_info, %di movw $0x4f00, %ax int $0x10 cmpw $0x004f, %ax From nobody Sat May 18 10:07:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=2; a=rsa-sha256; t=1648720296; cv=pass; d=zohomail.com; s=zohoarc; b=OR9K1+JDpQv2PsBVYKDLvLRq0PRMKghYC0B67GUxFrRfR/l4rXqg2n5EWsQ371yIrgGf9zXuX4Ywl4XREz+hHpetGijkwPIZo8pBryStMWTODRCi5R/JpW6Oju0RfRt901h6BqKmS0z+FXM13D7NZJQu1lz/Son9M0lODWrHSrQ= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648720296; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KNU533Nas71KGaxkrjt8Y4qhfH0SyWRPA/lY3YgjMd0=; b=XgYh1egTa706D7Vd58TzQ57OP0HFdx6yhTOqq5ngA/YZIizZnA0y2Rpuli1zIfPOm2pj/ux6KN8Vql/8Zf+FiNxxhVkc9xAKppsiYVyXw+9EfwNGgUJPbX+kWM46QG741GYPtdrNtKgOvzbCbyH0rg+zRysFZBbsFP77GNZg7OY= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=suse.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1648720296805786.8396262619326; Thu, 31 Mar 2022 02:51:36 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.296865.505482 (Exim 4.92) (envelope-from ) id 1nZrSP-0000dw-S1; Thu, 31 Mar 2022 09:51:09 +0000 Received: by outflank-mailman (output) from mailman id 296865.505482; Thu, 31 Mar 2022 09:51:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrSP-0000dp-Oi; Thu, 31 Mar 2022 09:51:09 +0000 Received: by outflank-mailman (input) for mailman id 296865; Thu, 31 Mar 2022 09:51:09 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nZrSP-0007le-3q for xen-devel@lists.xenproject.org; Thu, 31 Mar 2022 09:51:09 +0000 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 16caed53-b0d8-11ec-8fbc-03012f2f19d4; Thu, 31 Mar 2022 11:51:08 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05lp2106.outbound.protection.outlook.com [104.47.18.106]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-19-msc2Wdd7Oge5_8QbrcETMg-1; Thu, 31 Mar 2022 11:51:05 +0200 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) by VI1PR04MB3264.eurprd04.prod.outlook.com (2603:10a6:802:11::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.16; Thu, 31 Mar 2022 09:51:04 +0000 Received: from DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476]) by DU2PR04MB8616.eurprd04.prod.outlook.com ([fe80::914d:e08d:7798:8476%7]) with mapi id 15.20.5123.021; Thu, 31 Mar 2022 09:51:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 16caed53-b0d8-11ec-8fbc-03012f2f19d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1648720268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KNU533Nas71KGaxkrjt8Y4qhfH0SyWRPA/lY3YgjMd0=; b=KF6ZgxS+cdxy+UEJJ31sOomnvaqF12AcerVo364qI9ehwhuDq3CvdvfM9UYWK74Qc9Gd6g R5bxIcDl7hjm7+XTu2c2dk6GO5PLDpV+Lywow3WoQd7CBPTEp6IUiZDnPDHfFrEME0SD5O iyxTPraBbHSICrT86FI1kaEBTxX3hNA= X-MC-Unique: msc2Wdd7Oge5_8QbrcETMg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iS4xA51Q/g66xdp9hQ9OYXU5ngFKeEzexBsTmf43SiSXGzW7SnmdmqKPz4ZwbY+ikTN64YWHw2B7jm2XkDSK+msXd9Ks9emlMD7BA3avfw7wG4CQdem8QQNcWGaSK9/eaborh0pevWUHUcyTUQ7rVRxmsEBTxipSSzw1Oy/+xg8YWoeEUubBgYMOP4fTmmkwsGuzfttKQPq8irV+8nZtVFRy+kHRAp1RfZ6uv8FzNEh4neWtaFB2YTMzVPSsTZgs80TxuMFUkCGUFseqN0DQTw0ELi9NYHQAI7iBcWhYcAOaXRVLNB3RbenQfH72p4gFMHFPVg+4W1V+W27RsEYucg== 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=KNU533Nas71KGaxkrjt8Y4qhfH0SyWRPA/lY3YgjMd0=; b=dgPc21xsJR4LFSzLJz7DVn/d+Ft+NR0sB8piw2DqABRaMB39ZSVw/ReQy5vCKoE/o0VTMAd5ZwSarQEccJaHbjs43X5PvClzKZ/grF9bIVuqqevEm4QDJacGwb5WODQJLM40FCxjsqae7tlyopPChJ/V+9fqkZ+Mrg4XsPmVHyTyrY3lLPnRUH7H2xdvKsN+kiEiX7ISdOvBUJ4KLc05NF+AJrNxX+LSGEH6+lYNWdSvhi3v2/Ym3zVcVcKyeNu8mBnRq0NTNT8/5Qvnf39uC3jaP8eEVFy+f9Iq5cmPnEfeFxCiXVUMJ5nAmGzslD90vrcyRh6TL6vG1KPLdDgJKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <294639f0-d959-59b4-b3db-78451d5acd9c@suse.com> Date: Thu, 31 Mar 2022 11:51:02 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: [PATCH v4 8/8] x86/boot: fold two MOVs into an ADD Content-Language: en-US From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= References: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> In-Reply-To: <819eb552-d49d-e98a-9524-8d30c1b93908@suse.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM5PR1001CA0033.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:2::46) To DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 582759d4-d117-4731-fac8-08da12fbf87b X-MS-TrafficTypeDiagnostic: VI1PR04MB3264:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UJjy2bW6y2cqgSk4boAj0awY/3NID1albUqJeBsbTs+6dYICUi/vHJFjlhNr90SguuxPCE0XF/wQpCbVIM3KhOmhjUOrN8CWJNrSiPFf839Sr4mvHedytSdHZ0/2oCi2O0OIVbhi/5OoEE5L1WbBAioneJt9EpQtSm8zipeIAcgQPJnN+ZN5KD/pXw1/jlBQtAbWkJpNjgIQyo83d3MsydnY1uG1aUZ424A8ur1DmwwB4a0OkX+7F3knRTvXiLd5isWjZfM6vlwQjpO2xuZ4M97cz9IjzJUVu0wruYj1BFQH1IzhCaCGhFpwOt+ap6zNK+3zz1ub/WC/WUZPhg3IFCndio78ySXjtI9lxA7LZuQGu9XcdDqXlYNGO9ZB2UREFO1KdpGNtzfRA3WXOpDaMnurzclNyz8LB4egJsVmUv+udr7WB6ouJM5CEnAUKBTDXgQG3TWi+qoxnqDY+tF4sg4bQAeVBzBinG3N/r5F74ofQE5oPYeW2s/SlASc3kpg9pEJynPoZpXstnLgWLefj5xv+EcomR3S4eKYEvg6KAoyyHFUJW5JaQH7VcNQjkipPzRMp2WuKoVb0sxOIdfXnzqzwG4SM1ZM75A11e7hGiMIVT/1UgZPiM+yJa8wmtrffr0DAKlZtZ8oMm5I37FKQCIXjhbzydoeC/H8Apt4XSD5gw4NMYsr1XY3nHWKLOfPa5YBjc0VgyGSY6vTqALYiyLgsVnz7ATIrWN1U6y55Ow= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8616.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(31696002)(54906003)(6506007)(2906002)(86362001)(4326008)(8676002)(66476007)(66556008)(66946007)(508600001)(6512007)(6916009)(31686004)(36756003)(316002)(6486002)(2616005)(38100700002)(186003)(26005)(4744005)(8936002)(5660300002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cGpqMzZ6eHQ4d0pUd2NVa04zcFhTaCtEbHFub0FRYTJGUjI5TUZGMVhDKzA0?= =?utf-8?B?WlJhV0tVRFRwSzdUS2hBK1hZeFV6ZzhqYzZOYmx5V0xzZzZ6N1hqa1hEOHcv?= =?utf-8?B?aXFpN1VxSkM0N2xXWGEwTnZJWExRUm91NXlXb0tNNDY5UUpsYXY0UWlwWnRY?= =?utf-8?B?MTI1WjNybmNIVy9TMURwV2ErdTdUc2dpNS9IMWFxdVFwQWw5RlBsVndKOEZj?= =?utf-8?B?WnlVQy9YQjZOUHJXT1prdEg4akI4eVl1VkM5UlY3Z2VmSExZbHlyTXNpRjRY?= =?utf-8?B?bUlQOGs4RHFNbHY5cWRmV2s0V0lhY1ZVTHd2dnNxSzhCcGt6OGZ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UtBdVlpOU5HZDkxckE3QUJTNTBuUGM2REdiNHZ4bHhIU1hOVVRT?= =?utf-8?B?R1ZrSlJVWXRTYW81bFlsVlgyV2I2ZnpvQndQbzdnMHNGODJMS3ppTlEydWJx?= =?utf-8?B?ZlBZbURib1JLNVVOTTU2Z1F1QTlsTld3eDh4V0crcEh2WUovbnUrMFlRVWdp?= =?utf-8?B?d3RXNzZUOTdtSUlFZTY5bUUzcFdWT1NVcVVjS0ZianZvVmI4SWxXZz09?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 582759d4-d117-4731-fac8-08da12fbf87b X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8616.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2022 09:51:04.2874 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LhdWRiJg/t8CgflyBBmlQYCIyLWamVcIYDP2ND/1obgX6MzbsbU7PrCakvrhfst8Ht2efA/D12YPxgGIiV+DxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3264 X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1648720298630100001 Content-Type: text/plain; charset="utf-8" There's no point going through %ax; the addition can be done directly in %di. Signed-off-by: Jan Beulich Acked-by: Roger Pau Monn=C3=A9 --- v2: New. --- a/xen/arch/x86/boot/mem.S +++ b/xen/arch/x86/boot/mem.S @@ -24,9 +24,7 @@ get_memory_map: cmpw $E820_BIOS_MAX, bootsym(bios_e820nr) # up to this many ent= ries jae .Ldone =20 - movw %di,%ax - addw $20,%ax - movw %ax,%di + addw $20,%di testl %ebx,%ebx # check to see if jnz 1b # %ebx is set to EOF