github.com/google/trillian-examples@v0.0.0-20240520080811-0d40d35cef0e/binary_transparency/firmware/devices/usbarmory/bootloader/boot.s (about) 1 // https://github.com/usbarmory/armory-boot 2 // 3 // Copyright (c) F-Secure Corporation 4 // https://foundry.f-secure.com 5 // 6 // Use of this source code is governed by the license 7 // that can be found in the LICENSE file. 8 9 //+build armory 10 11 // func svc() 12 TEXT ·svc(SB),$0 13 WORD $0xef000001 // svc 0x00000001 14 15 // func exec(kernel uint32, params uint32) 16 TEXT ·exec(SB),$0-8 17 MOVW kernel+0(FP), R3 18 MOVW params+4(FP), R4 19 20 // Disable MMU 21 MRC 15, 0, R0, C1, C0, 0 22 BIC $0x1, R0 23 MCR 15, 0, R0, C1, C0, 0 24 25 // CPU register 0 must be 0 26 MOVW $0, R0 27 // CPU register 1 must be the ARM Linux machine type 28 MOVW $0xffffffff, R1 29 // CPU register 2 must be the parameter list address 30 MOVW R4, R2 31 32 // Jump to kernel image 33 B (R3)