The NetBSD Project

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed Dec 20 06:13:58 2023 UTC (11 months, 3 weeks ago) by thorpej
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -3 lines
Remove unnecessary <sys/malloc.h>.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat Feb 25 08:00:35 2023 UTC (21 months, 2 weeks ago) by skrll
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -2 lines
Add a KASSERT

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sun May 29 16:13:41 2022 UTC (2 years, 6 months ago) by ryo
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +3 -3 lines
Simplified termination conditions for ddb backtrace.

Exit backtrace when the user trapframe is invalid. (Mainly in kernel threads).

Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon Aug 30 22:54:40 2021 UTC (3 years, 3 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -3 lines
Interrupts may not be enabled yet when cpu_lwp_fork is called during boot,
so remove incorrect KASSERT.

Revision 1.9.2.1: download - view: text, markup, annotated - select for diffs
Sat Apr 3 22:28:13 2021 UTC (3 years, 8 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +5 -5 lines
Sync with HEAD.

Revision 1.10.2.1: download - view: text, markup, annotated - select for diffs
Sat Apr 3 21:44:40 2021 UTC (3 years, 8 months ago) by thorpej
Branches: thorpej-cfargs
Diff to: previous 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10: +4 -4 lines
Sync with HEAD.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sun Mar 28 10:29:05 2021 UTC (3 years, 8 months ago) by skrll
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -4 lines
fix a comment that has been c&p'ed around and not updated

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Mar 1 11:37:31 2021 UTC (3 years, 9 months ago) by jmcneill
Branches: MAIN
Branch point for: thorpej-cfargs
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -3 lines
cpu_lwp_fork: KASSERT -> KASSERTMSG to print the actual value of DAIF if
it is not 0 in cpu_lwp_fork

Revision 1.5.4.1: download - view: text, markup, annotated - select for diffs
Fri Jan 1 13:06:39 2021 UTC (3 years, 11 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +16 -6 lines
Pull up following revision(s) (requested by rin in ticket #1174):

	sys/arch/aarch64/aarch64/vm_machdep.c: revision 1.9 (patch)

Fix clone(2) for COMPAT_NETBSD32.
(1) Set r13 (sp for arm32 processes) appropriately when stack is
     specified to fork1().
(2) For arm32 processes, align stack to 8-byte boundary, instead of
     16-byte for native aarch64 processes, to match our 32-bit ABI:
https://nxr.netbsd.org/xref/src/sys/arch/arm/arm32/vm_machdep.c#150

Note that sp alignment checking is disabled in aarch32 mode, and
this works fine with AARCH64_EL0_STACK_ALIGNMENT_CHECK option.

OK ryo

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Oct 15 22:52:08 2020 UTC (4 years, 1 month ago) by rin
Branches: MAIN
Branch point for: thorpej-futex
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +15 -6 lines
Fix clone(2) for COMPAT_NETBSD32.

(1) Set r13 (sp for arm32 processes) appropriately when stack is
    specified to fork1().

(2) For arm32 processes, align stack to 8-byte boundary, instead of
    16-byte for native aarch64 processes, to match our 32-bit ABI:

https://nxr.netbsd.org/xref/src/sys/arch/arm/arm32/vm_machdep.c#150

Note that sp alignment checking is disabled in aarch32 mode, and
this works fine with AARCH64_EL0_STACK_ALIGNMENT_CHECK option.

OK ryo

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat May 23 18:08:59 2020 UTC (4 years, 6 months ago) by ryo
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +18 -4 lines
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: download - view: text, markup, annotated - select for diffs
Fri May 22 19:29:26 2020 UTC (4 years, 6 months ago) by ryo
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +9 -2 lines
fix to do backtrace properly for running LWPs and cpu_lwp_fork().
when dump of pcb_tf, only the switchframe part is now displayed instead of the whole trapframe.

Revision 1.2.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 21 18:42:02 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.2.2.1: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.2.1: +13 -2 lines
Sync with HEAD

Revision 1.5.10.1: download - view: text, markup, annotated - select for diffs
Mon Apr 20 11:28:50 2020 UTC (4 years, 7 months ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +13 -2 lines
Sync with HEAD

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Apr 12 07:49:58 2020 UTC (4 years, 7 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +13 -2 lines
Add support for Pointer Authentication (PAC).

We use the "pac-ret" option, to sign the return instruction pointer on
function entry, and authenticate it on function exit. This acts as a
mitigation against ROP.

The authentication uses a per-lwp (secret) I-A key stored in the 128bit
APIAKey register and part of the lwp context. During lwp creation, the
kernel generates a random key, and during context switches, it installs
the key of the target lwp on the CPU.

Userland cannot read the APIAKey register directly. However, it can sign
its pointers with it, because the register is architecturally shared
between userland and the kernel. Although part of the CPU design, it is
a bit of an undesired behavior, because it allows to forge valid kernel
pointers from userland. To avoid that, we don't share the key with
userland, and rather switch it in EL0<->EL1 transitions. This means that
when userland executes, a different key is loaded in APIAKey than the one
the kernel uses. For now the userland key is a fixed 128bit zero value.

The DDB stack unwinder is changed to strip the authentication code from
the pointers in lr.

Two problems are known:

 * Currently the idlelwps' keys are not really secret. This is because
   the RNG is not yet available when we spawn these lwps. Not overly
   important, but would be nice to fix with UEFI RNG.
 * The key switching in EL0<->EL1 transitions is not the most optimized
   code on the planet. Instead of checking aarch64_pac_enabled, it would
   be better to hot-patch the code at boot time, but there currently is
   no hot-patch support on aarch64.

Tested on Qemu.

Revision 1.2.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:05:43 2019 UTC (5 years, 6 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +5 -6 lines
Sync with HEAD

Revision 1.1.28.3: download - view: text, markup, annotated - select for diffs
Fri Jan 18 08:50:13 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.1.28.2: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.28.2: +3 -3 lines
Synch with HEAD

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Dec 27 09:55:27 2018 UTC (5 years, 11 months ago) by mrg
Branches: MAIN
CVS tags: phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, netbsd-9-base, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2, is-mlppp-base, is-mlppp, bouyer-xenpvh-base, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: netbsd-9, bouyer-xenpvh
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +3 -3 lines
make savecore for arm64 basically work.

- move MD lwp "md_ktf" member into struct pcb.  the pcb is used by
  the gdb "bsd-kvm" target code to find the stack of each thread
  and needs to be available in a well known location.
- implement aarch64_nbsd_supply_pcb() in GDB.  makes basic gdb work
  on a crash dump.
- remove '#if L_MD_KTF + 8 == L_MD_CPACR' conditional code, as there
  is no more L_MD_KTF.

with this gdb has minimal working functionality with "target kvm",
and crash can at least "ps" on a crash dump.

ok skrll.

Revision 1.1.28.2: download - view: text, markup, annotated - select for diffs
Sat Jul 28 04:37:25 2018 UTC (6 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.1.28.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.28.1: +4 -5 lines
Sync with HEAD

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Jul 17 00:36:30 2018 UTC (6 years, 4 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +4 -4 lines
add missing casts

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Jul 12 10:46:41 2018 UTC (6 years, 5 months ago) by maxv
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -3 lines
Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

 * Removes "options PERFCTRS", the associated includes, and the associated
   ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
   good.

 * Removes the PMC code of ARM XSCALE.

 * Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

 * Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
   definitions are put in sysarch.h.

 * Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
   and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
   netbsd32 and rump.

 * Removes the pmc_evid_t and pmc_ctr_t types.

 * Removes all the associated man pages. The sets are marked as obsolete.

Revision 1.1.28.1: download - view: text, markup, annotated - select for diffs
Sat Apr 7 04:12:10 2018 UTC (6 years, 8 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +39 -18 lines
Sync with HEAD.  77 conflicts resolved - all of them $NetBSD$

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Apr 1 04:35:03 2018 UTC (6 years, 8 months ago) by ryo
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407
Branch point for: phil-wifi
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +39 -18 lines
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@)

Revision 1.1.4.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:02:39 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.1.4.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.4.1: +211 -0 lines
Rebase to HEAD as of a few days ago.

Revision 1.1.4.1
Sun Aug 10 05:47:37 2014 UTC (10 years, 4 months ago) by tls
Branches: tls-maxphys
FILE REMOVED
Changes since revision 1.1: +0 -211 lines
file vm_machdep.c was added on branch tls-maxphys on 2014-08-20 00:02:39 +0000

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 05:47:37 2014 UTC (10 years, 4 months ago) by matt
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, tls-maxphys-base, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-base, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, nick-nhusb, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: tls-maxphys, pgoyette-compat
Preliminary files for AARCH64 (64-bit ARM) support.
Enough for a distribution build.

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>