qemu-devel
[Top][All Lists]
Advanced

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

Re: HSS Issue with GCC 10, Qemu Setup for microchip-icicle-kit


From: Rahul Pathak
Subject: Re: HSS Issue with GCC 10, Qemu Setup for microchip-icicle-kit
Date: Tue, 1 Jun 2021 08:41:22 +0530

Hi BIn,Alistair,

I was passing the hss.elf file and it was strange that gdb after connecting was not letting the target to continue from gdb.
what worked was to not pass anything and then connect the to target then load the symbol file as hss.elf.
I followed the steps from the "Attaching the GDB" doc and was able to debug.


For the qemu command line from the doc, I made the "wait=off" then qemu was not waiting for another serial connection
and launched the hss.


The problem remains is that I still do not have the u-boot and linux booting. The unix\#serial1.sock remains offline always.
These are the HSS logs -

[0.115001] HSS_E51_Banner(): PolarFire(R) SoC Hart Software Services (HSS) - version 0.99.15                                                                                  
(c) Copyright 2017-2020 Microchip Corporation.                                                                                                                                
                                                                                                                                                                             
[0.116234] HSS_E51_Banner(): incorporating OpenSBI - version 0.6                                                                                                              
(c) Copyright 2019-2020 Western Digital Corporation.                                                                                                                          
                                                                                                                                                                             
[0.117071] HSS_PrintBuildId(): Build ID: 811342a39f80176f9e2086bf963a83224b3d3a2e                                                                                            
[0.117817] HSS_PrintToolVersions(): Built with the following tools:                                                                                                          
 - riscv64-unknown-linux-gnu-gcc (GCC) 10.2.0                                                                                                                                
 - GNU ld (GNU Binutils) 2.36.1                                                                                                                                              
                                                                                                                                                                             
[0.118760] HSS_MemTestDDRFast(): DDR size is 1 GiB                                                                                                                            
[0.130270] HSS_MMCInit(): Attempting to select SDCARD ... Passed                                                                                                              
Press a key to enter CLI, ESC to skip                                                                                                                                        
Timeout in 5 seconds  

