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=f24f6eb9398e63b3f0172b086963d198b659a706;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 1b042381..e500f8a3 100644 --- a/src/openpower/decoder/isa/caller.py +++ b/src/openpower/decoder/isa/caller.py @@ -1514,6 +1514,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