Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6F2B4C0015E for ; Thu, 3 Aug 2023 23:17:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5A51486CA4; Fri, 4 Aug 2023 01:17:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="WjpAh0T+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9F619866BB; Fri, 4 Aug 2023 01:17:10 +0200 (CEST) Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 49F33866C0 for ; Fri, 4 Aug 2023 01:17:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-34617b29276so7018655ab.0 for ; Thu, 03 Aug 2023 16:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1691104627; x=1691709427; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=a+uAbfAY2+0Nhyc9ZwVOngv2Fr0vW1HEHlEBkvGfzMw=; b=WjpAh0T+UJMPpmsTMByPRbq2gzHe1y60uS+uA1vdzaWOOBASER0j9Zy5QjRBYyZ8Ci dHuQ0K4LLNjh7M6iloOcXZnuuUdTL68gw08vDnmLzZn7wQ1O68C9dtv3jixjZmTi3cUs 0NEoOgyoED+wrjgLImKmcjSq7Xdlc+dd31RiQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691104627; x=1691709427; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a+uAbfAY2+0Nhyc9ZwVOngv2Fr0vW1HEHlEBkvGfzMw=; b=Fau71zWLchIbyhzYIh6+mFLRq8w3sueZuvX/dkG6eu6RIYBUvZT/igiablL083yOXI D5GIf8UO8qPZa+ZeT3eYXzdy20Pnd3PuFR+rXkjJh6V9kZKXbr67CxT6ZsjznOAV/f2D d1Z+BgyphA1nbjELGuyaF6/7zE6ZCoRECDLVsH5uBlxX6pU6S5H4UTTVFflhxna4Pvse GApOezq85L1C7S6UFmwRB26SI4cakMDgKWF6VVhmNfJDh8wob5kHyqFHRbXVpwWV6MND FI9/8GyUyYFZrhJKrPiPcTvbYXwbdC4YxzoBwCj51SuNKPDvFk8thj7lLss/NJzeeyJg 5pFg== X-Gm-Message-State: AOJu0YzrZc76rV6D9bbtSaVYlgIz7xRRruHtRoBFzW4x66pFSMbZOMmb CWULsAzn/Vt9Aiqj71FbtbXXRTdF0ttsgpBtaz0= X-Google-Smtp-Source: AGHT+IHixX1JuUCnxdSYO0xeH5EOXh5OzwXUBZoAbqWsi/ItfSxpqmdjP8/AMz1UrOcTP6YMqlftkA== X-Received: by 2002:a05:6e02:1a88:b0:345:fe2d:56f with SMTP id k8-20020a056e021a8800b00345fe2d056fmr199062ilv.14.1691104626853; Thu, 03 Aug 2023 16:17:06 -0700 (PDT) Received: from sjg1.roam.corp.google.com (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id fw13-20020a0566381d8d00b00430209d0efesm200478jab.59.2023.08.03.16.17.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 16:17:06 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Mattijs Korpershoek , Simon Glass Subject: [PATCH v3 1/2] x86: coreboot: Add IDE and SATA Date: Thu, 3 Aug 2023 17:16:41 -0600 Message-ID: <20230803231703.1213107-2-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.640.ga95def55d0-goog In-Reply-To: <20230803231703.1213107-1-sjg@chromium.org> References: <20230803231703.1213107-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add these options to permit access to more disk types. Add some documentation as well. Signed-off-by: Simon Glass --- Changes in v3: - Update the documentation to use ich9-ahci - Mention that $DISK is a disk-image file configs/coreboot64_defconfig | 1 + configs/coreboot_defconfig | 9 +++++++++ doc/board/coreboot/coreboot.rst | 20 ++++++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/configs/coreboot64_defconfig b/configs/coreboot64_defconfig index 8aadaa68c279..ded0e6f2422d 100644 --- a/configs/coreboot64_defconfig +++ b/configs/coreboot64_defconfig @@ -26,6 +26,7 @@ CONFIG_SYS_PBSIZE=532 CONFIG_CMD_IDE=y CONFIG_CMD_MMC=y CONFIG_CMD_PART=y +CONFIG_CMD_SATA=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y diff --git a/configs/coreboot_defconfig b/configs/coreboot_defconfig index 8e11de663819..56cc542df6c6 100644 --- a/configs/coreboot_defconfig +++ b/configs/coreboot_defconfig @@ -22,8 +22,10 @@ CONFIG_LOGF_FUNC=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_LAST_STAGE_INIT=y CONFIG_PCI_INIT_R=y +CONFIG_CMD_IDE=y CONFIG_CMD_MMC=y CONFIG_CMD_PART=y +CONFIG_CMD_SATA=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y @@ -48,6 +50,13 @@ CONFIG_USE_ROOTPATH=y CONFIG_REGMAP=y CONFIG_SYSCON=y # CONFIG_ACPIGEN is not set +CONFIG_SYS_IDE_MAXDEVICE=4 +CONFIG_SYS_ATA_DATA_OFFSET=0 +CONFIG_SYS_ATA_REG_OFFSET=0 +CONFIG_SYS_ATA_ALT_OFFSET=0 +CONFIG_ATAPI=y +CONFIG_LBA48=y +CONFIG_SYS_64BIT_LBA=y CONFIG_NVME_PCI=y # CONFIG_PCI_PNP is not set CONFIG_SOUND=y diff --git a/doc/board/coreboot/coreboot.rst b/doc/board/coreboot/coreboot.rst index 21801a8a4d90..b2c0a4c20c98 100644 --- a/doc/board/coreboot/coreboot.rst +++ b/doc/board/coreboot/coreboot.rst @@ -41,6 +41,26 @@ At present it seems that for Minnowboard Max, coreboot does not pass through the video information correctly (it always says the resolution is 0x0). This works correctly for link though. +You can run via QEMU using:: + + qemu-system-x86_64 -bios build/coreboot.rom -serial mon:stdio + +The `-serial mon:stdio` part shows both output in the display and on the +console. It is optional. You can add `nographic` as well to *only* get console +output. + +To run with a disk-image file called `$DISK`:: + + qemu-system-x86_64 -bios build/coreboot.rom -serial mon:stdio \ + -drive id=disk,file=$DISK,if=none \ + -device ich9-ahci,id=ahci \ + -device ide-hd,drive=disk,bus=ahci.0 + +Then you can scan it with `scsi scan` and access it normally. + +To use 4GB of memory, typically necessary for booting Linux distros, add +`-m 4GB`. + 64-bit U-Boot ------------- -- 2.41.0.640.ga95def55d0-goog