From patchwork Thu Jul 12 12:21:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 141820 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1445735ljj; Thu, 12 Jul 2018 05:22:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfecGJXVL32uA4yeK4U96Z9ohASvtly73em114srlw3hl7/dY4DBJX28PuaCyhul2RNGMCJ X-Received: by 2002:a62:8d84:: with SMTP id p4-v6mr2199007pfk.251.1531398120596; Thu, 12 Jul 2018 05:22:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531398120; cv=none; d=google.com; s=arc-20160816; b=ypV4zVaT7FLADwgqNiWo3lP48azPuS57zT2i85RfKHcIhd2OCBaY5rD9rBEn1qUr0e FRr+tytrQId+RwGvKpsFoIT56FOhHyEmLgIzI+LsbC8ATJwGEiXECatTKdHxG/5W0EEM 6/T5Jgcw3Bv8AQV39l9nTrccYvnSqHJfIWzU9ebq7HXLwIhBpIQ5OEQzuwmdMvqhz0Pr iQxacd9MEbiaFxWvqNrYNFUlXFWPaVmj1oG7eAo1SzrmByt7o4t1qGKVv8+ORrYuwkQj 1HjrlFTMbmx2tRTJoRrOfBbW7GbfzmWD9euugWlxz13AFKfxEuGmp95KfWLQLMF/jyF2 bxNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=jIJH7ejQ7ufcInW6i7BlEEiHWEZ7BilCRzzEB9K7ASY=; b=YrLvJ44321E/xOGIElEDYg9XnQEQ+xRnhG0sJhaoy2ajIcVP97Eys+eo61oxhDSCR+ GU4MzmCSKUVkMbLYj5nR9bB7dBBNPkIZHb9G7qRuXq9aE6HLT4Yzrhw7ojIWSlungkC7 tJFYLKw3t3d9ZJG1g3ShKCeFfXHDKWLUXrLjAaGH1WHGseOO423p65fpMqUVBYzOYV6V F1KofVXTtGiaqXSTD/tPldZQPhE/rjJ/zjvLONaP6AbEUX96PTWtbRMmc4gZarivGnWv +YDfNprfuAdLNv0KTCTtQnhclvZY5S171K4UQHBvIhTs1CWLuK5O64eGcAZEC2qxouF4 jhDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YU5pvHYX; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8-v6si7016131pff.248.2018.07.12.05.22.00; Thu, 12 Jul 2018 05:22:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YU5pvHYX; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726796AbeGLMbT (ORCPT + 3 others); Thu, 12 Jul 2018 08:31:19 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:40370 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726650AbeGLMbS (ORCPT ); Thu, 12 Jul 2018 08:31:18 -0400 Received: by mail-wr1-f67.google.com with SMTP id t6-v6so21489162wrn.7 for ; Thu, 12 Jul 2018 05:21:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=f/1MpphKsVc3ilpi0246v71qDpt8XXYfD36DoNOaKyc=; b=YU5pvHYXVFt6ZH4l5t6g4uV7nfvRsI5Uy8Ev65EbdZbHIJ4aXJm3g/CUU23FF1JN31 cu7nLPcRQc+44wo7DWWeQYNeWdQkf3rD2Npobaux/R/heSVDC+Q8pnYG2ldB2daDN0ZC KbFqfWQWJPKUoe+Iudvug5wapJF9qJRgxNFd0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=f/1MpphKsVc3ilpi0246v71qDpt8XXYfD36DoNOaKyc=; b=CFxaGvcCxiyZFiboUohAr6WDML54RbzxuMfFgo+uQz7E+yNO/8KOKW7Rko0v+A1BSL RIEk1eowzPfqigoKwoca7h5Fth/C3Zdg93ELiRQ7UnAdS5tLSKtkZ/jd76Yjp3FX5Cij z2f+BgxLdOSNUJ/Y4p9dI567OwGxnxF2aM7BLPaDHfQmLseiwn+leGAI2rA+ghOValYW diTnWnEe9lOt4J+T4SqsE9key3nFeQdwDgCwRywTynSYqSf15RiIaAKjhQQ+alvZfWEf zK/HCMZi82qCq5ROmWGlbxiJyECXM5AKKvuT4Mv8xfRpKcHn1kh8HLyTbQLcMTJYgdIv Sayg== X-Gm-Message-State: AOUpUlHWTnRT5Ux43K9qy/Q7FwjcJrsH2wEmh+xCGhvlnsPimZpSonXN WSQEt2bdtZ0X0XRm8LteohA8NBZaSlU= X-Received: by 2002:adf:b112:: with SMTP id l18-v6mr1716739wra.101.1531398117808; Thu, 12 Jul 2018 05:21:57 -0700 (PDT) Received: from localhost.localdomain (33.153.69.91.rev.sfr.net. [91.69.153.33]) by smtp.gmail.com with ESMTPSA id y3-v6sm3551246wmd.24.2018.07.12.05.21.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 05:21:56 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: sai.praneeth.prakhya@intel.com, mingo@kernel.org, hdegoede@redhat.com, lukas@wunner.de, Ard Biesheuvel Subject: [PATCH 0/6] efi/x86 mixed mode cleanups Date: Thu, 12 Jul 2018 14:21:48 +0200 Message-Id: <20180712122154.13819-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org This series contains some fixes and cleanups for mixed-mode UEFI on x86. Patch #1 adds the missing locking in the runtime service wrapper code for mixed mode. This was found by inspection rather than having been reported but could be a candidate for -stable nonetheless. Patch #2 merges the remaining 32/64-bit specific parts of the setup_efi_pci routine. Patches #3 and #4 do the same for the UGA draw protocol discovery routines. Patch #5 fixes a latent bug in the UGA draw code. Patch #6 helps unused code paths to be optimized away on configurations that don't need them (32-bit only and 64-bit only) Ard Biesheuvel (6): efi/x86: prevent reentrant firmware calls in mixed mode efi/x86: merge setup_efi_pci32 and setup_efi_pci64 routines efi/x86: align efi_uga_draw_protocol typedef names to convention efi/x86: merge 32-bit and 64-bit UGA draw protocol setup routines efi/x86: add missing NULL initialization in UGA draw protocol discovery efi/x86: replace references to efi_early->is64 with efi_is_64bit() arch/x86/boot/compressed/eboot.c | 252 +++++--------------- arch/x86/boot/compressed/eboot.h | 12 +- arch/x86/platform/efi/efi_64.c | 101 +++++++- 3 files changed, 170 insertions(+), 195 deletions(-) -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Tested-by: Hans de Goede Signed-off-by: Lukas Wunner