2024.04.13
实验环境:

单步跟踪完每一条汇编指令,感受是完全不一样的,尤其是用dt指令观察到内存中鲜活的结构体,简直太棒了:

比如,下图,编译器真的是老老实实写的0xFFFF吗?

答案为“不是”,请看以下NDB中的操作序列,可以最细致地校验自己的理解,大家也可以据此自己做实验交叉验证:

u 0`206944
ArmPlatformPrePiUniCore!PrePiMain+c4:
206944 aa1303e0 mov    x0, x19
206948 12bffee1 mov    w1, #0x8ffff
20694c b8038c01 str    w1, [x0, #0x38]!
206950 d2800021 mov    x1, #1
206954 f2a00701 movk    x1, #0x38, lsl #16
206958 b900041f str    wzr, [x0, #4]
20695c f9000261 str    x1, [x19]
206960 d2800121 mov    x1, #9
g
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
Break instruction exception - code 80000003 (first chance)
bp[9] was removed, count 1
bp[6] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+c4:
206944 aa1303e0 mov    x0, x19
r x19
x19=0000000038000000
k
Read system version block failed 1
Read system version block failed 1
abort occurred - dscr = 0x03047247
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
abort occurred - dscr = 0x03047247
abort occurred - dscr = 0x03047247
abort occurred - dscr = 0x03047247
abort occurred - dscr = 0x03047247
abort occurred - dscr = 0x03047247
abort occurred - dscr = 0x03047247
abort occurred - dscr = 0x03047247
Child-SP          RetAddr           Call Site
00000000`3fffffc0 00000000`00208638 ArmPlatformPrePiUniCore!PrePiMain+0xc4
00000000`3ffffff8 00000000`002087a8 ArmPlatformPrePiUniCore!CEntryPoint+0xdc
00000000`00000008 00000008`00000008 ArmPlatformPrePiUniCore!_entry+0xc0
r
 x0=000000000007a107  x1=0000000000000007  x2=000000003fffff40  x3=000000003fffff40
 x4=00000000feb5007c  x5=0000000000000007  x6=0000000000000000  x7=00000000002094de
 x8=0000000000000000  x9=0000000000000000 x10=0000000000000002 x11=0000000000000000
x12=0000000000000002 x13=0000000000000002 x14=0000000000000001 x15=00000000000000ff
x16=0000000000000000 x17=0000000000000000 x18=0000000000000000 x19=0000000038000000
x20=0000000000209130 x21=0000000038000000 x22=000000003ffe9000 x23=000000003ffe9000
x24=0000000081000000 x25=0000000000010000 x26=0000000000001000 x27=0000000000208780
x28=0000000000000000  fp=000000003fffff60  lr=0000000000206944  sp=000000003ffffd10
 pc=0000000000206944 pstate=00000000600003c9 - Z C - - - - - - D A I F EL1
ArmPlatformPrePiUniCore!PrePiMain+c4:
206944 aa1303e0 mov    x0, x19
u .-10
ArmPlatformPrePiUniCore!PrePiMain+b4:
206934 97fff807 bl    #0x204950
206938 aa0003e1 mov    x1, x0
20693c 910783e0 add    x0, sp, #0x1e0
206940 97fff14d bl    #0x202e74
206944 aa1303e0 mov    x0, x19
206948 12bffee1 mov    w1, #0x8ffff
20694c b8038c01 str    w1, [x0, #0x38]!
206950 d2800021 mov    x1, #1
ln 202e74
(00000000`00202e74)   ArmPlatformPrePiUniCore!SerialPortWrite.isra.0   
Exact matches:
dt -b EFI_HOB_HANDOFF_INFO_TABLE
   +0x000 Header           : 
      +0x000 HobType          : Uint2B
      +0x002 HobLength        : Uint2B
      +0x004 Reserved         : Uint4B
   +0x008 Version          : Uint4B
   +0x00c BootMode         : Uint4B
   +0x010 EfiMemoryTop     : Uint8B
   +0x018 EfiMemoryBottom  : Uint8B
   +0x020 EfiFreeMemoryTop : Uint8B
   +0x028 EfiFreeMemoryBottom : Uint8B
   +0x030 EfiEndOfHobList  : Uint8B
