Skip to content
Snippets Groups Projects
Commit 594d27bb authored by Sarangdhar Joshi's avatar Sarangdhar Joshi
Browse files

linux-ramdump-parser-v2: Compute TTBR1 value dynamically

Do not use hardcoded value for TTBR1. Compute TTBR1 value using
swapper_pg_dir_addr and phys_offset variables dynamically.

Change-Id: Ia9b4704b07e933c686e366ed0af8230be1d97e9c
parent 4933f6e6
No related branches found
No related tags found
No related merge requests found
...@@ -749,15 +749,14 @@ class RamDump(): ...@@ -749,15 +749,14 @@ class RamDump():
ebi_path, ram[1]).encode('ascii', 'ignore')) ebi_path, ram[1]).encode('ascii', 'ignore'))
if self.arm64: if self.arm64:
startup_script.write('Register.Set NS 1\n'.encode('ascii', 'ignore')) startup_script.write('Register.Set NS 1\n'.encode('ascii', 'ignore'))
startup_script.write('Data.Set SPR:0x30201 %Quad 0x{0:x}\n'.format(self.swapper_pg_dir_addr + self.phys_offset).encode('ascii', 'ignore'))
if is_cortex_a53: if is_cortex_a53:
startup_script.write('Data.Set SPR:0x30201 %Quad 0x000000008007D000\n'.encode('ascii', 'ignore'))
startup_script.write('Data.Set SPR:0x30202 %Quad 0x00000012B5193519\n'.encode('ascii', 'ignore')) startup_script.write('Data.Set SPR:0x30202 %Quad 0x00000012B5193519\n'.encode('ascii', 'ignore'))
startup_script.write('Data.Set SPR:0x30A20 %Quad 0x000000FF440C0400\n'.encode('ascii', 'ignore')) startup_script.write('Data.Set SPR:0x30A20 %Quad 0x000000FF440C0400\n'.encode('ascii', 'ignore'))
startup_script.write('Data.Set SPR:0x30A30 %Quad 0x0000000000000000\n'.encode('ascii', 'ignore')) startup_script.write('Data.Set SPR:0x30A30 %Quad 0x0000000000000000\n'.encode('ascii', 'ignore'))
startup_script.write('Data.Set SPR:0x30100 %Quad 0x0000000034D5D91D\n'.encode('ascii', 'ignore')) startup_script.write('Data.Set SPR:0x30100 %Quad 0x0000000034D5D91D\n'.encode('ascii', 'ignore'))
else: else:
startup_script.write('Data.Set SPR:0x30201 %Quad 0x000000000007D000\n'.encode('ascii', 'ignore'))
startup_script.write('Data.Set SPR:0x30202 %Quad 0x00000032B5193519\n'.encode('ascii', 'ignore')) startup_script.write('Data.Set SPR:0x30202 %Quad 0x00000032B5193519\n'.encode('ascii', 'ignore'))
startup_script.write('Data.Set SPR:0x30A20 %Quad 0x000000FF440C0400\n'.encode('ascii', 'ignore')) startup_script.write('Data.Set SPR:0x30A20 %Quad 0x000000FF440C0400\n'.encode('ascii', 'ignore'))
startup_script.write('Data.Set SPR:0x30A30 %Quad 0x0000000000000000\n'.encode('ascii', 'ignore')) startup_script.write('Data.Set SPR:0x30A30 %Quad 0x0000000000000000\n'.encode('ascii', 'ignore'))
......
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