The NetBSD Project

CVS log for src/sys/arch/aarch64/aarch64/netbsd32_machdep.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / arch / aarch64 / aarch64

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.23 / (download) - annotate - [select for diffs], Sun Nov 14 15:12:01 2021 UTC (14 months, 2 weeks ago) by skrll
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.22: +7 -7 lines
Diff to previous 1.22 (colored)

Trailing whitespace

Revision 1.22 / (download) - annotate - [select for diffs], Sat Nov 6 20:42:56 2021 UTC (14 months, 3 weeks ago) by thorpej
Branch: MAIN
Changes since 1.21: +3 -16 lines
Diff to previous 1.21 (colored)

COMPAT_NETBSD32 is all about running the 32-bit flavor of native
binaries on a 64-bit platform[*], as such:
- Make the logic about which "sendsig" flavor to call MI (as it is in the
  native 64-bit environment) and follow the same rules as the native 32-bit
  environment.
- Make COMPAT_NETBSD32 x COMPAT_16 work the same as it would in the
  native 32-bit environment by providing a netbsd32_sendsig_sigcontext_16_hook,
  rather than overriding the entire sendsig logic with a netbsd32_sendsig_hook.
- In netbsd32___sigaction_sigtramp(), make sure the compat_netbsd32_16
  module is loaded if the trampoline version specifies a sigcontext style
  handler, otherwise return EINVAL so that libc can try again with siginfo
  style.

[*] ...except for arm32, which uses it to mean "run 32-bit OABI binaries
from the 32-bit EABI environment".  Doing it this way was arguably a mistake,
but we are stuck with it for now, so support it by providing a machine-
dependent override for netbsd32_sendsig() that also disables the corresponding
logic in netbsd32___sigaction_sigtramp().

Fixes PR kern/56487.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Nov 1 05:07:15 2021 UTC (15 months ago) by thorpej
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Use "stack_t" instead of "struct sigaltstack", as the former is the
newer standardized name.  NFC.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Oct 27 04:14:59 2021 UTC (15 months ago) by thorpej
Branch: MAIN
Changes since 1.19: +4 -3 lines
Diff to previous 1.19 (colored)

Use the signal trampoline version constants from <sys/signal.h>.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Sep 23 15:19:03 2021 UTC (16 months, 1 week ago) by ryo
Branch: MAIN
Changes since 1.18: +8 -8 lines
Diff to previous 1.18 (colored)

use lwp_trapframe() macro. NFC.

