All of lore.kernel.org
 help / color / mirror / Atom feed
* Need to merge - QEMU patch for booting eMMC image for AST2600 machine
@ 2021-09-25 17:07 Shitalkumar Gandhi via
  2021-09-26  7:59 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 6+ messages in thread
From: Shitalkumar Gandhi via @ 2021-09-25 17:07 UTC (permalink / raw)
  To: qemu-devel


[-- Attachment #1.1: Type: text/plain, Size: 295 bytes --]

Hi,

I am attaching a patch that will fix eMMC image booting on QEMU for AST2600 machine, without this patch it will be stuck after SPL saying, "booting from RAM".

Please review and merge, thanks.

Let me know in case of any concern.

Thanks.

BR,
Shitalkumar


Seagate Internal

[-- Attachment #1.2: Type: text/html, Size: 1000 bytes --]

[-- Attachment #2: 0001-hw-arm-aspeed-Added-mmc-boot-support-for-AST2600-eMM.patch --]
[-- Type: application/octet-stream, Size: 1366 bytes --]

From 92b8ec93c7ad48c3ebdd502b679a80398c06bc3f Mon Sep 17 00:00:00 2001
From: Shitalkumar Gandhi <shitalkumar.gandhi@seagate.com>
Date: Fri, 24 Sep 2021 20:46:22 +0530
Subject: [PATCH] hw/arm/aspeed:Added mmc boot support for AST2600 eMMC image.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This patch has been added to boot eMMC image for AST2600 machine on
QEMU.

Run quemu as follows:

./qemu-system-arm -m 1G -M ast2600-evb -nographic -drive
file=mmc-evb-ast2600.img,format=raw,if=sd,index=2

Tested: Booted AST2600 eMMC image on QEMU.
Suggested-by:  <venture@google.com>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20210416162426.3217033-1-venture@google.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/arm/aspeed.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index ba5f1dc5af..6a890adb83 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -148,7 +148,7 @@ struct AspeedMachineState {
         SCU_AST2400_HW_STRAP_BOOT_MODE(AST2400_SPI_BOOT))
 
 /* AST2600 evb hardware value */
-#define AST2600_EVB_HW_STRAP1 0x000000C0
+#define AST2600_EVB_HW_STRAP1 (0x000000C0 | AST26500_HW_STRAP_BOOT_SRC_EMMC)
 #define AST2600_EVB_HW_STRAP2 0x00000003
 
 /* Tacoma hardware value */
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Need to merge - QEMU patch for booting eMMC image for AST2600 machine
  2021-09-25 17:07 Need to merge - QEMU patch for booting eMMC image for AST2600 machine Shitalkumar Gandhi via
@ 2021-09-26  7:59 ` Philippe Mathieu-Daudé
  2021-09-27 14:15   ` Cédric Le Goater
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-09-26  7:59 UTC (permalink / raw)
  To: Shitalkumar Gandhi, qemu-devel, Cédric Le Goater
  Cc: Hao Wu, Patrick Venture

Hi,

On 9/25/21 19:07, Shitalkumar Gandhi via wrote:
> Hi,
> 
> I am attaching a patch that will fix eMMC image booting on QEMU for
> AST2600 machine, without this patch it will be stuck after SPL saying,
> "booting from RAM".
> 
> Please review and merge, thanks.
> 
> Let me know in case of any concern.

Thanks for your patch.

Please look at how to submit patches here:
https://wiki.qemu.org/Contribute/SubmitAPatch#Submitting_your_Patches

> This patch has been added to boot eMMC image for AST2600 machine on
> QEMU.
>
> Run quemu as follows:
>
> ./qemu-system-arm -m 1G -M ast2600-evb -nographic -drive
> file=mmc-evb-ast2600.img,format=raw,if=sd,index=2

What is index=2?

Is this mmc-evb-ast2600.img image publicly available?

> Tested: Booted AST2600 eMMC image on QEMU.
> Suggested-by:  <venture@google.com>
> Reviewed-by: Hao Wu <wuhaotsh@google.com>
> Reviewed-by: Cédric Le Goater <clg@kaod.org>
> Message-Id: <20210416162426.3217033-1-venture@google.com>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
>  hw/arm/aspeed.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index ba5f1dc5af..6a890adb83 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -148,7 +148,7 @@ struct AspeedMachineState {
>          SCU_AST2400_HW_STRAP_BOOT_MODE(AST2400_SPI_BOOT))
>
>  /* AST2600 evb hardware value */
> -#define AST2600_EVB_HW_STRAP1 0x000000C0
> +#define AST2600_EVB_HW_STRAP1 (0x000000C0 |
AST26500_HW_STRAP_BOOT_SRC_EMMC)

IIUC you are not implementing any eMMC code, simply faking the
controller can support eMMC, but the card is used in SD mode?

I'm surprised your guest is happy and boot that. If so, then
what is the point of announcing eMMC is supported if not used?

Regards,

Phil.

>  #define AST2600_EVB_HW_STRAP2 0x00000003
>
>  /* Tacoma hardware value */
> --
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Need to merge - QEMU patch for booting eMMC image for AST2600 machine
  2021-09-26  7:59 ` Philippe Mathieu-Daudé
@ 2021-09-27 14:15   ` Cédric Le Goater
  2021-09-27 14:45     ` Shitalkumar Gandhi
  0 siblings, 1 reply; 6+ messages in thread
From: Cédric Le Goater @ 2021-09-27 14:15 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Shitalkumar Gandhi, qemu-devel, qemu-arm
  Cc: Hao Wu, Patrick Venture, Andrew Jeffery, Joel Stanley

Hello,

On 9/26/21 09:59, Philippe Mathieu-Daudé wrote:
> Hi,
> 
> On 9/25/21 19:07, Shitalkumar Gandhi via wrote:
>> Hi,
>>
>> I am attaching a patch that will fix eMMC image booting on QEMU for
>> AST2600 machine, without this patch it will be stuck after SPL saying,
>> "booting from RAM".
>>
>> Please review and merge, thanks.
>>
>> Let me know in case of any concern.
> 
> Thanks for your patch.
> 
> Please look at how to submit patches here:
> https://wiki.qemu.org/Contribute/SubmitAPatch#Submitting_your_Patches
> 
>> This patch has been added to boot eMMC image for AST2600 machine on
>> QEMU.
>>
>> Run quemu as follows:
>>
>> ./qemu-system-arm -m 1G -M ast2600-evb -nographic -drive
>> file=mmc-evb-ast2600.img,format=raw,if=sd,index=2
> 
> What is index=2?
> 
> Is this mmc-evb-ast2600.img image publicly available?
> 
>> Tested: Booted AST2600 eMMC image on QEMU.
>> Suggested-by:  <venture@google.com>
>> Reviewed-by: Hao Wu <wuhaotsh@google.com>
>> Reviewed-by: Cédric Le Goater <clg@kaod.org>
>> Message-Id: <20210416162426.3217033-1-venture@google.com>
>> Signed-off-by: Cédric Le Goater <clg@kaod.org>

I don't remember having reviewed or signed this patch.

>> ---
>>   hw/arm/aspeed.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
>> index ba5f1dc5af..6a890adb83 100644
>> --- a/hw/arm/aspeed.c
>> +++ b/hw/arm/aspeed.c
>> @@ -148,7 +148,7 @@ struct AspeedMachineState {
>>           SCU_AST2400_HW_STRAP_BOOT_MODE(AST2400_SPI_BOOT))
>>
>>   /* AST2600 evb hardware value */
>> -#define AST2600_EVB_HW_STRAP1 0x000000C0
>> +#define AST2600_EVB_HW_STRAP1 (0x000000C0 |
> AST26500_HW_STRAP_BOOT_SRC_EMMC)
> 
> IIUC you are not implementing any eMMC code, simply faking the
> controller can support eMMC, but the card is used in SD mode?

I think this is related to this issue :

   https://github.com/openbmc/openbmc/issues/3818

> I'm surprised your guest is happy and boot that. If so, then
> what is the point of announcing eMMC is supported if not used?
It should work on the aspeed branches I maintain which include the
emmc support but this is not for upstream.


Some comments,

I don't think the AST2600 evb boots by default on emmc. I agree
it's nice to have for tests and there are other ways to modify
slightly the default behavior.

We could add a machine property to define the 'hw-strap1' register
but it's a bit difficult to remember the value.
  
A custom '-boot' value setting the 'hw-strap1' for the AST2600
machine seems a better alternative. We could merge such a change
even if emmc is not ready.

Thanks,

C.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Need to merge - QEMU patch for booting eMMC image for AST2600 machine
  2021-09-27 14:15   ` Cédric Le Goater
@ 2021-09-27 14:45     ` Shitalkumar Gandhi
  2021-09-27 18:55       ` Shitalkumar Gandhi
  0 siblings, 1 reply; 6+ messages in thread
From: Shitalkumar Gandhi @ 2021-09-27 14:45 UTC (permalink / raw)
  To: Cédric Le Goater, Philippe Mathieu-Daudé, qemu-devel, qemu-arm
  Cc: Hao Wu, Patrick Venture, Andrew Jeffery, Joel Stanley

[-- Attachment #1: Type: text/plain, Size: 4984 bytes --]

Yes, I have raised this.

  https://secure-web.cisco.com/13Y5NFuOyUgdDUpPwn5OgA8NY1sIBiajir-UA3dTP1yJGRWy2THA4rAtsVnZgvUls637SkO3gba7qmnDzMaxpGKwioLHRH2wf1xefPAKWL8QzKFY4phI7X7oyU8rhzQaj5dwIgY_y_WgmTI8SDnnzBRgQ8R742s0fb89kXTBSexyXTLqSOW11D3kpi0OSLjADEWJ5u87lD25OUNSiSQIFBC6LGiiYQbD2oxDTFeForuIGaT5fpAiI6SYEfc2lBf2j8mjnP-w8K-t2if_hfV0tPeFcYebcRDXoovS10ww85LEADDvpRReejBwftxZK6b5_AgH2U6beeWJ4r-VOi9-2ZxMC6iHuIZ1RBM0gzCMZpRFxgJb2E44ETONZneg1HJheeiEqDqyoLVGqgQbCu8pOW2e9njyXPvG94ZC8uh4ZodtuPdFanbmvOb6cgic0tZ4Q/https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc%2Fissues%2F3818

BR,
Shitalkumar
________________________________
From: Cédric Le Goater <clg@kaod.org>
Sent: Monday, September 27, 2021 7:15 AM
To: Philippe Mathieu-Daudé <f4bug@amsat.org>; Shitalkumar Gandhi <shitalkumar.gandhi@seagate.com>; qemu-devel@nongnu.org <qemu-devel@nongnu.org>; qemu-arm <qemu-arm@nongnu.org>
Cc: Hao Wu <wuhaotsh@google.com>; Patrick Venture <venture@google.com>; Andrew Jeffery <andrew@aj.id.au>; Joel Stanley <joel@jms.id.au>
Subject: Re: Need to merge - QEMU patch for booting eMMC image for AST2600 machine


This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.


Hello,

On 9/26/21 09:59, Philippe Mathieu-Daudé wrote:
> Hi,
>
> On 9/25/21 19:07, Shitalkumar Gandhi via wrote:
>> Hi,
>>
>> I am attaching a patch that will fix eMMC image booting on QEMU for
>> AST2600 machine, without this patch it will be stuck after SPL saying,
>> "booting from RAM".
>>
>> Please review and merge, thanks.
>>
>> Let me know in case of any concern.
>
> Thanks for your patch.
>
> Please look at how to submit patches here:
> https://secure-web.cisco.com/1oJkyJ6o1FSjeLofNCk-SJBvHe8F5z4Gz5K8rDouTJuL6pWtzenJ1yE0imiWoNBJUx5BooSaYSkvQfHj1aTBxq2d7eD-xZyztLaT2DS20DjjENjFLA8jfhIXRN_hJPLa8vikrdvz9p60Jy7kojB3AJRD9ZzEL6NwZS2AZfc2ElH7-meAzFGLq-3qKResEOEwqEkMU5ocivYTBkJpgcJLPiR34MZr3ZUdMsFnYCLYImWZ9TxlbUyo742xmCDQdg-CM-GFhJm3h6Vu6t1b8LHALySrJqK4dUdKPfzYgkDmhH11RMEXwPNMW19QNF62MbxEDFcekCoClvnOYuRsoEjgnwJH-rJn9B-D54vVPbAhqsCkjjd8wBCwBCjbWuq2kovWRZC9hl7URdTe2-F3JVb2EItEsQBr52Wxc5D1D_tnuboaCIzn1osTeVB2_nJbwIIKc/https%3A%2F%2Fwiki.qemu.org%2FContribute%2FSubmitAPatch%23Submitting_your_Patches
>
>> This patch has been added to boot eMMC image for AST2600 machine on
>> QEMU.
>>
>> Run quemu as follows:
>>
>> ./qemu-system-arm -m 1G -M ast2600-evb -nographic -drive
>> file=mmc-evb-ast2600.img,format=raw,if=sd,index=2
>
> What is index=2?
>
> Is this mmc-evb-ast2600.img image publicly available?
>
>> Tested: Booted AST2600 eMMC image on QEMU.
>> Suggested-by:  <venture@google.com>
>> Reviewed-by: Hao Wu <wuhaotsh@google.com>
>> Reviewed-by: Cédric Le Goater <clg@kaod.org>
>> Message-Id: <20210416162426.3217033-1-venture@google.com>
>> Signed-off-by: Cédric Le Goater <clg@kaod.org>

I don't remember having reviewed or signed this patch.

>> ---
>>   hw/arm/aspeed.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
>> index ba5f1dc5af..6a890adb83 100644
>> --- a/hw/arm/aspeed.c
>> +++ b/hw/arm/aspeed.c
>> @@ -148,7 +148,7 @@ struct AspeedMachineState {
>>           SCU_AST2400_HW_STRAP_BOOT_MODE(AST2400_SPI_BOOT))
>>
>>   /* AST2600 evb hardware value */
>> -#define AST2600_EVB_HW_STRAP1 0x000000C0
>> +#define AST2600_EVB_HW_STRAP1 (0x000000C0 |
> AST26500_HW_STRAP_BOOT_SRC_EMMC)
>
> IIUC you are not implementing any eMMC code, simply faking the
> controller can support eMMC, but the card is used in SD mode?

I think this is related to this issue :

   https://secure-web.cisco.com/13Y5NFuOyUgdDUpPwn5OgA8NY1sIBiajir-UA3dTP1yJGRWy2THA4rAtsVnZgvUls637SkO3gba7qmnDzMaxpGKwioLHRH2wf1xefPAKWL8QzKFY4phI7X7oyU8rhzQaj5dwIgY_y_WgmTI8SDnnzBRgQ8R742s0fb89kXTBSexyXTLqSOW11D3kpi0OSLjADEWJ5u87lD25OUNSiSQIFBC6LGiiYQbD2oxDTFeForuIGaT5fpAiI6SYEfc2lBf2j8mjnP-w8K-t2if_hfV0tPeFcYebcRDXoovS10ww85LEADDvpRReejBwftxZK6b5_AgH2U6beeWJ4r-VOi9-2ZxMC6iHuIZ1RBM0gzCMZpRFxgJb2E44ETONZneg1HJheeiEqDqyoLVGqgQbCu8pOW2e9njyXPvG94ZC8uh4ZodtuPdFanbmvOb6cgic0tZ4Q/https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc%2Fissues%2F3818

> I'm surprised your guest is happy and boot that. If so, then
> what is the point of announcing eMMC is supported if not used?
It should work on the aspeed branches I maintain which include the
emmc support but this is not for upstream.


Some comments,

I don't think the AST2600 evb boots by default on emmc. I agree
it's nice to have for tests and there are other ways to modify
slightly the default behavior.

We could add a machine property to define the 'hw-strap1' register
but it's a bit difficult to remember the value.

A custom '-boot' value setting the 'hw-strap1' for the AST2600
machine seems a better alternative. We could merge such a change
even if emmc is not ready.

Thanks,

C.






Seagate Internal

[-- Attachment #2: Type: text/html, Size: 9099 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Need to merge - QEMU patch for booting eMMC image for AST2600 machine
  2021-09-27 14:45     ` Shitalkumar Gandhi
@ 2021-09-27 18:55       ` Shitalkumar Gandhi
  2021-09-28  6:06         ` Cédric Le Goater
  0 siblings, 1 reply; 6+ messages in thread
From: Shitalkumar Gandhi @ 2021-09-27 18:55 UTC (permalink / raw)
  To: Cédric Le Goater, Philippe Mathieu-Daudé, qemu-devel, qemu-arm
  Cc: Hao Wu, Patrick Venture, Andrew Jeffery, Joel Stanley

[-- Attachment #1: Type: text/plain, Size: 5579 bytes --]

Hi All,

Please let me know how to get this merged?

Thanks,
Shitalkumar
________________________________
From: Shitalkumar Gandhi <shitalkumar.gandhi@seagate.com>
Sent: Monday, September 27, 2021 7:45 AM
To: Cédric Le Goater <clg@kaod.org>; Philippe Mathieu-Daudé <f4bug@amsat.org>; qemu-devel@nongnu.org <qemu-devel@nongnu.org>; qemu-arm <qemu-arm@nongnu.org>
Cc: Hao Wu <wuhaotsh@google.com>; Patrick Venture <venture@google.com>; Andrew Jeffery <andrew@aj.id.au>; Joel Stanley <joel@jms.id.au>
Subject: Re: Need to merge - QEMU patch for booting eMMC image for AST2600 machine

Yes, I have raised this.

  https://secure-web.cisco.com/13Y5NFuOyUgdDUpPwn5OgA8NY1sIBiajir-UA3dTP1yJGRWy2THA4rAtsVnZgvUls637SkO3gba7qmnDzMaxpGKwioLHRH2wf1xefPAKWL8QzKFY4phI7X7oyU8rhzQaj5dwIgY_y_WgmTI8SDnnzBRgQ8R742s0fb89kXTBSexyXTLqSOW11D3kpi0OSLjADEWJ5u87lD25OUNSiSQIFBC6LGiiYQbD2oxDTFeForuIGaT5fpAiI6SYEfc2lBf2j8mjnP-w8K-t2if_hfV0tPeFcYebcRDXoovS10ww85LEADDvpRReejBwftxZK6b5_AgH2U6beeWJ4r-VOi9-2ZxMC6iHuIZ1RBM0gzCMZpRFxgJb2E44ETONZneg1HJheeiEqDqyoLVGqgQbCu8pOW2e9njyXPvG94ZC8uh4ZodtuPdFanbmvOb6cgic0tZ4Q/https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc%2Fissues%2F3818

BR,
Shitalkumar
________________________________
From: Cédric Le Goater <clg@kaod.org>
Sent: Monday, September 27, 2021 7:15 AM
To: Philippe Mathieu-Daudé <f4bug@amsat.org>; Shitalkumar Gandhi <shitalkumar.gandhi@seagate.com>; qemu-devel@nongnu.org <qemu-devel@nongnu.org>; qemu-arm <qemu-arm@nongnu.org>
Cc: Hao Wu <wuhaotsh@google.com>; Patrick Venture <venture@google.com>; Andrew Jeffery <andrew@aj.id.au>; Joel Stanley <joel@jms.id.au>
Subject: Re: Need to merge - QEMU patch for booting eMMC image for AST2600 machine


This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.


Hello,

On 9/26/21 09:59, Philippe Mathieu-Daudé wrote:
> Hi,
>
> On 9/25/21 19:07, Shitalkumar Gandhi via wrote:
>> Hi,
>>
>> I am attaching a patch that will fix eMMC image booting on QEMU for
>> AST2600 machine, without this patch it will be stuck after SPL saying,
>> "booting from RAM".
>>
>> Please review and merge, thanks.
>>
>> Let me know in case of any concern.
>
> Thanks for your patch.
>
> Please look at how to submit patches here:
> https://secure-web.cisco.com/1oJkyJ6o1FSjeLofNCk-SJBvHe8F5z4Gz5K8rDouTJuL6pWtzenJ1yE0imiWoNBJUx5BooSaYSkvQfHj1aTBxq2d7eD-xZyztLaT2DS20DjjENjFLA8jfhIXRN_hJPLa8vikrdvz9p60Jy7kojB3AJRD9ZzEL6NwZS2AZfc2ElH7-meAzFGLq-3qKResEOEwqEkMU5ocivYTBkJpgcJLPiR34MZr3ZUdMsFnYCLYImWZ9TxlbUyo742xmCDQdg-CM-GFhJm3h6Vu6t1b8LHALySrJqK4dUdKPfzYgkDmhH11RMEXwPNMW19QNF62MbxEDFcekCoClvnOYuRsoEjgnwJH-rJn9B-D54vVPbAhqsCkjjd8wBCwBCjbWuq2kovWRZC9hl7URdTe2-F3JVb2EItEsQBr52Wxc5D1D_tnuboaCIzn1osTeVB2_nJbwIIKc/https%3A%2F%2Fwiki.qemu.org%2FContribute%2FSubmitAPatch%23Submitting_your_Patches
>
>> This patch has been added to boot eMMC image for AST2600 machine on
>> QEMU.
>>
>> Run quemu as follows:
>>
>> ./qemu-system-arm -m 1G -M ast2600-evb -nographic -drive
>> file=mmc-evb-ast2600.img,format=raw,if=sd,index=2
>
> What is index=2?
>
> Is this mmc-evb-ast2600.img image publicly available?
>
>> Tested: Booted AST2600 eMMC image on QEMU.
>> Suggested-by:  <venture@google.com>
>> Reviewed-by: Hao Wu <wuhaotsh@google.com>
>> Reviewed-by: Cédric Le Goater <clg@kaod.org>
>> Message-Id: <20210416162426.3217033-1-venture@google.com>
>> Signed-off-by: Cédric Le Goater <clg@kaod.org>

I don't remember having reviewed or signed this patch.

>> ---
>>   hw/arm/aspeed.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
>> index ba5f1dc5af..6a890adb83 100644
>> --- a/hw/arm/aspeed.c
>> +++ b/hw/arm/aspeed.c
>> @@ -148,7 +148,7 @@ struct AspeedMachineState {
>>           SCU_AST2400_HW_STRAP_BOOT_MODE(AST2400_SPI_BOOT))
>>
>>   /* AST2600 evb hardware value */
>> -#define AST2600_EVB_HW_STRAP1 0x000000C0
>> +#define AST2600_EVB_HW_STRAP1 (0x000000C0 |
> AST26500_HW_STRAP_BOOT_SRC_EMMC)
>
> IIUC you are not implementing any eMMC code, simply faking the
> controller can support eMMC, but the card is used in SD mode?

I think this is related to this issue :

   https://secure-web.cisco.com/13Y5NFuOyUgdDUpPwn5OgA8NY1sIBiajir-UA3dTP1yJGRWy2THA4rAtsVnZgvUls637SkO3gba7qmnDzMaxpGKwioLHRH2wf1xefPAKWL8QzKFY4phI7X7oyU8rhzQaj5dwIgY_y_WgmTI8SDnnzBRgQ8R742s0fb89kXTBSexyXTLqSOW11D3kpi0OSLjADEWJ5u87lD25OUNSiSQIFBC6LGiiYQbD2oxDTFeForuIGaT5fpAiI6SYEfc2lBf2j8mjnP-w8K-t2if_hfV0tPeFcYebcRDXoovS10ww85LEADDvpRReejBwftxZK6b5_AgH2U6beeWJ4r-VOi9-2ZxMC6iHuIZ1RBM0gzCMZpRFxgJb2E44ETONZneg1HJheeiEqDqyoLVGqgQbCu8pOW2e9njyXPvG94ZC8uh4ZodtuPdFanbmvOb6cgic0tZ4Q/https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc%2Fissues%2F3818

> I'm surprised your guest is happy and boot that. If so, then
> what is the point of announcing eMMC is supported if not used?
It should work on the aspeed branches I maintain which include the
emmc support but this is not for upstream.


Some comments,

I don't think the AST2600 evb boots by default on emmc. I agree
it's nice to have for tests and there are other ways to modify
slightly the default behavior.

We could add a machine property to define the 'hw-strap1' register
but it's a bit difficult to remember the value.

A custom '-boot' value setting the 'hw-strap1' for the AST2600
machine seems a better alternative. We could merge such a change
even if emmc is not ready.

Thanks,

C.






Seagate Internal

[-- Attachment #2: Type: text/html, Size: 10023 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Need to merge - QEMU patch for booting eMMC image for AST2600 machine
  2021-09-27 18:55       ` Shitalkumar Gandhi
@ 2021-09-28  6:06         ` Cédric Le Goater
  0 siblings, 0 replies; 6+ messages in thread
From: Cédric Le Goater @ 2021-09-28  6:06 UTC (permalink / raw)
  To: Shitalkumar Gandhi, Philippe Mathieu-Daudé, qemu-devel, qemu-arm
  Cc: Hao Wu, Patrick Venture, Andrew Jeffery, Joel Stanley

Hello Shitalkumar

On 9/27/21 20:55, Shitalkumar Gandhi wrote:
> Hi All,
> 
> Please let me know how to get this merged?

Have you read what is at end of this email ?

Thanks

C.

  
> Thanks,
> Shitalkumar
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> *From:* Shitalkumar Gandhi <shitalkumar.gandhi@seagate.com>
> *Sent:* Monday, September 27, 2021 7:45 AM
> *To:* Cédric Le Goater <clg@kaod.org>; Philippe Mathieu-Daudé <f4bug@amsat.org>; qemu-devel@nongnu.org <qemu-devel@nongnu.org>; qemu-arm <qemu-arm@nongnu.org>
> *Cc:* Hao Wu <wuhaotsh@google.com>; Patrick Venture <venture@google.com>; Andrew Jeffery <andrew@aj.id.au>; Joel Stanley <joel@jms.id.au>
> *Subject:* Re: Need to merge - QEMU patch for booting eMMC image for AST2600 machine
> Yes, I have raised this.
> 
> https://secure-web.cisco.com/13Y5NFuOyUgdDUpPwn5OgA8NY1sIBiajir-UA3dTP1yJGRWy2THA4rAtsVnZgvUls637SkO3gba7qmnDzMaxpGKwioLHRH2wf1xefPAKWL8QzKFY4phI7X7oyU8rhzQaj5dwIgY_y_WgmTI8SDnnzBRgQ8R742s0fb89kXTBSexyXTLqSOW11D3kpi0OSLjADEWJ5u87lD25OUNSiSQIFBC6LGiiYQbD2oxDTFeForuIGaT5fpAiI6SYEfc2lBf2j8mjnP-w8K-t2if_hfV0tPeFcYebcRDXoovS10ww85LEADDvpRReejBwftxZK6b5_AgH2U6beeWJ4r-VOi9-2ZxMC6iHuIZ1RBM0gzCMZpRFxgJb2E44ETONZneg1HJheeiEqDqyoLVGqgQbCu8pOW2e9njyXPvG94ZC8uh4ZodtuPdFanbmvOb6cgic0tZ4Q/https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc%2Fissues%2F3818 
> <https://secure-web.cisco.com/13Y5NFuOyUgdDUpPwn5OgA8NY1sIBiajir-UA3dTP1yJGRWy2THA4rAtsVnZgvUls637SkO3gba7qmnDzMaxpGKwioLHRH2wf1xefPAKWL8QzKFY4phI7X7oyU8rhzQaj5dwIgY_y_WgmTI8SDnnzBRgQ8R742s0fb89kXTBSexyXTLqSOW11D3kpi0OSLjADEWJ5u87lD25OUNSiSQIFBC6LGiiYQbD2oxDTFeForuIGaT5fpAiI6SYEfc2lBf2j8mjnP-w8K-t2if_hfV0tPeFcYebcRDXoovS10ww85LEADDvpRReejBwftxZK6b5_AgH2U6beeWJ4r-VOi9-2ZxMC6iHuIZ1RBM0gzCMZpRFxgJb2E44ETONZneg1HJheeiEqDqyoLVGqgQbCu8pOW2e9njyXPvG94ZC8uh4ZodtuPdFanbmvOb6cgic0tZ4Q/https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc%2Fissues%2F3818>
> 
> BR,
> Shitalkumar
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> *From:* Cédric Le Goater <clg@kaod.org>
> *Sent:* Monday, September 27, 2021 7:15 AM
> *To:* Philippe Mathieu-Daudé <f4bug@amsat.org>; Shitalkumar Gandhi <shitalkumar.gandhi@seagate.com>; qemu-devel@nongnu.org <qemu-devel@nongnu.org>; qemu-arm <qemu-arm@nongnu.org>
> *Cc:* Hao Wu <wuhaotsh@google.com>; Patrick Venture <venture@google.com>; Andrew Jeffery <andrew@aj.id.au>; Joel Stanley <joel@jms.id.au>
> *Subject:* Re: Need to merge - QEMU patch for booting eMMC image for AST2600 machine
> 
> This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.
> 
> 
> Hello,
> 
> On 9/26/21 09:59, Philippe Mathieu-Daudé wrote:
>> Hi,
>>
>> On 9/25/21 19:07, Shitalkumar Gandhi via wrote:
>>> Hi,
>>>
>>> I am attaching a patch that will fix eMMC image booting on QEMU for
>>> AST2600 machine, without this patch it will be stuck after SPL saying,
>>> "booting from RAM".
>>>
>>> Please review and merge, thanks.
>>>
>>> Let me know in case of any concern.
>>
>> Thanks for your patch.
>>
>> Please look at how to submit patches here:
>> https://secure-web.cisco.com/1oJkyJ6o1FSjeLofNCk-SJBvHe8F5z4Gz5K8rDouTJuL6pWtzenJ1yE0imiWoNBJUx5BooSaYSkvQfHj1aTBxq2d7eD-xZyztLaT2DS20DjjENjFLA8jfhIXRN_hJPLa8vikrdvz9p60Jy7kojB3AJRD9ZzEL6NwZS2AZfc2ElH7-meAzFGLq-3qKResEOEwqEkMU5ocivYTBkJpgcJLPiR34MZr3ZUdMsFnYCLYImWZ9TxlbUyo742xmCDQdg-CM-GFhJm3h6Vu6t1b8LHALySrJqK4dUdKPfzYgkDmhH11RMEXwPNMW19QNF62MbxEDFcekCoClvnOYuRsoEjgnwJH-rJn9B-D54vVPbAhqsCkjjd8wBCwBCjbWuq2kovWRZC9hl7URdTe2-F3JVb2EItEsQBr52Wxc5D1D_tnuboaCIzn1osTeVB2_nJbwIIKc/https%3A%2F%2Fwiki.qemu.org%2FContribute%2FSubmitAPatch%23Submitting_your_Patches 
> <https://secure-web.cisco.com/1oJkyJ6o1FSjeLofNCk-SJBvHe8F5z4Gz5K8rDouTJuL6pWtzenJ1yE0imiWoNBJUx5BooSaYSkvQfHj1aTBxq2d7eD-xZyztLaT2DS20DjjENjFLA8jfhIXRN_hJPLa8vikrdvz9p60Jy7kojB3AJRD9ZzEL6NwZS2AZfc2ElH7-meAzFGLq-3qKResEOEwqEkMU5ocivYTBkJpgcJLPiR34MZr3ZUdMsFnYCLYImWZ9TxlbUyo742xmCDQdg-CM-GFhJm3h6Vu6t1b8LHALySrJqK4dUdKPfzYgkDmhH11RMEXwPNMW19QNF62MbxEDFcekCoClvnOYuRsoEjgnwJH-rJn9B-D54vVPbAhqsCkjjd8wBCwBCjbWuq2kovWRZC9hl7URdTe2-F3JVb2EItEsQBr52Wxc5D1D_tnuboaCIzn1osTeVB2_nJbwIIKc/https%3A%2F%2Fwiki.qemu.org%2FContribute%2FSubmitAPatch%23Submitting_your_Patches>
>>
>>> This patch has been added to boot eMMC image for AST2600 machine on
>>> QEMU.
>>>
>>> Run quemu as follows:
>>>
>>> ./qemu-system-arm -m 1G -M ast2600-evb -nographic -drive
>>> file=mmc-evb-ast2600.img,format=raw,if=sd,index=2
>>
>> What is index=2?
>>
>> Is this mmc-evb-ast2600.img image publicly available?
>>
>>> Tested: Booted AST2600 eMMC image on QEMU.
>>> Suggested-by:  <venture@google.com>
>>> Reviewed-by: Hao Wu <wuhaotsh@google.com>
>>> Reviewed-by: Cédric Le Goater <clg@kaod.org>
>>> Message-Id: <20210416162426.3217033-1-venture@google.com>
>>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> 
> I don't remember having reviewed or signed this patch.
> 
>>> ---
>>>   hw/arm/aspeed.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
>>> index ba5f1dc5af..6a890adb83 100644
>>> --- a/hw/arm/aspeed.c
>>> +++ b/hw/arm/aspeed.c
>>> @@ -148,7 +148,7 @@ struct AspeedMachineState {
>>>           SCU_AST2400_HW_STRAP_BOOT_MODE(AST2400_SPI_BOOT))
>>>
>>>   /* AST2600 evb hardware value */
>>> -#define AST2600_EVB_HW_STRAP1 0x000000C0
>>> +#define AST2600_EVB_HW_STRAP1 (0x000000C0 |
>> AST26500_HW_STRAP_BOOT_SRC_EMMC)
>>
>> IIUC you are not implementing any eMMC code, simply faking the
>> controller can support eMMC, but the card is used in SD mode?
> 
> I think this is related to this issue :
> 
> https://secure-web.cisco.com/13Y5NFuOyUgdDUpPwn5OgA8NY1sIBiajir-UA3dTP1yJGRWy2THA4rAtsVnZgvUls637SkO3gba7qmnDzMaxpGKwioLHRH2wf1xefPAKWL8QzKFY4phI7X7oyU8rhzQaj5dwIgY_y_WgmTI8SDnnzBRgQ8R742s0fb89kXTBSexyXTLqSOW11D3kpi0OSLjADEWJ5u87lD25OUNSiSQIFBC6LGiiYQbD2oxDTFeForuIGaT5fpAiI6SYEfc2lBf2j8mjnP-w8K-t2if_hfV0tPeFcYebcRDXoovS10ww85LEADDvpRReejBwftxZK6b5_AgH2U6beeWJ4r-VOi9-2ZxMC6iHuIZ1RBM0gzCMZpRFxgJb2E44ETONZneg1HJheeiEqDqyoLVGqgQbCu8pOW2e9njyXPvG94ZC8uh4ZodtuPdFanbmvOb6cgic0tZ4Q/https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc%2Fissues%2F3818 
> <https://secure-web.cisco.com/13Y5NFuOyUgdDUpPwn5OgA8NY1sIBiajir-UA3dTP1yJGRWy2THA4rAtsVnZgvUls637SkO3gba7qmnDzMaxpGKwioLHRH2wf1xefPAKWL8QzKFY4phI7X7oyU8rhzQaj5dwIgY_y_WgmTI8SDnnzBRgQ8R742s0fb89kXTBSexyXTLqSOW11D3kpi0OSLjADEWJ5u87lD25OUNSiSQIFBC6LGiiYQbD2oxDTFeForuIGaT5fpAiI6SYEfc2lBf2j8mjnP-w8K-t2if_hfV0tPeFcYebcRDXoovS10ww85LEADDvpRReejBwftxZK6b5_AgH2U6beeWJ4r-VOi9-2ZxMC6iHuIZ1RBM0gzCMZpRFxgJb2E44ETONZneg1HJheeiEqDqyoLVGqgQbCu8pOW2e9njyXPvG94ZC8uh4ZodtuPdFanbmvOb6cgic0tZ4Q/https%3A%2F%2Fgithub.com%2Fopenbmc%2Fopenbmc%2Fissues%2F3818>
> 
>> I'm surprised your guest is happy and boot that. If so, then
>> what is the point of announcing eMMC is supported if not used?
> It should work on the aspeed branches I maintain which include the
> emmc support but this is not for upstream.
> 
> 
> Some comments,
> 
> I don't think the AST2600 evb boots by default on emmc. I agree
> it's nice to have for tests and there are other ways to modify
> slightly the default behavior.
> 
> We could add a machine property to define the 'hw-strap1' register
> but it's a bit difficult to remember the value.
> 
> A custom '-boot' value setting the 'hw-strap1' for the AST2600
> machine seems a better alternative. We could merge such a change
> even if emmc is not ready.
> 
> Thanks,
> 
> C.
> 
> 
> 
> 
> 
> Seagate Internal
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-28  6:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-25 17:07 Need to merge - QEMU patch for booting eMMC image for AST2600 machine Shitalkumar Gandhi via
2021-09-26  7:59 ` Philippe Mathieu-Daudé
2021-09-27 14:15   ` Cédric Le Goater
2021-09-27 14:45     ` Shitalkumar Gandhi
2021-09-27 18:55       ` Shitalkumar Gandhi
2021-09-28  6:06         ` Cédric Le Goater

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.