mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-01 00:50:43 +09:00
binman: Don't assume there is an ME region
At present having a descriptor means that there is an ME (Intel Management Engine) entry as well. The descriptor provides the ME location and assumes that it is present. For some SoCs this is not true. Before providing the location of a potentially non-existent entry, check if it is present. Update the comment in the ME entry also. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
79a0176fae
commit
fa1c937832
@ -206,6 +206,8 @@ does not directly execute code in the ME binary.
|
||||
|
||||
A typical filename is 'me.bin'.
|
||||
|
||||
The position of this entry is generally set by the intel-descriptor entry.
|
||||
|
||||
See README.x86 for information about x86 binary blobs.
|
||||
|
||||
|
||||
|
@ -544,3 +544,12 @@ features to produce new behaviours.
|
||||
# the data grows. This should not fail, but check it to be sure.
|
||||
if not self.ObtainContents():
|
||||
self.Raise('Cannot obtain contents when expanding entry')
|
||||
|
||||
def HasSibling(self, name):
|
||||
"""Check if there is a sibling of a given name
|
||||
|
||||
Returns:
|
||||
True if there is an entry with this name in the the same section,
|
||||
else False
|
||||
"""
|
||||
return name in self.section.GetEntries()
|
||||
|
@ -60,6 +60,10 @@ class Entry_intel_descriptor(Entry_blob):
|
||||
for i in range(MAX_REGIONS):
|
||||
self._regions.append(Region(self.data, frba, i))
|
||||
|
||||
# Set the offset for ME only, for now, since the others are not used
|
||||
return {'intel-me': [self._regions[REGION_ME].base,
|
||||
self._regions[REGION_ME].size]}
|
||||
# Set the offset for ME (Management Engine) only, 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]
|
||||
return info
|
||||
|
@ -22,6 +22,8 @@ class Entry_intel_me(Entry_blob):
|
||||
|
||||
A typical filename is 'me.bin'.
|
||||
|
||||
The position of this entry is generally set by the intel-descriptor entry.
|
||||
|
||||
See README.x86 for information about x86 binary blobs.
|
||||
"""
|
||||
def __init__(self, section, etype, node):
|
||||
|
Loading…
Reference in New Issue
Block a user