Commit Graph

234280 Commits

Author SHA1 Message Date
plunky ab4f70e666 fix typo: sparce->sparse 2015-03-31 09:25:41 +00:00
ozaki-r 71b1eb47ca Remove unnecessary opt_ipsec.h inclusions 2015-03-31 08:47:01 +00:00
ozaki-r 7f0bd664ae Add missing ifdef IPSEC 2015-03-31 08:44:43 +00:00
martin 7d1d1b71a1 Add resize_root 2015-03-31 07:57:57 +00:00
matt 1a68694ee8 Optimize the exception handle a little bit more. 2015-03-31 06:47:47 +00:00
matt b12144c585 We have _REG_SP so use it. 2015-03-31 01:36:27 +00:00
matt 5539e041c8 Since there is only "scratch" system register for use on exception, come
up with a new scheme for its use.  Use PTR_LA, INT_S/INT_L, etc.  Disable
interrupts when returning from exceptions.  Use L_CPU(tp) to get the curcpu
pointer.

When the cpu gets an exception from kernel mode, the sscratch register will be
0 and curlwp will be in the "tp" register.  When the cpu gets an exception from
user mode, the sscratch register will be a pointer to the current lwp.

When an exception happends, the sp is atomically swapped with the sscratch
register.

	If the sp is zero, the exception was a kernel exception and the
	kernel exception path is taken: sp and sscratch are swapped again
	so sscratch is zero again and then a trapframe is allocated from
	the kernel stack.  The t1 register is saved and then the pre-trapframe
	sp is written to the trapframe.

	If sp was non-zero, the exception was from user mode.  The tp register
	is temporarily saved in L_MD_TP(sp) and sp is moved tp.  tp now
	contains a pointer to the current lwp.  A pointer to the user
	trapframe is loaded from L_MD_UTF(tp).  Then t1 is saved in the
	trapframe so it can be used.  The old sp is fetched from sscratch
	while sscratch is zeroed (indicated kernel mode).  The old sp is
	saved in the trapframe.

	Upon exiting the exception, if the exception is returning to user
	mode, the contents of tp is written to sscratch.
