How to display MC log buffer in U-Boot, when MC console is not available

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to display MC log buffer in U-Boot, when MC console is not available

How to display MC log buffer in U-Boot, when MC console is not available

 

Note: MCFBA{L/H} that is used to dump the MC log buffer is valid only after the following command is executed:

fsl_mc start mc  ${mc_addr} ${dpc_addr}

Run the above command first, then MCFBA contents will be valid.

To display the MC log buffer in U-Boot for debug purpose, when MC console is not available:

  1. Determine the MC firmware base. At the U-Boot prompt, perform md at 0x8340020 (this is MCFBA{L/H})
    => md 0x8340020 10
    08340020: e0000006 00000027 00060000 00000000    ....'...........
    08340030: 00000000 00000000 00000000 00000000    ................
    08340040: 00000000 00000000 00000000 00000000    ................
    08340050: 00000000 00000000 00000000 00000000    ................
    

    The value at 08340024 is the MCFBAH address. In this case, it is 00000027The value at 08340020 is the MCFBAL address. In this case, it is e0000000. So you can build the MCFBA base address as:  0x27e0000000.

  2. Run the following command to start the MC if it is not booted already.
    run mcinitcmd
  3. Dump the log buffer structure at offset 0x01000000 into the MC firmware base 0x27e1000000 (as per the example).
    md 27e1000000
    27e1000000: 4d430100 00000000 01400000 00300000    ..CM......@...0.
    27e1000010: 000000b1 00000000 00000000 00000000    ................
    27e1000020: 00000000 00000000 00000000 00000000    ................
    27e1000030: 00000000 00000000 00000000 00000000    ................
    
    4d430100 = magic number, 400000 = log buffer offset, 00300000 = log buffer length
  4. Dump the content of the log buffer.
    md 27e1400000

     

  5. The output size can be increased by specifying the number of objects. 
    md 27e1400000 <num>
    
    For example:
    md 27e1400000 20
    In case that the log buffer has more information, you can extend the output of md by replacing 20 with a greater value.

 

 

 

 

 

No ratings
Version history
Last update:
‎02-18-2021 03:55 AM
Updated by: