From patchwork Wed Jul 17 04:40:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Park, Aiden" X-Patchwork-Id: 1133094 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45pPjF02Mlz9s3l for ; Wed, 17 Jul 2019 14:41:04 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id A427BC21E44; Wed, 17 Jul 2019 04:41:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 96CEBC21D8E; Wed, 17 Jul 2019 04:40:58 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A3A57C21DA2; Wed, 17 Jul 2019 04:40:56 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lists.denx.de (Postfix) with ESMTPS id D0BBEC21D4A for ; Wed, 17 Jul 2019 04:40:55 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jul 2019 21:40:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,272,1559545200"; d="scan'208";a="366888434" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by fmsmga006.fm.intel.com with ESMTP; 16 Jul 2019 21:40:53 -0700 Received: from orsmsx153.amr.corp.intel.com (10.22.226.247) by ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 16 Jul 2019 21:40:53 -0700 Received: from orsmsx116.amr.corp.intel.com ([169.254.7.102]) by ORSMSX153.amr.corp.intel.com ([169.254.12.99]) with mapi id 14.03.0439.000; Tue, 16 Jul 2019 21:40:53 -0700 From: "Park, Aiden" To: U-Boot Mailing List , Simon Glass , Bin Meng , Andy Shevchenko Thread-Topic: [PATCH v5 0/8] x86: Add basic Slim Bootloader payload support Thread-Index: AdU8V9bsGhwHhIJ/T9u4Z7jL/AN/Mw== Date: Wed, 17 Jul 2019 04:40:51 +0000 Message-ID: Accept-Language: ko-KR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTQ2MmJhOGYtNDQ2Yy00ZTI3LWFiMWYtZjQ0MWE5MjJhZWJjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiT09CVUJldzhIeWVHTWtTN2RiOUFuR0ZWTWJqSDJ0ektRUUpzM0VRMHg3RXJ3YUkxYXRCT1pIakpKaGFGUHhhUyJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Subject: [U-Boot] [PATCH v5 0/8] x86: Add basic Slim Bootloader payload support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch is to enable U-Boot as a payload which runs on top of Slim Bootloader(https://github.com/slimbootloader/slimbootloader) boot firmware for x86 platforms. The Slim Bootloader is designed with multi-stage architecture for the execution from reset vector to OS hand-off, and supports qemu, Apollolake, Whiskeylake and Coffeelake platforms consuming Intel FSP(https://github.com/IntelFsp/FSP) for silicon initialization including CAR and memory initialization. As multi-stage architecture, the Slim Bootloader adopts payload concept which is responsible for OS load from media devices and boot OS and it supports 32-bit PE32, EFI FV, ELF and RAW format payloads. The Slim Bootloader generate HOB(Hand Off Block) list pointer, which has debug serial port info, memory map info, performance data info and etc., and passes it to a payload. U-Boot configures serial port, dram, pci, tsc and others with the information from the HOB. The compiled U-Boot supports usb, sata and sd/mmc boot which have been verified on qemu and other supported platforms. Changes in v5: * Remove X86_LOAD_FROM_32_BIT from slimbootloader_defconfig Changes in v4: * Use arch/x86/cpu/start.S with CONFIG_SYS_SLIMBOOTLOADER condition * Update U-boot or u-boot to U-Boot in commit message * Add static keyword in static function Changes in v3: * Add a brief description about Slim Bootloader in 1st patch * Add a common HOB library to be used by both FSP and Slim Bootloader * Move board/slimbootloader/slimbootloader to board/intel/slimbootloader * Add more description board/intel/slimbootloader/README * Fix comments from the code review Changes in v2: * Split a single patch to 8 patches * Add more comment for each structure and functions Aiden Park (8): x86: Add new slimbootloader CPU type x86: Add a common hob library x86: slimbootloader: Add memory configuration x86: slimbootloader: Add serial driver x86: slimbootloader: Set TSC information for timer driver x86: slimbootloader: Add a slimbootloader device tree board: intel: Add new slimbootloader board x86: Skip setting up MTRRs in slimbootloader arch/x86/Kconfig | 1 + arch/x86/cpu/Makefile | 1 + arch/x86/cpu/slimbootloader/Kconfig | 26 ++ arch/x86/cpu/slimbootloader/Makefile | 5 + arch/x86/cpu/slimbootloader/car.S | 14 + arch/x86/cpu/slimbootloader/dram.c | 151 +++++++++++ arch/x86/cpu/slimbootloader/serial.c | 69 +++++ arch/x86/cpu/slimbootloader/slimbootloader.c | 55 ++++ arch/x86/cpu/start.S | 6 +- arch/x86/dts/Makefile | 1 + arch/x86/dts/slimbootloader.dts | 27 ++ .../asm/arch-slimbootloader/slimbootloader.h | 121 +++++++++ arch/x86/include/asm/fsp/fsp_hob.h | 183 +------------ arch/x86/include/asm/fsp/fsp_support.h | 37 +-- arch/x86/include/asm/fsp/fsp_types.h | 8 - arch/x86/include/asm/global_data.h | 2 +- arch/x86/include/asm/hob.h | 250 ++++++++++++++++++ arch/x86/lib/Makefile | 3 +- arch/x86/lib/asm-offsets.c | 2 +- arch/x86/lib/fsp/fsp_support.c | 78 +----- arch/x86/lib/hob.c | 104 ++++++++ arch/x86/lib/init_helpers.c | 3 +- board/intel/Kconfig | 14 + board/intel/slimbootloader/Kconfig | 51 ++++ board/intel/slimbootloader/Makefile | 5 + board/intel/slimbootloader/README | 133 ++++++++++ board/intel/slimbootloader/slimbootloader.c | 17 ++ board/intel/slimbootloader/start.S | 9 + configs/slimbootloader_defconfig | 21 ++ include/configs/slimbootloader.h | 59 +++++ 30 files changed, 1149 insertions(+), 307 deletions(-) create mode 100644 arch/x86/cpu/slimbootloader/Kconfig create mode 100644 arch/x86/cpu/slimbootloader/Makefile create mode 100644 arch/x86/cpu/slimbootloader/car.S create mode 100644 arch/x86/cpu/slimbootloader/dram.c create mode 100644 arch/x86/cpu/slimbootloader/serial.c create mode 100644 arch/x86/cpu/slimbootloader/slimbootloader.c create mode 100644 arch/x86/dts/slimbootloader.dts create mode 100644 arch/x86/include/asm/arch-slimbootloader/slimbootloader.h create mode 100644 arch/x86/include/asm/hob.h create mode 100644 arch/x86/lib/hob.c create mode 100644 board/intel/slimbootloader/Kconfig create mode 100644 board/intel/slimbootloader/Makefile create mode 100644 board/intel/slimbootloader/README create mode 100644 board/intel/slimbootloader/slimbootloader.c create mode 100644 board/intel/slimbootloader/start.S create mode 100644 configs/slimbootloader_defconfig create mode 100644 include/configs/slimbootloader.h Reviewed-by: Andy Shevchenko --- 2.20.1