From patchwork Tue Nov 20 16:20:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1000625 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=198.137.202.133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="l+EugI3y"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42zs1C4SWDz9s3l for ; Wed, 21 Nov 2018 03:41:51 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=HjwXt9yYce9G2AQKwbxqJWK2VGB1r10lubrbWgiN8NQ=; b=l+EugI3yIm+AuJ koDqNDSwVl18xtwy49KiJv5EFS8JO8Eo7w6yZaY6AEnj0xRdbMtnOZRcYgf1niKyk3/YOR37wMlb0 DdgcZhwU24+nxBNdrpRD8MGyoXLDBvrs4OgOqVby9AP4rpFMyaD8dEJVd/41QApxEBD3bPMtFXjZ5 8vqnfPV+UfAgcLiZCutm6BW/o9pQfE0crUv+EVXyHyAA0d6+7K5TpQoVu0tCV9W48AXMFrW4TOjYL hGYAJOsrgsiAubBB09zVg01HY97YtrndkxU7+vhWtu8s07eEr67wPBkxzdJzHqLFcVIJadGPtnu3q nGjzZIielGiPWRTE/e6A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP95v-0006NI-4f; Tue, 20 Nov 2018 16:41:47 +0000 Received: from mx-out.tlen.pl ([193.222.135.142]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP8lz-00067D-FH for openwrt-devel@lists.openwrt.org; Tue, 20 Nov 2018 16:21:27 +0000 Received: (wp-smtpd smtp.tlen.pl 20191 invoked from network); 20 Nov 2018 17:20:55 +0100 Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 20 Nov 2018 17:20:55 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Tue, 20 Nov 2018 17:20:38 +0100 Message-Id: <20181120162044.16371-1-tomek_n@o2.pl> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-WP-MailID: 9282e04692bb578854c8654118043459 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [IZOE] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_082112_541577_31A469E2 X-CRM114-Status: UNSURE ( 6.08 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [193.222.135.142 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) Subject: [OpenWrt-Devel] [PATCH v4 0/6] intel-microcode: load as early as possible X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomasz Maciej Nowak Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This small series addresses current problem with late loading of Intel microcode in OpenWrt. Following the commit messages [1] and later discussion, late loading off the microcode can be ineffective for some processors [2] and for others disabled [3]. Also it is discouraged for any processor starting from Haswell and Silvermont. Therefore this series converts the Intel microcode bundle to an initial ram disk which is loaded with grub, so kernel has access to it as early as possible. Previous patch series: https://patchwork.ozlabs.org/project/lede/list/?series=39372 1. https://lore.kernel.org/patchwork/cover/348236 2. https://lore.kernel.org/patchwork/cover/348236/#508603 3. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=723f2828a98c8ca19842042f418fb30dd8cfc0f7 Changes in v4: - copy also hidden files: x86: add packages files to image bootfs - no changes: 1) include/rootfs.mk: remove boot directory 2) x86: mount writable bootfs 3) intel-microcode: remove dependency on iucode-tool 4) x86: add intel microcode entries to grub config 5) intel-microcode: create early load microcode image Change suggested by Philip Prindeville. Changes in v3: - replaced "include/rootfs.mk: move boot directory for later use" with "include/rootfs.mk: remove boot directory"; the final rootfs is always created after targets rootfs, so there's no need to save files for later use, also there was side effect to this approach, it kept the old files if packages version changed and buildroot wasn't cleaned beforehand - reflect the changes in "include/rootfs.mk: remove boot directory": x86: add packages files to image bootfs - expand commit message, narrow down the test in grub config: x86: add intel microcode entries to grub config - no changes: 1) x86: mount writable bootfs 2) intel-microcode: remove dependency on iucode-tool 3) intel-microcode: create early load microcode image Changes in v2: - three new commits allowing buildsystem to properly handle packages installing files to /boot directory, mainly for x86 target: 1) include/rootfs.mk: move boot directory for later use 2) x86: mount writable bootfs 3) x86: add packages files to image bootfs - uncomplicate test for AMD processors in: x86: add intel microcode entries to grub config - remove package specific hook in x86 image Makefile, remove postinst/prerm scripts and install microcode directly to /boot: intel-microcode: create early load microcode image - no changes: intel-microcode: remove dependency on iucode-tool All changes in v2 suggested by Matthias Schiffer and Philip Prindeville. Tomasz Maciej Nowak (6): include/rootfs.mk: remove boot directory x86: mount writable bootfs x86: add packages files to image bootfs intel-microcode: remove dependency on iucode-tool x86: add intel microcode entries to grub config intel-microcode: create early load microcode image include/rootfs.mk | 1 + package/firmware/intel-microcode/Makefile | 16 +++++++++------- .../x86/base-files/lib/preinit/02_load_x86_ucode | 6 ++++-- .../x86/base-files/lib/preinit/79_move_config | 12 ++++-------- target/linux/x86/image/Makefile | 6 ++++-- target/linux/x86/image/grub-iso.cfg | 3 +++ target/linux/x86/image/grub.cfg | 3 +++ 7 files changed, 28 insertions(+), 19 deletions(-)