github.com/google/trillian-examples@v0.0.0-20240520080811-0d40d35cef0e/binary_transparency/firmware/devices/usbarmory/bootloader/mem.go (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  //go:build armory
    10  // +build armory
    11  
    12  package main
    13  
    14  import (
    15  	_ "unsafe"
    16  )
    17  
    18  // Override imx6ul.ramStart, usbarmory.ramSize and dma allocation, as the
    19  // mapped kernel image needs to be within the first 128MiB of RAM.
    20  
    21  //go:linkname ramStart runtime.ramStart
    22  var ramStart uint = 0x90000000
    23  
    24  //go:linkname ramSize runtime.ramSize
    25  var ramSize uint = 0x10000000
    26  
    27  var dmaStart uint = 0x80000000
    28  var dmaSize = 0x10000000
    29  
    30  const kernelOffset = 0x0800000
    31  const paramsOffset = 0x7000000