Skip to content

Commit

Permalink
util: fix raw binary loading using --raw-cpt (#160)
Browse files Browse the repository at this point in the history
Change-Id: I612005bcf8766dc9fe20222207989b93c4f326d1
  • Loading branch information
eastonman authored Aug 16, 2024
1 parent 8f7a0f5 commit de13e7e
Showing 1 changed file with 5 additions and 2 deletions.
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

0 comments on commit de13e7e

Please sign in to comment.