Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Hang on applet exit #213

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions trusted_os/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ func segfault(buf []byte, ctx *monitor.ExecCtx) (err error) {
}

func inspect(buf []byte, ctx *monitor.ExecCtx) (err error) {
if false {
log.Printf("PC\t%s", fileLine(buf, ctx.R15)) // PC
log.Printf("LR\t%s", fileLine(buf, ctx.R14)) // LR
log.Printf("PC\t%s", fileLine(buf, ctx.R15)) // PC
log.Printf("LR\t%s", fileLine(buf, ctx.R14)) // LR

switch ctx.ExceptionVector {
case arm.UNDEFINED, arm.PREFETCH_ABORT, arm.DATA_ABORT:
return segfault(buf, ctx)
}
switch ctx.ExceptionVector {
case arm.UNDEFINED, arm.PREFETCH_ABORT, arm.DATA_ABORT:
return segfault(buf, ctx)
}

// XXX block forever
<-make(chan bool, 1)
return
}
7 changes: 0 additions & 7 deletions trusted_os/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,6 @@ func main() {

// never returns
handleInterrupts()

if debug {
// We never hit this due to handleInterrupts not returning, but having this line here
// forces the linker to keep the symbol present which is necessary for the inspect()
// function to work for debug builds.
runtime.CallOnG0()
}
}

func createBundleVerifier(logOrigin string, logVerifier note.Verifier, manifestVerifiers []string) (firmware.BundleVerifier, error) {
Expand Down