[Libre-soc-bugs] [Bug 1228] SFFS ISACaller userspace ELF support for dynamic linking and PIC
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Thu Dec 7 09:09:14 GMT 2023
https://bugs.libre-soc.org/show_bug.cgi?id=1228
--- Comment #13 from Jacob Lifshay <programmerjake at gmail.com> ---
I added the rest of auxv and afaict it matches linux (with some adjustment for
program args and name and different AT_HWCAP[2] values since we don't support
altivec, vsx, etc.)
I also fixed brk to not try to return page-aligned values when the input isn't
page-aligned.
I also added some code to dump gdb commands that can be copy-pasted for easy
debugging while matching load_elf's initial state.
https://git.libre-soc.org/?p=openpower-isa.git;a=shortlog;h=e99f2f2679cc04fd7d0a63b6db29e61d4dc1bcdf
now, I'm running into the issue that ISACaller is causing an
unaligned-memory-access exception:
0x1002FBFC: 7D20FC28
call ldbrx ldbrx
read reg 0/0: 0x0
read reg 31/0: 0x7fffffffffd9
read reg 9/0: 0xfd9
memory unaligned exception, DAR 140737488355289 MemException('unaligned',
'Unaligned access: remainder 1 width 8')
This exception needs to be suppressed and the load performed like normal, as is
required by the programming note on:
PowerISA v3.1B Book III section 7.5.9 page 1287 (1313)
> If an Alignment interrupt occurs for a case in the
> second bulleted list above, the Alignment interrupt
> handler should emulate the instruction. The emula-
> tion must satisfy the atomicity requirements
> described in Section 1.4 of Book II.
ldbrx falls under the second list, so user-mode emulation must execute the
instruction. (actually, all instructions in the second list *may* cause
alignment faults rather than being required to, so I think we just need to add
a mode flag to suppress alignment faults for those instructions and then we can
set that flag by default)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list