converged-security-suite
converged-security-suite copied to clipboard
Offset calculation for solo BIOS region is wrong.
return consts.BasePhysAddr - addr, nil
This calculates the offset from the end of the image, but what we need is the offset from the beginning of the image.
return <image size likely 16MB> - (consts.BasePhysAddr - addr), nil
I hard coded this to 16MB (0x1000000) for my image and it worked like a charm. The real fix probably needs to use the actual image size.
This is how the problem manifested, just in case someone is searching for this issue:
bg-prov: error: new ACM size doesn't equal old ACM size
https://github.com/9elements/converged-security-suite/blob/5f384405a351d7813e1bfdc34b5ed74ba4540b05/pkg/tools/ifd.go#L49