Skip to content
Snippets Groups Projects
Commit ca02b2b9 authored by lnx build's avatar lnx build Committed by Gerrit - the friendly Code Review server
Browse files

Merge "dcc_parser: Fix offset calculation for second offset" into opensource-tools.lnx.1.0-dev.1.0

parents dcb33d0a 119dcf14
No related branches found
No related tags found
No related merge requests found
......@@ -79,6 +79,7 @@ def read_config(config_pt):
link_second_arg = 8
# We return zero and fail
on_zero_link_len = 0
track_len = 0
else:
address_descriptor = 0
link_descriptor = 0x3 << 30
......@@ -88,6 +89,8 @@ def read_config(config_pt):
link_second_arg = 7
#indicates end of list
on_zero_link_len = -1
#word size
track_len = 4
while True:
word = config_pt.read(4)
......@@ -107,9 +110,10 @@ def read_config(config_pt):
elif descriptor == address_descriptor:
base = ((val & 0x0FFFFFFF) << 4)
offset = 0
length = 1
elif descriptor == link_descriptor:
for i in range(0, 2):
offset = offset + (val & 0xFF) * 4
offset = offset + (val & 0xFF) * 4 + (length - 1) * track_len
val = val >> 8
length = (val & 0x7f)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment