AnsweredAssumed Answered

Kernel Hangs at Boot With Secure Boot Enabled

Question asked by Branden Sherrell on Jun 21, 2016
Latest reply on Jun 30, 2016 by Yiping Wang


I feel as though I am flooding this community with questions regarding Secure Boot, so for that I apologize. At any rate, now that I finally have the device booting in a secure state I have run into yet another issue; the kernel is hanging after loading and fails to boot.

 

All validation succeeds for U-boot, PPA, bootscript, and the kernel and evidence of this can be seen in the log below. My bootscript simply does the following:

 

cp.b 0x60A00000 0x81000000 0x3500000

esbc_validate 0x63F40000

bootm 0x81000000

 

If I flash a RCW with SBEN=0 then I can successfully validate all of these components individually and boot the kernel without issue (successful boot log shown after failed boot log below). It seems that when I am booting with Secure Boot enabled that the kernel is hanging. To provide a bit more information, I the core never releases any other core (i.e. only core0 is running) and is stuck at a yield instruction:

 

 

Additionally, we are operating in a secure state at this point per the HPSR register.

 

Here is the U-boot log for reference. I noticed that PPA seems to issue "PPA validation started .. " quite a few times.

=> cpld reset altbank

 

U-Boot 2016.012.0+ga9b437f (Jun 03 2016 - 13:05:36 -0400)

 

 

SoC:  unknown (0x87920410)

Clock Configuration:

       CPU0(A53):1500 MHz  CPU1(A53):1500 MHz  CPU2(A53):1500 MHz

       CPU3(A53):1500 MHz

       Bus:      400  MHz  DDR:      1600 MT/s  FMAN:     500  MHz

Reset Configuration Word (RCW):

       00000000: 0810000f 0c000000 00000000 00000000

       00000010: 14550002 80004012 e0625000 61002000

       00000020: 00000000 00000000 00000000 00038800

       00000030: 00000000 00001100 00000096 00000001

I2C:   ready

Model: LS1043A RDB Board

Board: LS1043ARDB, boot from vBank 4

CPLD:  V1.4

PCBA:  V3.0

SERDES Reference Clocks:

SD1_CLK1 = 156.25MHZ, SD1_CLK2 = 100.00MHZ

DRAM:  Initializing DDR....

Detected UDIMM Fixed DDR on board

2 GiB (DDR4, 32-bit, CL=11, ECC off)

SEC0: RNG instantiated

PPA validation startedPPA validation Successful

PPA Firmware: Version 0.2

Firmware 'Microcode version 0.0.1 for LS1021a r1.0' for 1021 V1.0

QE: uploading microcode 'Microcode for LS1021a r1.0' version 0.0.1

PPA validation startedPPA validation Successful

Using SERDES1 Protocol: 5205 (0x1455)

Flash: 128 MiB

NAND:  512 MiB

MMC:   FSL_SDHC: 0

Using default environment

 

 

EEPROM: NXID v1

PCIe1: disabled

PCIe2: Root Complex no link, regs @ 0x3500000

PCIe3: Root Complex no link, regs @ 0x3600000

In:    serial

Out:   serial

Err:   serial

SCSI:  Error: SCSI Controller(s) 1B4B:9170 not found

Net:   Fman1: Uploading microcode version 106.4.17

FM1@DTSEC1, FM1@DTSEC2, FM1@DTSEC3 [PRIME], FM1@DTSEC4, FM1@DTSEC5, FM1@DTSEC6, FM1@TGEC1

Hit any key to stop autoboot:  0

esbc_validate command successful

## Executing script at 60060000

esbc_validate command successful

## Loading kernel from FIT Image at 81000000 ...

   Using 'config@1' configuration

   Trying 'kernel@1' kernel subimage

     Description:  ARM64 Linux kernel

     Type:         Kernel Image

     Compression:  gzip compressed

     Data Start:   0x810000d4

     Data Size:    5384092 Bytes = 5.1 MiB

     Architecture: AArch64

     OS:           Linux

     Load Address: 0x80080000

     Entry Point:  0x80080000

   Verifying Hash Integrity ... OK

## Loading ramdisk from FIT Image at 81000000 ...

   Using 'config@1' configuration

   Trying 'ramdisk@1' ramdisk subimage

     Description:  Ramdisk

     Type:         RAMDisk Image

     Compression:  uncompressed

     Data Start:   0x8152914c

     Data Size:    26922046 Bytes = 25.7 MiB

     Architecture: AArch64

     OS:           Linux

     Load Address: unavailable

     Entry Point:  unavailable

   Verifying Hash Integrity ... OK