dt -b EFI_HOB_HANDOFF_INFO_TABLE x19
Cannot find specified field members.
u
ArmPlatformPrePiUniCore!PrePiMain+d4:
206954 f2a00701 movk    x1, #0x38, lsl #16
206958 b900041f str    wzr, [x0, #4]
20695c f9000261 str    x1, [x19]
206960 d2800121 mov    x1, #9
206964 f9000661 str    x1, [x19, #8]
206968 d2a10001 mov    x1, #0x8000000
20696c 8b010261 add    x1, x19, x1
206970 f9000a61 str    x1, [x19, #0x10]
u .
ArmPlatformPrePiUniCore!PrePiMain+c4:
206944 aa1303e0 mov    x0, x19
206948 12bffee1 mov    w1, #0x8ffff
20694c b8038c01 str    w1, [x0, #0x38]!
206950 d2800021 mov    x1, #1
206954 f2a00701 movk    x1, #0x38, lsl #16
206958 b900041f str    wzr, [x0, #4]
20695c f9000261 str    x1, [x19]
206960 d2800121 mov    x1, #9
dq 0`38000000
00000000`38000000  00000000`00000000 00000000`00000000
00000000`38000010  00000000`00000000 00000000`00000000
00000000`38000020  00000000`00000000 00000000`00000000
00000000`38000030  00200000`00000000 00000000`00000020
00000000`38000040  00000800`00080001 00000000`00008000
00000000`38000050  00000000`00000000 00000000`10000000
00000000`38000060  00000000`00000000 00000000`00000000
00000000`38000070  00000000`00000000 00000000`00000000
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[12] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+c8:
206948 12bffee1 mov    w1, #0x8ffff
r x0
x0=0000000038000000
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[18] was removed, count 1
bp[15] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+cc:
20694c b8038c01 str    w1, [x0, #0x38]!
dt -b EFI_HOB_GENERIC_HEADER
Read system version block failed 1
Read system version block failed 1
abort occurred - dscr = 0x0304725b
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
   +0x000 HobType          : Uint2B
   +0x002 HobLength        : Uint2B
   +0x004 Reserved         : Uint4B
r w1
       ^ Bad register error in 'r w1'
r x1
x1=000000000008ffff
dq x0+38
00000000`38000038  00000000`00000020 00000800`00080001
00000000`38000048  00000000`00008000 00000000`00000000
00000000`38000058  00000000`10000000 00000000`00000000
00000000`38000068  00000000`00000000 00000000`00000000
00000000`38000078  00000000`00000000 00000000`00000000
00000000`38000088  00000000`00000000 00000000`00000000
00000000`38000098  00100000`00200000 00000000`00100000
00000000`380000a8  00000000`00000000 00000000`00400000
dq x0+38 l1
00000000`38000038  00000000`00000020
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[24] was removed, count 1
bp[21] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+d0:
206950 d2800021 mov    x1, #1
dq x0+38 l1
Read system version block failed 1
Read system version block failed 1
abort occurred - dscr = 0x0304725b
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
00000000`38000070  00000000`00000000
r
 x0=0000000038000038  x1=000000000008ffff  x2=000000003fffff40  x3=000000003fffff40
 x4=00000000feb5007c  x5=0000000000000007  x6=0000000000000000  x7=00000000002094de
 x8=0000000000000000  x9=0000000000000000 x10=0000000000000002 x11=0000000000000000
x12=0000000000000002 x13=0000000000000002 x14=0000000000000001 x15=00000000000000ff
x16=0000000000000000 x17=0000000000000000 x18=0000000000000000 x19=0000000038000000
x20=0000000000209130 x21=0000000038000000 x22=000000003ffe9000 x23=000000003ffe9000
x24=0000000081000000 x25=0000000000010000 x26=0000000000001000 x27=0000000000208780
x28=0000000000000000  fp=000000003fffff60  lr=0000000000206944  sp=000000003ffffd10
 pc=0000000000206950 pstate=00000000600003c9 - Z C - - - - - - D A I F EL1
ArmPlatformPrePiUniCore!PrePiMain+d0:
206950 d2800021 mov    x1, #1
u .-4
ArmPlatformPrePiUniCore!PrePiMain+cc:
20694c b8038c01 str    w1, [x0, #0x38]!
206950 d2800021 mov    x1, #1
206954 f2a00701 movk    x1, #0x38, lsl #16
206958 b900041f str    wzr, [x0, #4]
20695c f9000261 str    x1, [x19]
206960 d2800121 mov    x1, #9
206964 f9000661 str    x1, [x19, #8]
206968 d2a10001 mov    x1, #0x8000000
dq x0 l1
00000000`38000038  00000000`0008ffff
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[30] was removed, count 1
bp[27] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+d4:
206954 f2a00701 movk    x1, #0x38, lsl #16
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[36] was removed, count 1
bp[33] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+d8:
206958 b900041f str    wzr, [x0, #4]
r x1
x1=0000000000380001
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[42] was removed, count 1
bp[39] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+dc:
20695c f9000261 str    x1, [x19]
r x0
x0=0000000038000038
dq x0 l1
Read system version block failed 1
Read system version block failed 1
abort occurred - dscr = 0x0304725b
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
00000000`38000038  00000000`0008ffff
r x1
x1=0000000000380001
r x19
x19=0000000038000000
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[48] was removed, count 1
bp[45] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+e0:
206960 d2800121 mov    x1, #9
dqs x19 l1
Read system version block failed 1
Read system version block failed 1
abort occurred - dscr = 0x0304725b
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
00000000`38000000  00000000`00380001
dt -b EFI_HOB_HANDOFF_INFO_TABLE x19
Cannot find specified field members.
dt -b EFI_HOB_HANDOFF_INFO_TABLE 0`38000000
   +0x000 Header           : 
      +0x000 HobType          : 1
      +0x002 HobLength        : 0x38
      +0x004 Reserved         : 0
   +0x008 Version          : 0
   +0x00c BootMode         : 0
   +0x010 EfiMemoryTop     : 0
   +0x018 EfiMemoryBottom  : 0
   +0x020 EfiFreeMemoryTop : 0
   +0x028 EfiFreeMemoryBottom : 0
   +0x030 EfiEndOfHobList  : 0x200000`00000000
u .
ArmPlatformPrePiUniCore!PrePiMain+e0:
206960 d2800121 mov    x1, #9
206964 f9000661 str    x1, [x19, #8]
206968 d2a10001 mov    x1, #0x8000000
20696c 8b010261 add    x1, x19, x1
206970 f9000a61 str    x1, [x19, #0x10]
206974 91010261 add    x1, x19, #0x40
206978 a901de73 stp    x19, x23, [x19, #0x18]
20697c f9001661 str    x1, [x19, #0x28]
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[54] was removed, count 1
bp[51] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+e4:
206964 f9000661 str    x1, [x19, #8]
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[60] was removed, count 1
bp[57] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+e8:
206968 d2a10001 mov    x1, #0x8000000
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[66] was removed, count 1
bp[63] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+ec:
20696c 8b010261 add    x1, x19, x1
r
 x0=0000000038000038  x1=0000000008000000  x2=000000003fffff40  x3=000000003fffff40
 x4=00000000feb5007c  x5=0000000000000007  x6=0000000000000000  x7=00000000002094de
 x8=0000000000000000  x9=0000000000000000 x10=0000000000000002 x11=0000000000000000
x12=0000000000000002 x13=0000000000000002 x14=0000000000000001 x15=00000000000000ff
x16=0000000000000000 x17=0000000000000000 x18=0000000000000000 x19=0000000038000000
x20=0000000000209130 x21=0000000038000000 x22=000000003ffe9000 x23=000000003ffe9000
x24=0000000081000000 x25=0000000000010000 x26=0000000000001000 x27=0000000000208780
x28=0000000000000000  fp=000000003fffff60  lr=0000000000206944  sp=000000003ffffd10
 pc=000000000020696c pstate=00000000600003c9 - Z C - - - - - - D A I F EL1
ArmPlatformPrePiUniCore!PrePiMain+ec:
20696c 8b010261 add    x1, x19, x1
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[72] was removed, count 1
bp[69] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+f0:
206970 f9000a61 str    x1, [x19, #0x10]
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[78] was removed, count 1
bp[75] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+f4:
206974 91010261 add    x1, x19, #0x40
dt -b EFI_HOB_HANDOFF_INFO_TABLE 0`38000000
Read system version block failed 1
Read system version block failed 1
abort occurred - dscr = 0x0304725b
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
   +0x000 Header           : 
      +0x000 HobType          : 1
      +0x002 HobLength        : 0x38
      +0x004 Reserved         : 0
   +0x008 Version          : 9
   +0x00c BootMode         : 0
   +0x010 EfiMemoryTop     : 0x40000000
   +0x018 EfiMemoryBottom  : 0
   +0x020 EfiFreeMemoryTop : 0
   +0x028 EfiFreeMemoryBottom : 0
   +0x030 EfiEndOfHobList  : 0x200000`00000000
u .
ArmPlatformPrePiUniCore!PrePiMain+f4:
206974 91010261 add    x1, x19, #0x40
206978 a901de73 stp    x19, x23, [x19, #0x18]
20697c f9001661 str    x1, [x19, #0x28]
206980 f9001a60 str    x0, [x19, #0x30]
206984 aa1303e0 mov    x0, x19
206988 940008c3 bl    #0x208c94
20698c 97ffeab9 bl    #0x201470
206990 72001c13 ands    w19, w0, #0xff
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[84] was removed, count 1
bp[81] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+f8:
206978 a901de73 stp    x19, x23, [x19, #0x18]
r x1
x1=0000000038000040
dt -b EFI_HOB_HANDOFF_INFO_TABLE 0`38000000
Read system version block failed 1
Read system version block failed 1
abort occurred - dscr = 0x0304725b
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
   +0x000 Header           : 
      +0x000 HobType          : 1
      +0x002 HobLength        : 0x38
      +0x004 Reserved         : 0
   +0x008 Version          : 9
   +0x00c BootMode         : 0
   +0x010 EfiMemoryTop     : 0x40000000
   +0x018 EfiMemoryBottom  : 0
   +0x020 EfiFreeMemoryTop : 0
   +0x028 EfiFreeMemoryBottom : 0
   +0x030 EfiEndOfHobList  : 0x200000`00000000
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[90] was removed, count 1
bp[87] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+fc:
20697c f9001661 str    x1, [x19, #0x28]
dt -b EFI_HOB_HANDOFF_INFO_TABLE 0`38000000
Read system version block failed 1
Read system version block failed 1
abort occurred - dscr = 0x0304725b
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
   +0x000 Header           : 
      +0x000 HobType          : 1
      +0x002 HobLength        : 0x38
      +0x004 Reserved         : 0
   +0x008 Version          : 9
   +0x00c BootMode         : 0
   +0x010 EfiMemoryTop     : 0x40000000
   +0x018 EfiMemoryBottom  : 0x38000000
   +0x020 EfiFreeMemoryTop : 0x3ffe9000
   +0x028 EfiFreeMemoryBottom : 0
   +0x030 EfiEndOfHobList  : 0x200000`00000000
r x1
x1=0000000038000040
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[96] was removed, count 1
bp[93] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+100:
206980 f9001a60 str    x0, [x19, #0x30]
dt -b EFI_HOB_HANDOFF_INFO_TABLE 0`38000000
Read system version block failed 1
Read system version block failed 1
abort occurred - dscr = 0x0304725b
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
   +0x000 Header           : 
      +0x000 HobType          : 1
      +0x002 HobLength        : 0x38
      +0x004 Reserved         : 0
   +0x008 Version          : 9
   +0x00c BootMode         : 0
   +0x010 EfiMemoryTop     : 0x40000000
   +0x018 EfiMemoryBottom  : 0x38000000
   +0x020 EfiFreeMemoryTop : 0x3ffe9000
   +0x028 EfiFreeMemoryBottom : 0x38000040
   +0x030 EfiEndOfHobList  : 0x200000`00000000
u .
ArmPlatformPrePiUniCore!PrePiMain+100:
206980 f9001a60 str    x0, [x19, #0x30]
206984 aa1303e0 mov    x0, x19
206988 940008c3 bl    #0x208c94
20698c 97ffeab9 bl    #0x201470
206990 72001c13 ands    w19, w0, #0xff
206994 540000e0 b.eq    #0x2069b0
206998 1001b342 adr    x2, #0x20a000
20699c 10013321 adr    x1, #0x209000
r x0
x0=0000000038000038
t
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Adding BP for [cpu0]
no hardware breakpoint available
can't add breakpoint: resource not available
Opcode 0xd53e4020, DSCR.ERR=1, DSCR.EL=2
Failed to read ELR_EL3 register
Couldn't get register ELR_EL3.
Opcode 0xd53e5200, DSCR.ERR=1, DSCR.EL=2
Failed to read ESR_EL3 register
Couldn't get register ESR_EL3.
Opcode 0xd53e4000, DSCR.ERR=1, DSCR.EL=2
Failed to read SPSR_EL3 register
Couldn't get register SPSR_EL3.
bp[102] was removed, count 1
bp[99] was removed, count 1
ArmPlatformPrePiUniCore!PrePiMain+104:
206984 aa1303e0 mov    x0, x19
dt -b EFI_HOB_HANDOFF_INFO_TABLE 0`38000000
Read system version block failed 1
Read system version block failed 1
abort occurred - dscr = 0x0304725b
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
Opcode 0x38401401, DSCR.ERR=1, DSCR.EL=2
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
abort occurred - dscr = 0x0304725b
   +0x000 Header           : 
      +0x000 HobType          : 1
      +0x002 HobLength        : 0x38
      +0x004 Reserved         : 0
   +0x008 Version          : 9
   +0x00c BootMode         : 0
   +0x010 EfiMemoryTop     : 0x40000000
   +0x018 EfiMemoryBottom  : 0x38000000
   +0x020 EfiFreeMemoryTop : 0x3ffe9000
   +0x028 EfiFreeMemoryBottom : 0x38000040
   +0x030 EfiEndOfHobList  : 0x38000038
u .
ArmPlatformPrePiUniCore!PrePiMain+104:
206984 aa1303e0 mov    x0, x19
206988 940008c3 bl    #0x208c94
20698c 97ffeab9 bl    #0x201470
206990 72001c13 ands    w19, w0, #0xff
206994 540000e0 b.eq    #0x2069b0
206998 1001b342 adr    x2, #0x20a000
20699c 10013321 adr    x1, #0x209000
2069a0 9128c042 add    x2, x2, #0xa30
dt -b EFI_HOB_HANDOFF_INFO_TABLE 0`38000000
   +0x000 Header           : 
      +0x000 HobType          : 1
      +0x002 HobLength        : 0x38
      +0x004 Reserved         : 0
   +0x008 Version          : 9
   +0x00c BootMode         : 0
   +0x010 EfiMemoryTop     : 0x40000000
   +0x018 EfiMemoryBottom  : 0x38000000
   +0x020 EfiFreeMemoryTop : 0x3ffe9000
   +0x028 EfiFreeMemoryBottom : 0x38000040
   +0x030 EfiEndOfHobList  : 0x38000038
u 0`0206944 l10
ArmPlatformPrePiUniCore!PrePiMain+c4:
206944 aa1303e0 mov    x0, x19
206948 12bffee1 mov    w1, #0x8ffff
20694c b8038c01 str    w1, [x0, #0x38]!
206950 d2800021 mov    x1, #1
206954 f2a00701 movk    x1, #0x38, lsl #16
206958 b900041f str    wzr, [x0, #4]
20695c f9000261 str    x1, [x19]
206960 d2800121 mov    x1, #9
206964 f9000661 str    x1, [x19, #8]
206968 d2a10001 mov    x1, #0x8000000
20696c 8b010261 add    x1, x19, x1
206970 f9000a61 str    x1, [x19, #0x10]
206974 91010261 add    x1, x19, #0x40
206978 a901de73 stp    x19, x23, [x19, #0x18]
20697c f9001661 str    x1, [x19, #0x28]
206980 f9001a60 str    x0, [x19, #0x30]
作者:朱博渊  创建时间:2024-04-13 16:28
最后编辑:朱博渊  更新时间:2024-12-20 17:01