github.com/linuxboot/fiano@v1.2.0/pkg/intel/metadata/fit/consts/consts.go (about)

     1  // Copyright 2017-2021 the LinuxBoot Authors. All rights reserved
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package consts
     6  
     7  const (
     8  	// BasePhysAddr is the absolute physical address where the firmware image ends.
     9  	//
    10  	// See Figure 2.1 in https://www.intel.com/content/dam/www/public/us/en/documents/guides/fit-bios-specification.pdf
    11  	//
    12  	// Note: A firmware image grows towards lower addresses. So an image will be mapped to addresses:
    13  	//       [ BasePhysAddr-length .. BasePhysAddr )
    14  	//
    15  	// Note: SPI chip is mapped into this region. So we actually work directly with data of the SPI chip
    16  	//
    17  	// See also CalculatePhysAddrOfOffset().
    18  	BasePhysAddr = 1 << 32 // "4GB"
    19  
    20  	// FITPointerOffset is the offset of the physical address of the FIT pointer.
    21  	// See "1 Firmware Interface Table" in "Firmware Interface Table" specification:
    22  	//  * https://www.intel.com/content/dam/www/public/us/en/documents/guides/fit-bios-specification.pdf
    23  	FITPointerOffset = 0x40
    24  
    25  	// FITPointerPhysAddr is the physical address of the FIT pointer.
    26  	// See "1 Firmware Interface Table" in "Firmware Interface Table" specification:
    27  	//  * https://www.intel.com/content/dam/www/public/us/en/documents/guides/fit-bios-specification.pdf
    28  	FITPointerPhysAddr = BasePhysAddr - FITPointerOffset
    29  
    30  	// FITPointerSize is the size of the FIT pointer.
    31  	// It is suggested to be 0x10 bytes because of "Figure 1-1" of the specification.
    32  	FITPointerSize = 0x10
    33  )