func (r *FlashRegion) Valid() bool {
	return r.Limit > 0 && r.Limit >= r.Base && r.Limit != 0xFFFF && r.Base != 0xFFFF
}
Valid checks to see if a region is valid
package uefi
import (
	"fmt"
)
const (
	RegionBlockSize = 0x1000
)
type FlashRegionType int
const (
	RegionTypeBIOS FlashRegionType = iota
	RegionTypeME
	RegionTypeGBE
	RegionTypePD
	RegionTypeDevExp1
	RegionTypeBIOS2
	RegionTypeMicrocode
	RegionTypeEC
	RegionTypeDevExp2
	RegionTypeIE
	RegionTypeTGBE1
	RegionTypeTGBE2
	RegionTypeReserved1
	RegionTypeReserved2
	RegionTypePTT
	RegionTypeUnknown FlashRegionType = -1
)
var flashRegionTypeNames = map[FlashRegionType]string{
	RegionTypeBIOS:      "BIOS",
	RegionTypeME:        "ME",
	RegionTypeGBE:       "GbE",
	RegionTypePD:        "PD",
	RegionTypeDevExp1:   "DevExp1",
	RegionTypeBIOS2:     "BIOS2",
	RegionTypeMicrocode: "Microcode",
	RegionTypeEC:        "EC",
	RegionTypeDevExp2:   "DevExp2",
	RegionTypeIE:        "IE",
	RegionTypeTGBE1:     "10GbE1",
	RegionTypeTGBE2:     "10GbE2",
	RegionTypeReserved1: "Reserved1",
	RegionTypeReserved2: "Reserved2",
	RegionTypePTT:       "PTT",
}
func (rt FlashRegionType) String() string {
	if s, ok := flashRegionTypeNames[rt]; ok {
		return s
	}
	return fmt.Sprintf("Unknown Region (%d)", rt)
}
type FlashRegion struct {
	Base  uint16  
	Limit uint16  
}