From: Jacob Lifshay Date: Mon, 4 Dec 2023 08:18:10 +0000 (-0800) Subject: ISACaller: implement real_addr pseudo-code helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b23f7f3da3ae5de42de64b128019cccd598fbba3;p=openpower-isa.git ISACaller: implement real_addr pseudo-code helper --- diff --git a/openpower/isa/fixedsync.mdwn b/openpower/isa/fixedsync.mdwn index 44a6b022..979a6074 100644 --- a/openpower/isa/fixedsync.mdwn +++ b/openpower/isa/fixedsync.mdwn @@ -58,7 +58,7 @@ Pseudo-code: EA <- (RA|0) + (RB) RESERVE <- 1 RESERVE_LENGTH <- 4 - RESERVE_ADDR <- EA # real_addr(EA) + RESERVE_ADDR <- real_addr(EA) RT <- [0]*32 || MEM(EA, 4) Special Registers Altered: diff --git a/src/openpower/decoder/isa/caller.py b/src/openpower/decoder/isa/caller.py index 6a452f0a..7806ccd2 100644 --- a/src/openpower/decoder/isa/caller.py +++ b/src/openpower/decoder/isa/caller.py @@ -1505,6 +1505,14 @@ class ISACaller(ISACallerHelper, ISAFPHelpers, StepLoop): def REAL_PAGE_SIZE(self): return self.real_page_size + def real_addr(self, EA): + """ get the "real address to which `EA` maps" + + Specified in PowerISA v3.1B Book II Section 1.7.2.1 page 1049 (1075) + """ + # FIXME: translate EA to a physical address + return EA + @property def FPSCR(self): return self.fpscr