[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Use hex for bitstream_size as expected by u-boot


  • To: Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, <viryaos-discuss@xxxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Fri, 10 Nov 2023 11:01:47 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mKMb+/GHSauPkQE56Z/DBjl7z7+8qs1QJMXMrPO8YVc=; b=kyRLBQ57HKjtM+IG0g35Wf3ZvyqDep7/KWEyGzM+14YkAhE3ZxxpgNvXWmScKcDCVa7L+DgJzwvRvocpze5j/OGZoHZXtWRQnAF+CHqZmIHYJ1iIf9aWtOKQ5Yk5cMM0VqPbVEG2iy2BKLEClWuB8XqWOznZn+yGYmEwIbFxa8lPic1HuG5QNg1dnbVZlwdnvmvz08O+3fF8LsD0Uy5V1sIddZf+8tPck1Wd6UKlpHRRKvW58H9q72Whrq89igaGNTD5T/v9TA38qL94BOAhfRJQkArWJZ4hJNd0JM4sIazYC0p5FxfV7wgHe3t29Df/3LtDG+Ghevrm/oWMGoEZLw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SHYFeSL0SqNMzcF//bYsfLknWblXDto5DD9zeCiqY4OUF+GElSTUXot/dzh1JPBl6lkNMJPaUxMH5aQa3cPn2jUKgEFFlBtdELYATk0xa4vhv6Tyt7y3FdSJREz64tabtAsbvCeDRIsfiswd7f/Fm3lTXg7uH42fDTyuhhrC9PZYGvwpPW48/L4Xh/6vn7RqrLO1LztTvVyR4Rv/Db3CzdDdBHUhEcLo+G/zFxvJ0x+MZx3lnQR2FHAgwV1Q0X6y7QXgCmm5ZMnahNSPatCQNNNu/3ANzW96kLubp+4CqQwW0RCiQo7mm5+nI12S88aEp9+PJSzWURbkW21nfeE3WQ==
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <brian@xxxxxxxxx>
  • Delivery-date: Fri, 10 Nov 2023 10:02:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Julien,

On 10/11/2023 10:27, Julien Grall wrote:
> 
> 
> Hi Stefano,
> 
> On 10/11/2023 01:44, Stefano Stabellini wrote:
>> Reported-by: Brian Woods <brian@xxxxxxxxx>
>> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
>>
>> diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
>> index b284887..6e52da5 100755
>> --- a/scripts/uboot-script-gen
>> +++ b/scripts/uboot-script-gen
>> @@ -790,7 +790,7 @@ bitstream_load_and_config()
>>           check_file_type "$BITSTREAM" "BIT data"
>>           bitstream_addr=$memaddr
>>           load_file $BITSTREAM "fpga_bitstream"
>> -        bitstream_size=$filesize
>> +        bitstream_size=`printf "0x%X\n" $filesize`
> 
> Looking at [1], there is no indication that the size parameter for "fpga
> load" should be hexadecimal. At the contrary, all the example I have
> found seems to use $filesize.
U-boot expects size to be passed in hex format. You can see it here:
https://github.com/u-boot/u-boot/blob/master/cmd/fpga.c#L60C20-L60C27

Also, AFAICT $filesize var that gets updated after image load (e.g. tftpb) is 
in hex format.

~Michal



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.