.....                                                                                                                                                                        
[5.138747] HSS_TinyCLI_Parser(): CLI check timeout                                                                                                                            
[5.139371] IPI_QueuesInit(): Initializing IPI Queues (9000 bytes @ 8000e40)...
[5.140435] HSS_PMP_Init(): Initializing PMPs                                                                                                                                  
[5.141093] HSS_BootInit(): Initializing Boot Image..                                                                                                                          
[5.141787] getBootImageFromMMC_(): Preparing to copy from MMC to DDR ...                                                                                                      
[5.142671] getBootImageFromMMC_(): Attempting to read image header (1552 bytes) ...                                                                                          
[5.144118] GPT_ValidateHeader(): Validated GPT Header ...                                                                                                                    
[5.153768] GPT_ValidatePartitionEntries(): Validated GPT Partition Entries ...                                                                                                
[5.155210] copyBootImageToDDR_(): Copying 436008 bytes to 0xA0000000                                                                                                          
[5.407848] copyBootImageToDDR_(): Calculated CRC32 of image in DDR is 795fbbea                                                                                                
[5.412058] HSS_BootInit():  boot image passed CRC                                                                                                                            
[5.412407] HSS_BootInit(): Boot image set name: "PolarFire-SoC-HSS::U-Boot"                                                                                                  
[5.412951] HSS_BootInit(): Boot Image registered...                                                                                                                          
[5.413376] HSS_Boot_RestartCore(): called for all harts                                                                                                                      
[5.414295] RunStateMachine(): boot_service(u54_1)::Init -> boot_service(u54_1)::SetupPMP
[5.414812] RunStateMachine(): boot_service(u54_2)::Init -> boot_service(u54_2)::SetupPMP                                                                                      
[5.415207] RunStateMachine(): boot_service(u54_3)::Init -> boot_service(u54_3)::SetupPMP
[5.415631] RunStateMachine(): boot_service(u54_4)::Init -> boot_service(u54_4)::SetupPMP                                                                                      
[5.416107] RunStateMachine(): usbdmsc_service::init -> usbdmsc_service::idle                                                                                                  
[5.417164] RunStateMachine(): boot_service(u54_1)::SetupPMP -> boot_service(u54_1)::SetupPMPComplete                                                                          
[5.417887] RunStateMachine(): boot_service(u54_2)::SetupPMP -> boot_service(u54_2)::SetupPMPComplete                                                                          
[5.418552] RunStateMachine(): boot_service(u54_3)::SetupPMP -> boot_service(u54_3)::SetupPMPComplete                                                                          
[5.419890] RunStateMachine(): boot_service(u54_4)::SetupPMP -> boot_service(u54_4)::SetupPMPComplete
[23.955147] RunStateMachine(): boot_service(u54_1)::SetupPMPComplete -> boot_service(u54_1)::ZeroInit
[23.955754] RunStateMachine(): boot_service(u54_2)::SetupPMPComplete -> boot_service(u54_2)::ZeroInit
[23.956259] RunStateMachine(): boot_service(u54_3)::SetupPMPComplete -> boot_service(u54_3)::ZeroInit
[23.956757] RunStateMachine(): boot_service(u54_4)::SetupPMPComplete -> boot_service(u54_4)::ZeroInit
[23.957371] RunStateMachine(): boot_service(u54_1)::ZeroInit -> boot_service(u54_1)::Download
[23.957876] RunStateMachine(): boot_service(u54_2)::ZeroInit -> boot_service(u54_2)::Download
[23.958386] RunStateMachine(): boot_service(u54_3)::ZeroInit -> boot_service(u54_3)::Download
[23.958856] RunStateMachine(): boot_service(u54_4)::ZeroInit -> boot_service(u54_4)::Download
[23.960300] RunStateMachine(): boot_service(u54_2)::Download -> boot_service(u54_2)::Idle
[23.960723] RunStateMachine(): boot_service(u54_3)::Download -> boot_service(u54_3)::Idle
[23.961129] RunStateMachine(): boot_service(u54_4)::Download -> boot_service(u54_4)::Idle
[23.983168] RunStateMachine(): boot_service(u54_1)::Download -> boot_service(u54_1)::Wait
[23.983661] boot_download_chunks_onExit(): boot_service(u54_1)::u54_2:sbi_init 80200000
[23.984374] boot_download_chunks_onExit(): boot_service(u54_1)::u54_3:sbi_init 80200000
[23.985418] boot_download_chunks_onExit(): boot_service(u54_1)::u54_4:sbi_init 80200000
[23.986783] boot_download_chunks_onExit(): boot_service(u54_1)::u54_1:sbi_init 80200000
[23.989086] boot_wait_onEntry(): boot_service(u54_1)::Checking for IPI ACKs: - -
[23.992106] boot_wait_handler(): boot_service(u54_1)::Checking for IPI ACKs: ACK/IDLE ACK
[23.994062] RunStateMachine(): boot_service(u54_1)::Wait -> boot_service(u54_1)::Idle



One thing I overlooked in the document is that we are preparing the *.wic file after downloading 
but passing the *.img in the qemu command. How to convert the wic to img. I couldn't see much about 
this on the internet ?
Since U-boot currently does not boot, it seems passing the wic file directly is not right. Now sure here.

 qemu-system-riscv64 -M microchip-icicle-kit -smp 5 \
    -bios path/to/hss.bin -sd path/to/sdcard.img \
    -nic user,model=cadence_gem \
    -nic tap,ifname=tap,model=cadence_gem,script=no \
    -display none -serial stdio \
    -chardev socket,id=serial1,path=serial1.sock,server=on,wait=on \
    -serial chardev:serial1

Are there other ways in qemu icicle machine supported now to pass the u-boot and kernel?

Thanks
Rahul


On Tue, Jun 1, 2021 at 8:06 AM Bin Meng <bmeng.cn@gmail.com> wrote:
Hi Rahul,

On Mon, May 31, 2021 at 10:43 PM Rahul Pathak <rpathakmailbox@gmail.com> wrote:
>
> On top of that, it seems I cannot connect with the target using gdb
>
> (gdb) target remote :1234
> Remote debugging using :1234
> bfd requires flen 8, but target has flen 0
>
> Though the ABI is lp64 and ISA is rv64imac when the hss was built.
>

Did you feed gdb the image you wanted to debug before "target remote:"?

The PolarFire SoC has 1+4 HARTs and you should follow the instructions
@ https://wiki.qemu.org/Documentation/Platforms/RISCV#Attaching_GDB to
do the debug.

Regards,
Bin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]