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

util: fix raw binary loading using --raw-cpt #160

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions configs/common/XSConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ def config_xiangshan_inputs(args: argparse.Namespace, sys):
args.difftest_ref_so = ref_so

if args.gcpt_restorer is None:
if args.num_cpus > 1:
if args.raw_cpt:
# If using raw binary, no restorer is needed.
gcpt_restorer = None
elif args.num_cpus > 1:
if "GCB_MULTI_CORE_RESTORER" in os.environ:
gcpt_restorer = os.environ["GCB_MULTI_CORE_RESTORER"]
print("Obtained gcpt_restorer from GCB_MULTI_CORE_RESTORER: ", gcpt_restorer)
Expand Down Expand Up @@ -84,7 +87,7 @@ def config_xiangshan_inputs(args: argparse.Namespace, sys):

if args.raw_cpt:
assert not args.gcpt_restorer # raw_cpt and gcpt_restorer are exclusive
print('Using raw bbl', gcpt_restorer)
print('Using raw bbl', args.generic_rv_cpt)
sys.map_to_raw_cpt = True
sys.workload.raw_bootloader = True
else:
Expand Down
Loading