test

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2019 License: BSD-3-Clause Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const FITSize int64 = 16 * 1024 * 1024

16MiB

View Source
const FITVector = 0xFFFFFFC0
View Source
const FourGiB int64 = 0x100000000
View Source
const ResetVector = 0xFFFFFFF0

Variables

View Source
var (
	TestsCPU = [...]*Test{
		&test01checkforintelcpu,
		&test02waybridgeorlater,
		&test03cpusupportstxt,
		&test04chipsetsupportstxt,
		&test05txtregisterspaceaccessible,
		&test06supportssmx,
		&test07supportvmx,
		&test08ia32featurectrl,
		&test10hasgetsecleaves,
		&test11txtnotdisabled,
		&test12ibbmeasured,
		&test13ibbistrusted,
		&test14txtregisterslocked,
	}
)
View Source
var (
	TestsFIT = [...]*Test{
		&testfitvectorisset,
		&test22hasfit,
		&test23hasbiosacm,
		&test24hasibb,
		&test25haslcpTest,
		&test26ibbcoversresetvector,
		&ibbcoversfitvector,
		&ibbcoversfit,
		&test27noibboverlap,
		&test28nobiosacmoverlap,
		&test29nobiosacmisbelow4g,
		&test30policyallowstxt,
	}
)
View Source
var (
	TestsMemory = [...]*Test{
		&test36memoryisreserved,
		&test37txtmemoryisdpr,
		&testtxtdprislocked,
		&test38hostbridgeDPRcorrect,
		&test39sinitintxt,
		&test40sinitmatcheschipset,
		&test41sinitmatchescpu,
		&test42nosiniterrors,
		&test43biosdataregionpresent,
		&test44hasmtrr,
		&test45hassmrr,
		&test46validsmrr,
		&test47activesmrr,
		&test48activeiommi,
		&test49activetboot,
		&test50servermodetext,
		&test51releasefusedfsbi,
	}
)
View Source
var (
	TestsTPM = [...]*Test{
		&test16tpmispresent,
		&test17tpmislocked,
		&test18psindexisset,
		&test19auxindexisset,
		&test20lcppolicyisvalid,
	}
)

Functions

func ConnectTPM

func ConnectTPM(tpmPath string) error

Connects to a TPM device (virtual or real) at the given path

func FITVectorIsSet

func FITVectorIsSet() (bool, error)

func IBBCoversFIT

func IBBCoversFIT() (bool, error)

func IBBCoversFITVector

func IBBCoversFITVector() (bool, error)

func Test01CheckForIntelCPU

func Test01CheckForIntelCPU() (bool, error)

Check we're running on a Intel CPU

func Test02WeybridgeOrLater

func Test02WeybridgeOrLater() (bool, error)

Check we're running on Weybridge

func Test03CPUSupportsTXT

func Test03CPUSupportsTXT() (bool, error)

Check if the CPU supports TXT

func Test04ChipsetSupportsTXT

func Test04ChipsetSupportsTXT() (bool, error)

Check whether chipset supports TXT

func Test05TXTRegisterSpaceAccessible

func Test05TXTRegisterSpaceAccessible() (bool, error)

Check if the TXT register space is accessible

func Test06SupportsSMX

func Test06SupportsSMX() (bool, error)

Check if CPU supports SMX

func Test07SupportVMX

func Test07SupportVMX() (bool, error)

Check if CPU supports VMX

func Test08Ia32FeatureCtrl

func Test08Ia32FeatureCtrl() (bool, error)

Check IA_32FEATURE_CONTROL

func Test09SMXIsEnabled

func Test09SMXIsEnabled() (bool, error)

func Test10HasGetSecLeaves

func Test10HasGetSecLeaves() (bool, error)

Check for needed GETSEC leaves

func Test11TXTNotDisabled

func Test11TXTNotDisabled() (bool, error)

Check TXT_DISABLED bit in TXT_ACM_STATUS

func Test12IBBMeasured

func Test12IBBMeasured() (bool, error)

Verify that the IBB has been measured

func Test13IBBIsTrusted

func Test13IBBIsTrusted() (bool, error)

Check that the IBB was deemed trusted Only set in Signed Policy mode

func Test14TXTRegistersLocked

