# SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2016 Google, Inc # Written by Simon Glass # # Entry-type module for a pointer to an Intel Firmware Image Table # import struct from binman.etype.blob import Entry_blob class Entry_intel_fit_ptr(Entry_blob): """Intel Firmware Image Table (FIT) pointer This entry contains a pointer to the FIT. It is required to be at address 0xffffffc0 in the image. """ def __init__(self, section, etype, node): Entry_blob.__init__(self, section, etype, node) if self.HasSibling('intel-fit') is False: self.Raise("'intel-fit-ptr' section must have an 'intel-fit' sibling") def _GetContents(self): fit_pos = self.GetSiblingImagePos('intel-fit') return struct.pack('