Page MenuHomeFreeBSD

Linux ARM 6/16
AbandonedPublic

Authored by soutade_gmail.com on Jun 8 2016, 2:48 PM.
Referenced Files
Unknown Object (File)
Oct 4 2024, 4:12 PM
Unknown Object (File)
Oct 4 2024, 1:44 PM
Unknown Object (File)
Oct 2 2024, 2:07 PM
Unknown Object (File)
Oct 1 2024, 11:12 PM
Unknown Object (File)
Oct 1 2024, 6:14 PM
Unknown Object (File)
Sep 23 2024, 8:47 PM
Unknown Object (File)
Sep 23 2024, 4:25 AM
Unknown Object (File)
Sep 19 2024, 5:36 AM

Details

Summary

Linux ARM : Add linux_locore.s that contains a translation in ARM assembler of linux_sigcode(), linux_rt_sigcode() and linux_vsyscall() functions

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

soutade_gmail.com retitled this revision from to Linux ARM 6/16.
soutade_gmail.com updated this object.
soutade_gmail.com edited the test plan for this revision. (Show Details)
soutade_gmail.com set the repository for this revision to rS FreeBSD src repository - subversion.
sys/arm/linux/linux_locore.s
18–19

Which instruction do you expect lr to point to? pc on ARM doesn't point to the current instruction, but one 8 bytes later.

23

This should be #LINUX_SYS_linux_sigreturn

Rework linux_sigcode() and linux_rt_sigcode() after andrew comments

  • Use # instead of $ (but $ seems to works too)
  • Bad computation of return address (that should be the instruction following branch one)
  • Frame was taken from r0, but it should be take from sp
sys/arm/linux/linux_locore.s
20

I don't think b [r1] does what you think it does. The b instruction will only branch to a label, not a register value. For armv6 you could use the blx instruction to branch to an address in a register. This will save lr so there would be no need calculate it.

43

How is this called? r7 is callee saved so if it's called directly you will need to backup this value. FreeBSD uses the same calling convention. The libc part of it is in lib/libc/arm/SYS.h

sys/arm/linux/linux_locore.s
20

You're right. After looking at disassembly, it seems the compiler does the job by itself. I'll will change it.

43

Regarding the documentation in depth, it seems that ARM architecture doesn't needs vsyscall support in vDSO. I'll drop it.

Rework linux_locore.s. Now linux_sigcode() and linux_rt_sigcode() are simpler because all parameters all pre positioned in linux_sysvec.c while precedent implementation was just a translation.