Received: by 2002:a17:505:56a3:b0:1be9:327d:8ee3 with SMTP id ya3csp210084njb; Wed, 10 Jul 2024 01:10:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVR+C9BiuQI75gXXSjKyQ67wFi7fcEGtP1m3K04SVEPizF78CDn0tWm2K4/bR83VMc0V8Mdwi3QPPUZ2FbZ8j0lG7iZXSw3 X-Google-Smtp-Source: AGHT+IGpBfyH965KtxaF7dmnfE7qGrOIopEj2XEGb003UTiVsBTnshdKHJg+RZPREM6zmWYQdTUO X-Received: by 2002:a05:6808:1312:b0:3d5:61d9:fac1 with SMTP id 5614622812f47-3d93c08a259mr5541155b6e.46.1720599040698; Wed, 10 Jul 2024 01:10:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720599040; cv=none; d=google.com; s=arc-20160816; b=bxD8hsNyUbg9IL/7HbyyRS/Kv7BwZ3tITk/+nIP7z9x7qoMwF4PQ+2MHMYEC9fzKTb LB/B75iVJyS4j0a9c6u9SS4oa4hD57FYkdYEnIFkREPNCI96hxxE6MszpzO0vGAd8NGC 8nM+EEptkgdW764s0atIFXv3GgTd4fAUgA6WnzlNEsMWEhDhBD62H1RgXvrM3Q6/9hvh H8AwSb2TJFYurCkToRBLaRgq8BbhbLKHVIGngLaRwWE3bkfGYevvJy4AaxcgqwwdzrJl MLbbyOwGj/50ndV1eY9DUqrOf+yE8y107E4g0QsgWHwXxM2zGblVT14v1+x2A4mxh/Nu iOhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :in-reply-to:content-language:references:cc:to:from:subject :user-agent:mime-version:date:message-id; bh=lV8kR5nevk3wHWoh0uSHyifdip1SJ1FHtV/d+C8gj04=; fh=pXQCCfdofZB5e4ZqzVRXiVuRGYeJnl2WhJnhDCL9qiQ=; b=wJxjC52nFZ/VYaDs4mbI81xQc1BPb3rpRqjVGI22BCAMHp7IaWw4r1CU3rwdPiuYVy jj6YMSRFjHNNI+oD0ShtU8+hlGHKq3cdaSx7PtlFA5BZBL52kOjkBs7eJeP7Nc6/y6fk 0dAWMKTTvu1/zPB09DbLU9SAU3Mw06TMk9XyrRybtSDvrAhn04hQACPFnRnBK+C86yMR qbZOmfjqUoEMbsDZ3dDkWB3StIw2zyIcomONx166IozUU38dE1eaAdYRKyS+8pmxcRZZ ViMbH5reCCcAK/wwVJn1DSr6Eb7fMyJWjNAnf1/EG8lB5zYhzFm5GOgZrsq5lGYDBp/K vKBg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-79f190b679csi394645785a.451.2024.07.10.01.10.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jul 2024 01:10:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRSP5-0006SH-HF; Wed, 10 Jul 2024 04:10:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRSP3-0006PI-KX; Wed, 10 Jul 2024 04:10:17 -0400 Received: from gandalf.ozlabs.org ([150.107.74.76] helo=mail.ozlabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRSP1-0002EQ-NI; Wed, 10 Jul 2024 04:10:17 -0400 Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4WJrBR1lVGz4wym; Wed, 10 Jul 2024 18:10:07 +1000 (AEST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4WJr9z3Q9vz4wcl; Wed, 10 Jul 2024 18:09:42 +1000 (AEST) Message-ID: Date: Wed, 10 Jul 2024 10:09:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v47 00/19] hw/sd/sdcard: Add eMMC support From: =?UTF-8?Q?C=C3=A9dric_Le_Goater?= To: =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell , Andrew Jeffery , qemu-block@nongnu.org, Bin Meng , Joel Stanley , Jamin Lin , Steven Lee , Troy Lee References: <20240709152556.52896-1-philmd@linaro.org> Content-Language: en-US, fr In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=150.107.74.76; envelope-from=SRS0=VgH8=OK=kaod.org=clg@ozlabs.org; helo=mail.ozlabs.org X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: CFOgi3pvKejV On 7/10/24 6:58 AM, Cédric Le Goater wrote: > On 7/9/24 11:39 PM, Philippe Mathieu-Daudé wrote: >> On 9/7/24 17:58, Cédric Le Goater wrote: >>> On 7/9/24 5:25 PM, Philippe Mathieu-Daudé wrote: >>>> Since v42: >>>> - Stick to spec v4.3 (re-simplified EXT_CSD register & migrate) >>>> - Fill CID register >>>> - Few changes to CSD register >>>> - Implement 'boot-mode' reset timing >>>> - Add 'boot-size' property >>>> >>>> Change required for aspeed branch: >>>> -- >8 -- >>>> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c >>>> index 8c0e36badd..563816b710 100644 >>>> --- a/hw/arm/aspeed.c >>>> +++ b/hw/arm/aspeed.c >>>> @@ -344,3 +344,3 @@ static void sdhci_attach_drive(SDHCIState *sdhci, DriveInfo *dinfo, bool emmc, >>>>           if (emmc) { >>>> -            qdev_prop_set_uint8(card, "boot-config", boot_emmc ? 0x48 : 0x0); >>>> +            qdev_prop_set_uint64(card, "boot-size", 1 * MiB); >>>>           } >>>> (I'm still reluctant to merge patches 16-18)... >>> >>> Then, please drop all changes related to the boot partitions. I will keep >>> the original patches in my tree and address the feature when I have time. >>> TYPE_EMMC is already great to have. >> >> As you mentioned on today's community call, eMMC is a chipset soldered >> on a board, so our boards exactly knows what size to expect on the card, >> and whether boot partitions are present or not. > > My remark was on the use of 3 blockdevs to represent the eMMC contents. > 1 should be enough. > > Having a "boot-size" property to set the BOOT_SIZE_MULT register is fine. > The Aspeed model does some assumption today when installing the first > boot area as a boot ROM : > >     aspeed_install_boot_rom(bmc, blk_by_legacy_dinfo(emmc0), 64 * KiB); > > The "boot-size" property will clarify the settings. Please keep it. 64 * KiB is not related to the eMMC partition size. It is a SRAM limit in which the SoC loads the boot data. Thanks, C.