func Test14TXTRegistersLocked() (bool, error)

Verify that the TXT register space is locked

func Test15NoBIOSACMErrors

func Test15NoBIOSACMErrors() (bool, error)

Check that the BIOS ACM has no startup error

func Test16TPMPresent

func Test16TPMPresent() (bool, error)

Checks whether a TPM is present and answers to GetCapability

func Test17TPMIsLocked

func Test17TPMIsLocked() (bool, error)

TPM NVRAM is locked

func Test18PSIndexIsSet

func Test18PSIndexIsSet() (bool, error)

TPM NVRAM has a valid PS index

func Test19AUXIndexIsSet

func Test19AUXIndexIsSet() (bool, error)

TPM NVRAM has a valid AUX index

func Test20LCPPolicyIsValid

func Test20LCPPolicyIsValid() (bool, error)

PS index contains a valid LCP policy

func Test21PCR0IsSet

func Test21PCR0IsSet() (bool, error)

Reads PCR-00 and checks whether if it's not the EmptyDigest

func Test22HasFIT

func Test22HasFIT() (bool, error)

func Test23HasBIOSACM

func Test23HasBIOSACM() (bool, error)

func Test24HasIBB

func Test24HasIBB() (bool, error)

func Test25HasBIOSPolicy

func Test25HasBIOSPolicy() (bool, error)

func Test26IBBCoversResetVector

func Test26IBBCoversResetVector() (bool, error)

func Test27NoIBBOverlap

func Test27NoIBBOverlap() (bool, error)

func Test28NoBIOSACMOverlap

func Test28NoBIOSACMOverlap() (bool, error)

func Test29BIOSACMIsBelow4G

func Test29BIOSACMIsBelow4G() (bool, error)

func Test30PolicyAllowsTXT

func Test30PolicyAllowsTXT() (bool, error)

func Test31BIOSACMValid

func Test31BIOSACMValid() (bool, error)

func Test32BIOSACMSizeCorrect

func Test32BIOSACMSizeCorrect() (bool, error)

func Test33BIOSACMAlignmentCorrect

func Test33BIOSACMAlignmentCorrect() (bool, error)

func Test34BIOSACMMatchesChipset

func Test34BIOSACMMatchesChipset() (bool, error)

func Test35BIOSACMMatchesCPU

func Test35BIOSACMMatchesCPU() (bool, error)

func Test36TXTReservedInE820

func Test36TXTReservedInE820() (bool, error)

func Test37TXTMemoryIsDPR

func Test37TXTMemoryIsDPR() (bool, error)

func Test38HostbridgeDPRCorrect

func Test38HostbridgeDPRCorrect() (bool, error)

func Test39SINITInTXT

func Test39SINITInTXT() (bool, error)

func Test40SINITMatchesChipset

func Test40SINITMatchesChipset() (bool, error)

func Test41SINITMatchesCPU

func Test41SINITMatchesCPU() (bool, error)

func Test42NoSINITErrors

func Test42NoSINITErrors() (bool, error)

func Test43BIOSDATAREGIONPresent

func Test43BIOSDATAREGIONPresent() (bool, error)

func Test44HasMTRR

func Test44HasMTRR() (bool, error)

func Test45HasSMRR

func Test45HasSMRR() (bool, error)

func Test46ValidSMRR

func Test46ValidSMRR() (bool, error)

func Test47ActiveSMRR

func Test47ActiveSMRR() (bool, error)

func Test48ActiveIOMMU

func Test48ActiveIOMMU() (bool, error)

func Test49ActiveTBOOT

func Test49ActiveTBOOT() (bool, error)

func Test50ServerModeTXT

func Test50ServerModeTXT() (bool, error)

func Test51ReleaseFusedFSBI

func Test51ReleaseFusedFSBI() (bool, error)

func TestTXTDPRisLock

func TestTXTDPRisLock() (bool, error)

Types

type Test

type Test struct {
	Name     string
	Required bool

	Result TestResult

	ErrorText string
	// contains filtered or unexported fields
}

func (*Test) Run

func (self *Test) Run() bool

type TestResult

type TestResult int
const (
	ResultNotRun TestResult = iota
	ResultDependencyFailed
	ResultFail
	ResultPass
)

func (TestResult) String

func (t TestResult) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL