github.com/usbarmory/tamago@v0.0.0-20240508072735-8612bbe1e454/board/qemu/sifive_u/mem.go (about)

     1  // QEMU sifive_u support for tamago/riscv64
     2  // https://github.com/usbarmory/tamago
     3  //
     4  // Copyright (c) WithSecure Corporation
     5  // https://foundry.withsecure.com
     6  //
     7  // Use of this source code is governed by the license
     8  // that can be found in the LICENSE file.
     9  
    10  //go:build !linkramsize
    11  // +build !linkramsize
    12  
    13  package sifive_u
    14  
    15  import (
    16  	_ "unsafe"
    17  )
    18  
    19  // Applications can override ramSize with the `linkramsize` build tag.
    20  //
    21  // This is useful when large DMA descriptors are required to re-initialize
    22  // tamago `mem` package in external RAM.
    23  
    24  //go:linkname ramSize runtime.ramSize
    25  var ramSize uint64 = 0x20000000 // 512 MB