mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
T32 scripts that allow debug of any coreboot stage on sdm845 Change-Id: Ia1bcbe687ca7bba10dc04cb6689640b13a8453f5 Signed-off-by: T Michael Turney <mturney@codeaurora.org> Reviewed-on: https://review.coreboot.org/25542 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
127 lines
3.4 KiB
Plaintext
127 lines
3.4 KiB
Plaintext
;============================================================================
|
|
;##
|
|
;## This file is part of the coreboot project.
|
|
;##
|
|
;## Copyright (C) 2018, The Linux Foundation. All rights reserved.
|
|
;##
|
|
;## This program is free software; you can redistribute it and/or modify
|
|
;## it under the terms of the GNU General Public License version 2 and
|
|
;## only version 2 as published by the Free Software Foundation.
|
|
;##
|
|
;## This program is distributed in the hope that it will be useful,
|
|
;## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
;## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
;## GNU General Public License for more details.
|
|
;##
|
|
;============================================================================
|
|
; Name:
|
|
; debug_cb_845.cmm
|
|
;
|
|
; Description:
|
|
; Debug coreboot 845 front-end
|
|
;============================================================================
|
|
|
|
;============================================================================
|
|
; CMM script variables
|
|
;============================================================================
|
|
|
|
LOCAL &TargetPkg
|
|
|
|
GLOBAL &BBEntryAddr // Bootblock Entry
|
|
GLOBAL &BBExitAddr // Bootblock Exit to Xbl-Sec
|
|
GLOBAL &VEREntryAddr // Verstage Entry
|
|
GLOBAL &ROMEntryAddr // Romstage Entry
|
|
GLOBAL &QCLEntryAddr // QCLstage Entry
|
|
GLOBAL &RAMEntryAddr // Ramstage Entry
|
|
GLOBAL &BL31EntryAddr // BL31 Entry
|
|
GLOBAL &DCEntryAddr // Depthcharge Entry
|
|
GLOBAL &KernelEntryAddr // Kernel Entry
|
|
|
|
GLOBAL &PreRamConsoleAddr
|
|
GLOBAL &RamConsoleAddr
|
|
GLOBAL &PreRamCbfsCache
|
|
GLOBAL &VBoot2Work
|
|
GLOBAL &Stack
|
|
GLOBAL &Ttb
|
|
GLOBAL &Timestamp
|
|
GLOBAL &CbmemTop
|
|
GLOBAL &PostRamCbfsCache
|
|
|
|
GLOBAL &CBTablePtr
|
|
|
|
;============================================================================
|
|
|
|
;---------------------------------------------------
|
|
; Entry point
|
|
;---------------------------------------------------
|
|
ENTRY &ImageName
|
|
|
|
// Later these can be parameterized
|
|
&TargetPkg="Sdm845Pkg"
|
|
|
|
// These settings come from .../src/soc/qualcomm/sdm845/include/soc/memlayout.ld
|
|
&BBEntryAddr=0x14816000
|
|
&VEREntryAddr=0x14680000
|
|
&ROMEntryAddr=0x14680000
|
|
&QCLEntryAddr=0x1485AC00
|
|
&RAMEntryAddr=0x9F860000
|
|
&BL31EntryAddr=0x06820000
|
|
&DCEntryAddr=0xB0104800
|
|
&KernelEntryAddr=0x90080000
|
|
|
|
&PreRamConsoleAddr=0x14836400
|
|
&VBoot2Work=0x1482E000
|
|
&Stack=0x14832000
|
|
&Ttb=0x1481E000
|
|
&Timestamp=0x14836000
|
|
&PreRamCbfsCache=0x1483E400
|
|
&CbmemTop=0x280000000
|
|
&PostRamCbfsCache=0x9F800000
|
|
// End of memlayout.ld settings
|
|
|
|
// Common commands irrespective of &Mode
|
|
PATH
|
|
&CwDir=os.pwd()
|
|
PATH + &CwDir
|
|
|
|
// position at top of coreboot tree
|
|
// find depth count for source loading
|
|
cd ..\..\..\..
|
|
&srcpath=os.pwd()
|
|
|
|
b.sel PROGRAM onchip
|
|
sys.u
|
|
|
|
b.d /all
|
|
|
|
go &BBEntryAddr
|
|
wait !run()
|
|
|
|
;---------------------------------------------------
|
|
; Setup area and log
|
|
;---------------------------------------------------
|
|
area.clear
|
|
area.reset
|
|
area.create CB_Logs 1000. 8192.
|
|
area.select CB_Logs
|
|
|
|
winclear
|
|
b.d /all
|
|
|
|
if FILE.EXIST("C:\TEMP\WIN.CMM")
|
|
do C:\TEMP\WIN.CMM
|
|
|
|
area.view CB_Logs
|
|
|
|
PRINT %String "Source Path: &srcpath"
|
|
|
|
symbol.sourcepath.setbasedir &srcpath\src
|
|
|
|
// Make parsing simple, upper-case parameters
|
|
&ImageName=STRING.UPR("&ImageName")
|
|
PRINT "&ImageName"
|
|
|
|
DO debug_cb_common.cmm &TargetPkg &srcpath &xblsrcpath &ImageName
|
|
|
|
enddo
|