Revision 1.17.4.1 / (download) - annotate - [select for diffs], Thu Jun 17 04:46:16 2021 UTC (19 months, 2 weeks ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.17: +36 -25 lines
Diff to previous 1.17 (colored) next main 1.18 (colored)

Sync w/ HEAD.

Revision 1.7.2.3 / (download) - annotate - [select for diffs], Tue Jun 1 10:39:48 2021 UTC (20 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE
Changes since 1.7.2.2: +36 -25 lines
Diff to previous 1.7.2.2 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored)

Pull up following revision(s) (requested by rin in ticket #1277):

	sys/arch/aarch64/aarch64/netbsd32_machdep.c: revision 1.18

Fix conversion between aarch64 and aarch32 fpreg's; in aarch32 mode,
d0-d31 are packed into v0-v15 (== q0-q15).

This fixes crashes in VFP-optimized codes running on COMPAT_NETBSD32.

OK ryo

Revision 1.17.6.1 / (download) - annotate - [select for diffs], Mon May 31 22:15:09 2021 UTC (20 months ago) by cjep
Branch: cjep_staticlib_x
Changes since 1.17: +36 -25 lines
Diff to previous 1.17 (colored) next main 1.18 (colored)

sync with head

Revision 1.18 / (download) - annotate - [select for diffs], Sun May 30 05:40:56 2021 UTC (20 months ago) by rin
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1
Changes since 1.17: +36 -25 lines
Diff to previous 1.17 (colored)

Fix conversion between aarch64 and aarch32 fpreg's; in aarch32 mode,
d0-d31 are packed into v0-v15 (== q0-q15).

This fixes crashes in VFP-optimized codes running on COMPAT_NETBSD32.

OK ryo

Revision 1.7.2.2 / (download) - annotate - [select for diffs], Fri Jan 1 12:58:35 2021 UTC (2 years ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-2-RELEASE
Changes since 1.7.2.1: +91 -4 lines
Diff to previous 1.7.2.1 (colored) to branchpoint 1.7 (colored)

Pull up following revision(s) (requested by rin in ticket #1172):

	sys/arch/aarch64/aarch64/trap.c: revision 1.30
	sys/arch/aarch64/include/ptrace.h: revision 1.10
	sys/arch/aarch64/include/netbsd32_machdep.h: revision 1.4 (patch)
	sys/arch/aarch64/aarch64/netbsd32_machdep.c: revision 1.14
	sys/arch/aarch64/aarch64/netbsd32_machdep.c: revision 1.15

Add support of ptrace(2) for COMPAT_NETBSD32.

Now, GDB for arm32 is usable for debugging 32bit applications.
OK ryo@

For rev 1.14 and before, netbsd32_process_write_regs() returns EINVAL
if non-modifiable bits are set in CPSR.
Instead, mask out non-modifiable bits and make this function success
regardless of value in CPSR. New behavior matches that of arm:
https://nxr.netbsd.org/xref/src/sys/arch/arm/arm/process_machdep.c#187

This fixes lib/libc/sys/t_ptrace_wait*:access_regs6 tests, in which
register contents retrieved by PT_GETREGS are set back by PT_SETREGS.

No new regression is observed in full ATF run.

OK ryo

Revision 1.16.2.1 / (download) - annotate - [select for diffs], Mon Dec 14 14:37:44 2020 UTC (2 years, 1 month ago) by thorpej
Branch: thorpej-futex
Changes since 1.16: +4 -3 lines
Diff to previous 1.16 (colored) next main 1.17 (colored)

Sync w/ HEAD.

Revision 1.17 / (download) - annotate - [select for diffs], Fri Dec 11 18:03:33 2020 UTC (2 years, 1 month ago) by skrll
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base, thorpej-cfargs, cjep_staticlib_x-base
Branch point for: thorpej-i2c-spi-conf, cjep_staticlib_x
Changes since 1.16: +4 -3 lines
Diff to previous 1.16 (colored)

s:aarch64/cpufunc.h:arm/cpufunc.h:

a baby step in the grand arm header unification challenge

Revision 1.16 / (download) - annotate - [select for diffs], Thu Oct 15 23:10:06 2020 UTC (2 years, 3 months ago) by rin
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.15: +4 -2 lines
Diff to previous 1.15 (colored)

Call netbsd32_adjust_limits() in netbsd32_setregs() for sure,
as done for amd64 and sparc64.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Oct 15 22:41:02 2020 UTC (2 years, 3 months ago) by rin
Branch: MAIN
Changes since 1.14: +4 -5 lines
Diff to previous 1.14 (colored)

For rev 1.14 and before, netbsd32_process_write_regs() returns EINVAL
if non-modifiable bits are set in CPSR.

Instead, mask out non-modifiable bits and make this function success
regardless of value in CPSR. New behavior matches that of arm:

https://nxr.netbsd.org/xref/src/sys/arch/arm/arm/process_machdep.c#187

This fixes lib/libc/sys/t_ptrace_wait*:access_regs6 tests, in which
register contents retrieved by PT_GETREGS are set back by PT_SETREGS.

No new regression is observed in full ATF run.

OK ryo

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jul 2 13:04:46 2020 UTC (2 years, 7 months ago) by rin
Branch: MAIN
Changes since 1.13: +92 -4 lines
Diff to previous 1.13 (colored)

Add support of ptrace(2) for COMPAT_NETBSD32.

Now, GDB for arm32 is usable for debugging 32bit applications.

OK ryo@

Revision 1.13 / (download) - annotate - [select for diffs], Sat May 23 18:08:59 2020 UTC (2 years, 8 months ago) by ryo
Branch: MAIN
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)

Not only the kernel thread, but also the userland PAC keys
(APIA,APIB,APDA,APDB,APGA) are now randomly initialized at exec, and switched
when context switch.
userland programs are able to perform pointer authentication on ARMv8.3+PAC cpu.

reviewd by maxv@, thanks.

Revision 1.7.2.1 / (download) - annotate - [select for diffs], Sat May 2 16:26:04 2020 UTC (2 years, 9 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-1-RELEASE
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

Pull up following revision(s) (requested by tnn in ticket #883):

	sys/arch/aarch64/aarch64/netbsd32_machdep.c: revision 1.11

fix inverted logic in NETBSD32 user signal stack handling (PR evbarm/55200)

Revision 1.10.4.1 / (download) - annotate - [select for diffs], Sat Apr 25 11:23:54 2020 UTC (2 years, 9 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.12 / (download) - annotate - [select for diffs], Thu Apr 23 17:21:53 2020 UTC (2 years, 9 months ago) by skrll
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Typo in comment

Revision 1.11 / (download) - annotate - [select for diffs], Thu Apr 23 16:37:39 2020 UTC (2 years, 9 months ago) by tnn
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

fix inverted logic in NETBSD32 user signal stack handling (PR evbarm/55200)

Revision 1.1.4.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:03:27 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.1.4.2: +1 -1 lines
Diff to previous 1.1.4.2 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.1.4.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:07:23 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.1.4.1: +10 -13 lines
Diff to previous 1.1.4.1 (colored) to branchpoint 1.1 (colored)

Merge changes from current as of 20200406

Revision 1.9.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:18:15 2020 UTC (2 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.9: +2 -4 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Sync with head.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jan 31 09:08:57 2020 UTC (3 years ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base1, bouyer-xenpvh-base, ad-namecache-base3
Branch point for: bouyer-xenpvh
Changes since 1.9: +2 -4 lines
Diff to previous 1.9 (colored)

D means E here (aarch32), so don't check it. A-I-F are checked below
already, so drop the whole line.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Nov 24 04:08:36 2019 UTC (3 years, 2 months ago) by rin
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.8: +3 -7 lines
Diff to previous 1.8 (colored)

PR port-arm/54702

Add support for earmv6hf binaries on COMPAT_NETBSD32 for aarch64:

- Emulate ARMv6 instructions with cache operations register (c7), that
  are deprecated since ARMv7, and disabled on ARMv8 with LP64 kernel.

- ep_machine_arch (default: earmv7hf) is copied from executables, as we
  do for mips64. "uname -p" reports earmv6hf if compiled for earmv6hf;
  configure scripts etc can determine the appropriate architecture.

Many thanks to ryo@ for helping me to add support of Thumb-mode,
as well as providing exhaustive test cases:

  https://github.com/ryo/mcr_test/

We've confirmed:

- Emulation works in Thumb-mode.
- T32 16-bit length illegal instruction results in SIGILL, even if
  it is located nearby a boundary b/w mapped and unmapped pages.
- T32 32-bit instruction results in SIGSEGV if it is located across
  a boundary b/w mapped and unmapped pages.

XXX
pullup to netbsd-9

Revision 1.8 / (download) - annotate - [select for diffs], Wed Nov 20 19:37:51 2019 UTC (3 years, 2 months ago) by pgoyette
Branch: MAIN
Changes since 1.7: +9 -6 lines
Diff to previous 1.7 (colored)

Move all non-emulation-specific coredump code into the coredump module,
and remove all #ifdef COREDUMP conditional compilation.  Now, the
coredump module is completely separated from the emulation modules, and
they can all be independently loaded and unloaded.

Welcome to 9.99.18 !

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jul 12 06:44:49 2019 UTC (3 years, 6 months ago) by skrll
Branch: MAIN
CVS Tags: phil-wifi-20191119, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Branch point for: netbsd-9
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

Fix STACK_ALIGN "bytes" argument which actually should be a mask.

Spotted by Mark Millard (marklmi at yahoo.com)

Revision 1.1.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:05:43 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.1: +469 -33 lines
Diff to previous 1.1 (colored)

Sync with HEAD

Revision 1.6 / (download) - annotate - [select for diffs], Fri Apr 12 09:29:26 2019 UTC (3 years, 9 months ago) by ryo
Branch: MAIN
CVS Tags: phil-wifi-20190609, isaki-audio2-base, isaki-audio2
Changes since 1.5: +11 -7 lines
Diff to previous 1.5 (colored)

COMPAT_NETBSD32 to work on also thumbmode

Revision 1.5 / (download) - annotate - [select for diffs], Sun Jan 27 19:13:04 2019 UTC (4 years ago) by alnsn
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

Local variable p is __diagused.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jan 27 02:08:36 2019 UTC (4 years ago) by pgoyette
Branch: MAIN
Changes since 1.3: +18 -2 lines
Diff to previous 1.3 (colored)

Merge the [pgoyette-compat] branch

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Wed Dec 26 14:01:30 2018 UTC (4 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.1.2.5: +4 -3 lines
Diff to previous 1.1.2.5 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.3 / (download) - annotate - [select for diffs], Tue Nov 27 14:09:53 2018 UTC (4 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.2: +4 -3 lines
Diff to previous 1.2 (colored)

Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Sat Oct 20 06:58:23 2018 UTC (4 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.1.2.4: +449 -33 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored)

Sync with head

Revision 1.2 / (download) - annotate - [select for diffs], Fri Oct 12 01:28:57 2018 UTC (4 years, 3 months ago) by ryo
Branch: MAIN
CVS Tags: pgoyette-compat-1126, pgoyette-compat-1020
Changes since 1.1: +449 -34 lines
Diff to previous 1.1 (colored)

add initial support of COMPAT_NETBSD32 on AArch64.
arm ELF32 EABI binaries could be execute in AArch32 state on AArch64. A32 THUMB mode is not supported yet.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Tue Oct 2 01:43:53 2018 UTC (4 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.1.2.3: +2 -2 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored)

Use a hook callback to allow sparc fpu code to determine if a process
is running under sunos emulation (in which case, fpu cleanup uses a
different set of fpu_codes[]).

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Mon Oct 1 21:19:16 2018 UTC (4 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.1.2.2: +16 -1 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored)

Implement dummy netbsd32_compat_{13,16} routines.  aarch64 doesn't have
compat going that far back, but the build infrastructure expects to see
these sources and *_{init,fini} symbols.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Sat Apr 7 04:12:10 2018 UTC (4 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.1.2.1: +123 -0 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

Sync with HEAD.  77 conflicts resolved - all of them $NetBSD$

Revision 1.1.2.1, Sun Apr 1 04:35:03 2018 UTC (4 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.1: +0 -123 lines
FILE REMOVED

file netbsd32_machdep.c was added on branch pgoyette-compat on 2018-04-07 04:12:10 +0000

Revision 1.1 / (download) - annotate - [select for diffs], Sun Apr 1 04:35:03 2018 UTC (4 years, 10 months ago) by ryo
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407
Branch point for: phil-wifi, pgoyette-compat

Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>