1 ;============================================================================
2 ;## SPDX-License-Identifier: GPL-2.0-only
3 ;============================================================================
8 ; Debug coreboot 405 front-end
9 ;============================================================================
11 ;============================================================================
12 ; CMM script variables
13 ;============================================================================
17 GLOBAL &BBEntryAddr // Bootblock Entry
18 GLOBAL &BBExitAddr // Bootblock Exit to Xbl-Sec
19 GLOBAL &VEREntryAddr // Verstage Entry
20 GLOBAL &ROMEntryAddr // Romstage Entry
21 GLOBAL &QCLEntryAddr // QCLstage Entry
22 GLOBAL &RAMEntryAddr // Ramstage Entry
23 GLOBAL &BL31EntryAddr // BL31 Entry
24 GLOBAL &DCEntryAddr // Depthcharge Entry
25 GLOBAL &KernelEntryAddr // Kernel Entry
27 GLOBAL &PreRamConsoleAddr
28 GLOBAL &RamConsoleAddr
29 GLOBAL &PreRamCbfsCache
35 GLOBAL &PostRamCbfsCache
41 ;============================================================================
43 ;---------------------------------------------------
45 ;---------------------------------------------------
48 // Later these can be parameterized
49 &TargetPkg="Qcs405Pkg"
51 // These settings come from .../src/soc/qualcomm/qcs405/include/soc/memlayout.ld
52 &BBEntryAddr=0x8c2f000
53 &VEREntryAddr=0x8C00000
54 &ROMEntryAddr=0x8C00000
55 &QCLEntryAddr=0x1485AC00
56 &RAMEntryAddr=0x9F860000
57 &BL31EntryAddr=0x06820000
58 &DCEntryAddr=0xf1104800
59 &KernelEntryAddr=0x90080000
61 &PreRamConsoleAddr=0x8C4F400
66 &PreRamCbfsCache=0x8C57400
68 &PostRamCbfsCache=0x9F800000
69 // End of memlayout.ld settings
71 // Common commands irrespective of &Mode
76 // position at top of coreboot tree
77 // find depth count for source loading
89 ;---------------------------------------------------
91 ;---------------------------------------------------
94 area.create CB_Logs 1000. 8192.
100 if FILE.EXIST("C:\TEMP\WIN.CMM")
105 PRINT %String "Source Path: &srcpath"
107 symbol.sourcepath.setbasedir &srcpath\src
109 PRINT "pbl32_to_bootblock64 jump"
110 do pbl32_to_bootblock64_jump.cmm
115 // Make parsing simple, upper-case parameters
116 &Imagename=STRING.UPR("&Imagename")
117 IF (STR.CP("&ImageName","DEBUG,*"))
125 &Imagename=STR.CUT("&ImageName",6)
129 &ImageName=STRING.UPR("&ImageName")
132 &ImageName="RAM,BB" //for RAM load Bootblock only and jump till DC
138 if (STR.CP("&debug","DEBUG"))
141 &ImageName=STRING.UPR("&ImageName")
144 &ImageName="RAM,ALL" //for RAM loading all the images
150 DO debug_cb_common.cmm &TargetPkg &srcpath &xblsrcpath &ImageName