aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/etype/intel_descriptor.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/binman/etype/intel_descriptor.py')
-rw-r--r--tools/binman/etype/intel_descriptor.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/binman/etype/intel_descriptor.py b/tools/binman/etype/intel_descriptor.py
index d4d7a26..7fe88a9 100644
--- a/tools/binman/etype/intel_descriptor.py
+++ b/tools/binman/etype/intel_descriptor.py
@@ -8,7 +8,7 @@
import struct
from binman.entry import Entry
-from binman.etype.blob import Entry_blob
+from binman.etype.blob_ext import Entry_blob_ext
FD_SIGNATURE = struct.pack('<L', 0x0ff0a55a)
MAX_REGIONS = 5
@@ -25,7 +25,7 @@ class Region:
self.limit = ((val & 0x0fff0000) >> 4) | 0xfff
self.size = self.limit - self.base + 1
-class Entry_intel_descriptor(Entry_blob):
+class Entry_intel_descriptor(Entry_blob_ext):
"""Intel flash descriptor block (4KB)
Properties / Entry arguments:
@@ -45,16 +45,22 @@ class Entry_intel_descriptor(Entry_blob):
See README.x86 for information about x86 binary blobs.
"""
def __init__(self, section, etype, node):
- Entry_blob.__init__(self, section, etype, node)
+ super().__init__(section, etype, node)
self._regions = []
def Pack(self, offset):
"""Put this entry at the start of the image"""
if self.offset is None:
offset = self.section.GetStartOffset()
- return Entry_blob.Pack(self, offset)
+ return super().Pack(offset)
def GetOffsets(self):
+ info = {}
+ if self.missing:
+ # Return zero offsets so that these entries get placed somewhere
+ if self.HasSibling('intel-me'):
+ info['intel-me'] = [0, None]
+ return info
offset = self.data.find(FD_SIGNATURE)
if offset == -1:
self.Raise('Cannot find Intel Flash Descriptor (FD) signature')
@@ -66,7 +72,6 @@ class Entry_intel_descriptor(Entry_blob):
# Set the offset for ME (Management Engine) and IFWI (Integrated
# Firmware Image), for now, since the others are not used.
- info = {}
if self.HasSibling('intel-me'):
info['intel-me'] = [self._regions[REGION_ME].base,
self._regions[REGION_ME].size]