## Loading fdt from FIT Image at 81000000 ...

   Using 'config@1' configuration

   Trying 'fdt@1' fdt subimage

     Description:  Flattened Device Tree blob

     Type:         Flat Device Tree

     Compression:  uncompressed

     Data Start:   0x81522924

     Data Size:    26534 Bytes = 25.9 KiB

     Architecture: AArch64

   Verifying Hash Integrity ... OK

   Loading fdt from 0x81522924 to 0x90000000

   Booting using the fdt blob at 0x90000000

   Uncompressing Kernel Image ... OK

   Loading Ramdisk to ce653000, end cffffc3e ... OK

   Loading Device Tree to 00000000ce639000, end 00000000ce6527a5 ... OK

PPA validation startedPPA validation Successful

PPA validation startedPPA validation Successful

 

 

Starting kernel ...

 

Successful booting of this exact same kernel image  (but with SBEN=0) is shown below. It does appear to be a little different.

=> cpld reset altbank

 

 

 

U-Boot 2016.012.0+ga9b437f (Jun 03 2016 - 13:05:36 -0400)

 

 

SoC:  unknown (0x87920410)

Clock Configuration:

       CPU0(A53):1500 MHz  CPU1(A53):1500 MHz  CPU2(A53):1500 MHz

       CPU3(A53):1500 MHz

       Bus:      400  MHz  DDR:      1600 MT/s  FMAN:     500  MHz

Reset Configuration Word (RCW):

       00000000: 0810000f 0c000000 00000000 00000000

       00000010: 14550002 80004012 e0425000 61002000

       00000020: 00000000 00000000 00000000 00038800

       00000030: 00000000 00001101 00000096 00000001

I2C:   ready

Model: LS1043A RDB Board

Board: LS1043ARDB, boot from vBank 4

CPLD:  V1.4

PCBA:  V3.0

SERDES Reference Clocks:

SD1_CLK1 = 156.25MHZ, SD1_CLK2 = 100.00MHZ

DRAM:  Initializing DDR....

Detected UDIMM Fixed DDR on board

2 GiB (DDR4, 32-bit, CL=11, ECC off)

SEC0: RNG instantiated

PPA Firmware: Version 0.2

Firmware 'Microcode version 0.0.1 for LS1021a r1.0' for 1021 V1.0

QE: uploading microcode 'Microcode for LS1021a r1.0' version 0.0.1

Using SERDES1 Protocol: 5205 (0x1455)

Flash: 128 MiB

NAND:  512 MiB

MMC:   FSL_SDHC: 0

Using default environment

 

 

EEPROM: NXID v1

PCIe1: disabled

PCIe2: Root Complex no link, regs @ 0x3500000

PCIe3: Root Complex no link, regs @ 0x3600000

In:    serial

Out:   serial

Err:   serial

SCSI:  Error: SCSI Controller(s) 1B4B:9170 not found

Net:   Fman1: Uploading microcode version 106.4.17

FM1@DTSEC1, FM1@DTSEC2, FM1@DTSEC3 [PRIME], FM1@DTSEC4, FM1@DTSEC5, FM1@DTSEC6, FM1@TGEC1

Hit any key to stop autoboot:  0

 

=> source 0x60060000

## Executing script at 60060000

esbc_validate command successful

## Loading kernel from FIT Image at 81000000 ...

   Using 'config@1' configuration

   Trying 'kernel@1' kernel subimage

     Description:  ARM64 Linux kernel

     Type:         Kernel Image

     Compression:  gzip compressed

     Data Start:   0x810000d4

     Data Size:    5384092 Bytes = 5.1 MiB

     Architecture: AArch64

     OS:           Linux

     Load Address: 0x80080000

     Entry Point:  0x80080000

   Verifying Hash Integrity ... OK

## Loading ramdisk from FIT Image at 81000000 ...

   Using 'config@1' configuration

   Trying 'ramdisk@1' ramdisk subimage

     Description:  Ramdisk

     Type:         RAMDisk Image

     Compression:  uncompressed

     Data Start:   0x8152914c

     Data Size:    26921871 Bytes = 25.7 MiB

     Architecture: AArch64

     OS:           Linux

     Load Address: unavailable

     Entry Point:  unavailable

   Verifying Hash Integrity ... OK

## Loading fdt from FIT Image at 81000000 ...

   Using 'config@1' configuration

   Trying 'fdt@1' fdt subimage

     Description:  Flattened Device Tree blob

     Type:         Flat Device Tree

     Compression:  uncompressed

     Data Start:   0x81522924

     Data Size:    26534 Bytes = 25.9 KiB

     Architecture: AArch64

   Verifying Hash Integrity ... OK

   Loading fdt from 0x81522924 to 0x90000000

   Booting using the fdt blob at 0x90000000

   Uncompressing Kernel Image ... OK

   Using Device Tree in place at 0000000090000000, end 00000000900197a5

 

 

Starting kernel ...

 

 

[    0.000000] Booting Linux on physical CPU 0x0

[    0.000000] Initializing cgroup subsys cpu

...

Outcomes