2015-03-31 01:30:50 +00:00
matt 234a34a18b Get curcpu() from L_CPU(tp) 2015-03-31 01:15:26 +00:00
matt 8b1d38bd25 Use sfence.vm instruction and change ptbr cse to sptbr csr 2015-03-31 01:14:57 +00:00
matt c81fbb027b No more fatc (replaced by sfence.vm instruction). 2015-03-31 01:14:02 +00:00
matt 71a690b876 Add L_MD_TP 2015-03-31 01:12:47 +00:00
matt 9a7b236e49 Add a md_tp member to mdlwp so that the exception handler can temporarily
store the user's thread pointer before saving it in the trapframe.
2015-03-31 01:12:29 +00:00
matt e12d196579 Define curcpu() as lwp_getcpu(curlwp) since curlwp is always in the "tp"
(thread pointer) register.
2015-03-31 01:11:41 +00:00
matt 3c142fea53 Provide struct cpu_info *lwp_getcpu(struct lwp *) inline for <machine/cpu.h>
<machine/cpu.h> is include by <sys/lwp.h> before struct lwp is defined so
it can't access members inside it.  This provides an accessor which is defined
after struct lwp is defined.
2015-03-31 01:10:02 +00:00
matt fb7a20f006 Use -mcmodel=medany to get PICish code. 2015-03-31 01:05:52 +00:00
riastradh e9f7453834 Write an essay explaining why ffs_write is one huge WAPBL transaction. 2015-03-31 00:22:50 +00:00
riastradh c6a78cfe85 Explain large write transaction bug in WAPBL. 2015-03-31 00:03:58 +00:00
dholland fd9a522f27 An error was detected in a man page. 2015-03-30 16:57:40 +00:00
riastradh 57ae0bf4df Plural agreement. 2015-03-30 14:09:04 +00:00
riastradh 5586a44152 Fix tense. 2015-03-30 14:00:52 +00:00
riastradh 79047ecb0c Fix typo in example code. 2015-03-30 13:58:28 +00:00
riastradh 185edd37f7 Fix example code and emphasize it doesn't handle holes. 2015-03-30 13:58:03 +00:00
riastradh bd88b93279 Add SIGNALS section to wizd(8). 2015-03-30 13:51:42 +00:00
riastradh 078e20efa6 Use Dv NULL, per SIGWIZD. 2015-03-30 13:40:01 +00:00
riastradh 6bcaafafa3 Be a little more consistent about nulls. 2015-03-30 13:35:50 +00:00
riastradh a6a845b4eb Use Fn to mark up a function call. 2015-03-30 13:26:55 +00:00
riastradh 808424fb3e Nested I/O transfers are not `asynchronous'. 2015-03-30 13:22:12 +00:00
riastradh b2d5d8d78a Consistently use `.Vt "struct buf"' to name the type. 2015-03-30 13:18:08 +00:00
riastradh e90024bf9f Note reusing bufs requires clearing BO_DONE. 2015-03-30 13:17:14 +00:00
riastradh ba2aeff9b2 Correct documentation of asynchronous/callback buffer I/O.
Asynchronous is not the same as callback: asynchronous means there is
no completion notification, and can be used only with buffer-cached
buffers.
2015-03-30 13:10:04 +00:00
skrll 99e82b4801 Whitespace 2015-03-30 11:55:00 +00:00
skrll 94a1c6fae2 Replace an if () panic with KASSERT 2015-03-30 11:54:43 +00:00
wiz 51864d68ed Bump date for previous.
it's -> its
2015-03-30 11:01:53 +00:00
chopps 94dff34741 Add resize_root boot operation. If resize_root=YES in rc.conf then
the system attempts to resize the root file system to fill it's
partition prior to mounting read-write. Useful for things like AMI
file system images. May eventually be used by arm images after
coming up with similar solution for increasing the parition size.
2015-03-30 10:58:37 +00:00
matt c15a5b6aaa #include <sys/pcu.h> 2015-03-30 05:43:55 +00:00
matt 177859160c note change to workaround bug in clang's arm integrated assembler. 2015-03-30 05:30:08 +00:00
matt bd66e9fd02 Add workaround/hack for clang integrated arm assembler bug. 2015-03-30 05:26:47 +00:00
ozaki-r f35c2148c2 Tidy up opt_ipsec.h inclusions 2015-03-30 04:25:26 +00:00
ozaki-r 48b3acd885 Tidy up opt_ipsec.h inclusions
Some inclusions of opt_ipsec.h were for IPSEC_NAT_T and are now unnecessary.
Add inclusions to some C files for IPSEC_DEBUG.
2015-03-30 03:51:50 +00:00
ozaki-r 32be705817 Include ip6.h for ip6_hdr 2015-03-30 02:23:21 +00:00
riastradh c57b4b0b32 Remove obsolete cprng_strong_getflags/setflags(9) man page links.
XXX pullup-7
2015-03-30 01:25:36 +00:00
riastradh fc8e6f8285 Hook bufferio(9) man page into the build.
Remove separate getiobuf(9) man page, subsumed by bufferio(9).
2015-03-30 01:15:15 +00:00
riastradh bc9959754c Hook up the new wapbl(9) man page. 2015-03-30 00:44:37 +00:00
matt 396eed6727 No need to use -fno-integrated-assembler with clang 2015-03-29 23:35:08 +00:00
jmcneill d52192759c Use shared armv7_generic_space 2015-03-29 22:49:44 +00:00
jmcneill c154fb0a46 Use shared armv7_generic_space 2015-03-29 22:27:04 +00:00
jmcneill 1a2450dd29 Shared armv7 bus space implementation. 2015-03-29 22:26:18 +00:00
jmcneill 8588c5e96f hey there's a README here! add ALLWINNER_A80, BPI, CUBIEBOARD, CUBIETRUCK, HUMMINGBIRD_A31, JETSONTK1, ODROID-C1, ROCKCHIP configs 2015-03-29 21:11:17 +00:00
riastradh 7643fefe1a Mention B_WRITE. 2015-03-29 21:08:36 +00:00
riastradh 5bd51b95d7 Remove \& from example code. Cargo-culted from I forget where. 2015-03-29 21:08:08 +00:00