github.com/f-secure-foundry/tamago@v0.0.0-20220307101044-d73fcdd7f11b/board/raspberrypi/pi1/mem.go (about)

     1  // Raspberry Pi 1 support for tamago/arm
     2  // https://github.com/f-secure-foundry/tamago
     3  //
     4  // Copyright (c) the pi1 package authors
     5  //
     6  // Use of this source code is governed by the license
     7  // that can be found in the LICENSE file.
     8  
     9  // +build !linkramsize
    10  
    11  package pi1
    12  
    13  import (
    14  	_ "unsafe"
    15  )
    16  
    17  //go:linkname ramSize runtime.ramSize
    18  
    19  // the following models have 256 MB RAM:
    20  // - model A  (all)
    21  // - model A+ (before 10th August 2016)
    22  // - model B  (before 15th October 2012)
    23  // var ramSize uint32 = 0x10000000 - 0x04000000 // 256 MB - 64MB GPU (VideoCore)
    24  
    25  // the following models have 512 MB RAM:
    26  // - model A+ (after 10th August 2016)
    27  // - model B  (after 15th October 2012)
    28  // - model B+ (all)
    29  var ramSize uint32 = 0x20000000 - 0x04000000 // 512 MB - 64MB GPU (VideoCore)