Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mgerlach/release/2.12.0/fix no pmci #3101

Merged
merged 2 commits into from Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions python/opae.admin/opae/admin/fpga.py
Expand Up @@ -449,6 +449,10 @@ def upload_dev(self):
return upload_dev(fpga_sec.sysfs_path, self.pci_node)
else:
pmci = f.pmci_bus
if not pmci:
self.log.debug('no PMCI found')
return None

patterns = ['*fpga_sec_mgr*/*fpga_sec*',
'fpga_image_load/fpga_image*',
'firmware/secure-update*' ]
Expand Down
10 changes: 5 additions & 5 deletions python/opae.admin/opae/admin/tools/fpgasupdate.py
Expand Up @@ -813,11 +813,6 @@ def main():
LOG.error('PR interface uuid mismatch.')
sys.exit(1)

# Check for 'update/filename' to determine if we use sysfs or ioctl
if (pac.upload_dev.find_one(os.path.join('update', 'filename')) or
pac.upload_dev.find_one('loading')):
use_ioctl = False

# The BMC disallows updating the factory image if the current boot-page is also 'factory'.
# The idea is to always have at least one known-good image in the flash so that
# you can recover from subsequent bad images.
Expand Down Expand Up @@ -863,6 +858,11 @@ def main():
stat, mesg = do_partial_reconf(pac.pci_node.pci_address,
args.file.name)
elif blk0 is not None:
# Check for 'update/filename' to determine if we use sysfs or ioctl
if (pac.upload_dev.find_one(os.path.join('update', 'filename')) or
pac.upload_dev.find_one('loading')):
use_ioctl = False

sec_dev = pac.upload_dev
if not sec_dev:
LOG.error('Failed to find secure '
Expand Down