blob: c0a9cca74ef40603139902303094041680f7383d [file] [log] [blame]
T Michael Turney5c49d182018-04-24 11:02:23 -07001;============================================================================
2;##
3;## This file is part of the coreboot project.
4;##
5;## Copyright (C) 2018, The Linux Foundation. All rights reserved.
6;##
7;## This program is free software; you can redistribute it and/or modify
8;## it under the terms of the GNU General Public License version 2 and
9;## only version 2 as published by the Free Software Foundation.
10;##
11;## This program is distributed in the hope that it will be useful,
12;## but WITHOUT ANY WARRANTY; without even the implied warranty of
13;## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;## GNU General Public License for more details.
15;##
16;============================================================================
17; Name:
18; debug_cb_845.cmm
19;
20; Description:
21; Debug coreboot 845 front-end
22;============================================================================
23
24;============================================================================
25; CMM script variables
26;============================================================================
27
28LOCAL &TargetPkg
29
30GLOBAL &BBEntryAddr // Bootblock Entry
31GLOBAL &BBExitAddr // Bootblock Exit to Xbl-Sec
32GLOBAL &VEREntryAddr // Verstage Entry
33GLOBAL &ROMEntryAddr // Romstage Entry
34GLOBAL &QCLEntryAddr // QCLstage Entry
35GLOBAL &RAMEntryAddr // Ramstage Entry
36GLOBAL &BL31EntryAddr // BL31 Entry
37GLOBAL &DCEntryAddr // Depthcharge Entry
38GLOBAL &KernelEntryAddr // Kernel Entry
39
40GLOBAL &PreRamConsoleAddr
41GLOBAL &RamConsoleAddr
42GLOBAL &PreRamCbfsCache
43GLOBAL &VBoot2Work
44GLOBAL &Stack
45GLOBAL &Ttb
46GLOBAL &Timestamp
47GLOBAL &CbmemTop
48GLOBAL &PostRamCbfsCache
49
50GLOBAL &CBTablePtr
51
52;============================================================================
53
54;---------------------------------------------------
55; Entry point
56;---------------------------------------------------
57ENTRY &ImageName
58
59 // Later these can be parameterized
60 &TargetPkg="Sdm845Pkg"
61
62 // These settings come from .../src/soc/qualcomm/sdm845/include/soc/memlayout.ld
63 &BBEntryAddr=0x14816000
64 &VEREntryAddr=0x14680000
65 &ROMEntryAddr=0x14680000
66 &QCLEntryAddr=0x1485AC00
67 &RAMEntryAddr=0x9F860000
68 &BL31EntryAddr=0x06820000
69 &DCEntryAddr=0xB0104800
70 &KernelEntryAddr=0x90080000
71
72 &PreRamConsoleAddr=0x14836400
73 &VBoot2Work=0x1482E000
74 &Stack=0x14832000
75 &Ttb=0x1481E000
76 &Timestamp=0x14836000
77 &PreRamCbfsCache=0x1483E400
78 &CbmemTop=0x280000000
79 &PostRamCbfsCache=0x9F800000
80 // End of memlayout.ld settings
81
82 // Common commands irrespective of &Mode
83 PATH
84 &CwDir=os.pwd()
85 PATH + &CwDir
86
87 // position at top of coreboot tree
88 // find depth count for source loading
89 cd ..\..\..\..
90 &srcpath=os.pwd()
91
92 b.sel PROGRAM onchip
93 sys.u
94
95 b.d /all
96
97 go &BBEntryAddr
98 wait !run()
99
100;---------------------------------------------------
101; Setup area and log
102;---------------------------------------------------
103 area.clear
104 area.reset
105 area.create CB_Logs 1000. 8192.
106 area.select CB_Logs
107
108 winclear
109 b.d /all
110
111 if FILE.EXIST("C:\TEMP\WIN.CMM")
112 do C:\TEMP\WIN.CMM
113
114 area.view CB_Logs
115
116 PRINT %String "Source Path: &srcpath"
117
118 symbol.sourcepath.setbasedir &srcpath\src
119
120 // Make parsing simple, upper-case parameters
121 &ImageName=STRING.UPR("&ImageName")
122 PRINT "&ImageName"
123
124 DO debug_cb_common.cmm &TargetPkg &srcpath &xblsrcpath &ImageName
125
126 enddo