qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@redhat.com>
To: Joel Stanley <joel@jms.id.au>, Jamin Lin <jamin_lin@aspeedtech.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"berrange@redhat.com" <berrange@redhat.com>,
	"kris.conklin@seagate.com" <kris.conklin@seagate.com>,
	"jonathan.henze@seagate.com" <jonathan.henze@seagate.com>,
	"evan.burgess@seagate.com" <evan.burgess@seagate.com>,
	"peter.maydell@linaro.org" <peter.maydell@linaro.org>,
	Alejandro Zeise <alejandro.zeise@seagate.com>,
	Steven Lee <steven_lee@aspeedtech.com>,
	Troy Lee <leetroy@gmail.com>,
	Andrew Jeffery <andrew@codeconstruct.com.au>
Subject: Re: [PATCH v6] hw/misc/aspeed_hace: Fix SG Accumulative hashing
Date: Tue, 22 Oct 2024 18:04:49 +0200	[thread overview]
Message-ID: <f7a8c0ed-27d2-4a0b-af2a-30f427812896@redhat.com> (raw)
In-Reply-To: <CACPK8XfB=tfSBnPVUjJgAR23W3GXS_hxMiamPJT=7qL5Pgw8zQ@mail.gmail.com>

On 10/22/24 13:54, Joel Stanley wrote:
> On Wed, 16 Oct 2024 at 01:23, Jamin Lin <jamin_lin@aspeedtech.com> wrote:
> 
>> 3. Test HACE model with u-boot hash command
>> a. load test file to address 83000000 via tftp
>> ast# tftp 83000000 jamin_lin/32MB
>> b. get sha256
>> ast# hash sha256 83000000 2000000
>> sha256 for 83000000 ... 84ffffff ==> 1ddcccdba742d762e2b8da0bceaf4778727c5eba54a24d7ae0c573c65414f736
>> c. get sha384
>> ast# hash sha384 83000000 2000000
>> sha384 for 83000000 ... 84ffffff ==> 825d9b24bb797695545b3cbd2f373b9738627c7a1878e620415570a57c7faed77916d47084c954254f101fc0f10c0591
>> d. get sha512
>> ast# hash sha512 83000000 2000000
>> sha512 for 83000000 ... 84ffffff ==> b5ae725b2dc1e521f48eae37dd82c3d5fc94f7acb5fff3dabf1caa4bb4b5bcfb498e7cc1fbaa97dda2664bff99f9f8e778f823e95afaf76fbf0985181522e478
> 
> I attempted this same test and noticed that the 'hash' command was not
> using the hardware. You can see this by putting some printf or
> breakpoint in eg hw/misc/aspeed_hace.c do_hash_operation. There's some
> missing work on the u-boot side to move the "hash" command over to the
> hash uclass, so it can be used to test this code path (or add support
> for the old API to the hace driver).
> 
> Separately, I attempted to test with u-boot by enabling hash
> verification of the FIT image, and it fails to calculate the correct
> SHA.
> 
> I think to have any confidence that this model works, we need to add
> some testing to qemu. I did this for the initial version of the model
> in tests/qtest/aspeed_hace-test.c.

There are "accumulative mode" tests in QEMU, which were added by commit
e0c371a0d23b ("tests/qtest: Add test for Aspeed HACE accumulative mode")
They pass today with this patch. Are you suggesting we should add more?

Thanks,

C.


  
> The upstream u-boot situation is a mess, and cannot be used to
> exercise the qemu model at this stage.
> 
> Cheers,
> 
> Joel
> 



  reply	other threads:[~2024-10-22 16:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11  5:38 [PATCH v6] hw/misc/aspeed_hace: Fix SG Accumulative hashing Cédric Le Goater
2024-10-12  6:20 ` Cédric Le Goater
2024-10-15  0:52   ` Andrew Jeffery
2024-10-15  8:49     ` Cédric Le Goater
2024-10-15 14:53   ` Jamin Lin
2024-10-22 11:54     ` Joel Stanley
2024-10-22 16:04       ` Cédric Le Goater [this message]
2024-10-23  6:52         ` Joel Stanley
2024-10-23  7:01           ` Cédric Le Goater
2024-10-23  9:20             ` Jamin Lin
2024-10-24  4:32               ` Joel Stanley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7a8c0ed-27d2-4a0b-af2a-30f427812896@redhat.com \
    --to=clg@redhat.com \
    --cc=alejandro.zeise@seagate.com \
    --cc=andrew@codeconstruct.com.au \
    --cc=berrange@redhat.com \
    --cc=evan.burgess@seagate.com \
    --cc=jamin_lin@aspeedtech.com \
    --cc=joel@jms.id.au \
    --cc=jonathan.henze@seagate.com \
    --cc=kris.conklin@seagate.com \
    --cc=leetroy@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=steven_lee@aspeedtech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).