Commit Graph

121582 Commits

Author SHA1 Message Date
kiyohara
39db1c94a5 Add comment 'Armada XP only' to 25MHz bit. Also it is documented to errata? 2014-02-17 05:11:25 +00:00
kiyohara
fc73934003 Add some MVSOC_MLMB_ definitions for supporting DDR3. 2014-02-17 05:05:46 +00:00
kiyohara
51f2e14524 Support MARVELL_TAG_DDR3_CS[0-3]. 2014-02-17 05:00:38 +00:00
kiyohara
a676b54c95 Add MARVELL_TAG_DDR3_CS[0-3] for latest SoC. 2014-02-17 04:52:44 +00:00
schmonz
d2dd85a797 Add urtw (ok'd by christos). 2014-02-17 03:28:16 +00:00
rmind
bab1756a9a npf_alg_session: fix inverted logic in the previous commit. 2014-02-17 02:38:46 +00:00
rmind
ef728b81cb NPF: pass ALG functions via npfa_funcs_t structure. 2014-02-16 22:10:40 +00:00
maxv
03cdabd0dd Small cleanup:
- make elf_load_file() and elf_load_psection() static
 - make loops consistent
 - 'nload' is not used - see rev1.24
 - 'ap' is not used in elf_load_file()

ok agc@ christos@
2014-02-16 17:46:36 +00:00
christos
7d2bde72e3 move default last, add symbolic mask. 2014-02-16 16:13:37 +00:00
christos
61a22794fc whitespace police 2014-02-16 16:10:27 +00:00
maxv
6b47753f22 Fix tmpfs_read()'s return value; it should return EINVAL. Now consistent with
tmpfs_write().

ok christos@
2014-02-16 12:54:07 +00:00
hannken
c36eeb723b Change union_allocvp() to take an unlocked uppervp and to return the
union node unlocked.  Another VI_XLOCK hack is gone.
2014-02-16 09:50:25 +00:00
nonaka
aa143675c7 Remove duplicated comment. 2014-02-16 08:18:28 +00:00
nonaka
0db1178fa9 Use INFRA not ADHOC when opmode is M_STA. 2014-02-16 08:17:43 +00:00
njoly
f14253ab28 Regen. 2014-02-15 22:36:26 +00:00
njoly
40b4c3c92a Reduce diffs between archs, add mincore/madvise to m68k. 2014-02-15 22:35:08 +00:00
njoly
9f120b8d09 Remove argument name from prototype. 2014-02-15 22:32:16 +00:00
dsl
b5e700c786 Load and save the fpu registers (for copies to/from userspace) using
helper functions in arch/x86/x86/fpu.c
They (hopefully) ensure that we write to the entire buffer and don't load
  values that might cause faults in kernel.
Also zero out the 'pad' field of the i386 mcontext fp area that I think
  once contained the registers of any Weitek fpu.
  Dunno why it wasn't pasrt of the union.
Some of these copies could be removed if the code directly copied the save
  area to/from userspace addresses.
2014-02-15 22:20:41 +00:00
christos
6f9879ba7d initialize offset to 0 (Maxime Villard) 2014-02-15 17:39:03 +00:00
maxv
c11747d060 Remove the last argument of elf_check_header(). It is easier - and faster - to
check the e_type field in the calling function. Other BSD's already do this.

ok christos@
2014-02-15 16:17:01 +00:00
dsl
b9df3e93ac Remove all references to MDL_USEDFPU and deferred fpu initialisation.
The cost of zeroing the save area on exec is minimal.
This stops the FP registers of a random process being used the first
  time an lwp uses the fpu.
sendsig_siginfo() and get_mcontext() now unconditionally copy the FP
registers.
I'll remove the double-copy for signal handlers soon.
get_mcontext() might have been leaking kernel memory to userspace - and
  may still do so if i386_use_fxsave is false (short copies).
2014-02-15 10:11:14 +00:00
skrll
942243dba3 Trailing whitespace 2014-02-15 07:38:22 +00:00
joerg
375e4d138e Only realprot.S still needs to be built with GNU as. 2014-02-14 20:34:27 +00:00
christos
df9581b1ee explain why the innocent sigaction1 call now works. 2014-02-14 16:35:40 +00:00
christos
b9e9a610e4 Don't check trampolines for SIG_DFL or SIG_IGN since they are not used.
From gimpy.
2014-02-14 16:35:11 +00:00
christos
e5ba6e8033 make sure kernel is initialized properly. 2014-02-14 16:04:44 +00:00
njoly
aebb6d294a Regen for GeForce 210 High Definition Audio Controller. 2014-02-14 13:25:19 +00:00
njoly
593b2512cf Add GeForce 210 High Definition Audio Controller. 2014-02-14 13:24:46 +00:00
hannken
32bc55a7e7 Member un_flags is unused now -- remove. 2014-02-14 08:50:27 +00:00
maxv
1a33eb9d1c Fix memory leak.
ok christos@ agc@
2014-02-14 07:30:07 +00:00
christos
17b8640365 regen 2014-02-14 04:22:13 +00:00
christos
3c0f6b456c Add the 4G part of my modem, no driver yet. 2014-02-14 04:20:43 +00:00
christos
28e311e50e ibss and hostap support from stsp @ openbsd. 2014-02-14 04:17:41 +00:00
pooka
459f46c52b Register netisr's from component constructors instead of via a hardcoded
global list.
2014-02-14 01:43:13 +00:00
pooka
c1c33d6851 g/c prototype of imaginary routine 2014-02-14 01:27:48 +00:00
martin
478bc1f91d Remove an unused variable 2014-02-13 21:05:26 +00:00
dsl
1a42f747d5 Check the argument types for the fpu asm functions. 2014-02-13 19:37:08 +00:00
skrll
99dcdee9c4 Simplify cpu_spawn_return - setregs has done all the work already. 2014-02-13 15:04:18 +00:00
skrll
4ee2c733ee Slight code re-arrangement. No functional change. 2014-02-13 11:08:46 +00:00
hannken
8757071efb Get rid of UN_KLOCK to keep a lock on vput(). It is not really needed
and makes the source difficult to read.  Always hold references to the
union nodes until the operation is done.
2014-02-13 09:55:04 +00:00
hannken
15a20e1e67 Fix the DOT and DOTDOT case for union_lookup1(). 2014-02-13 09:50:31 +00:00
rmind
068cee2998 NPF: add support for IPv6-to-IPv6 Network Prefix Translation (NPTv6),
as per RFC 6296.  Add a unit test.  Also, bump NPF_VERSION.

Thanks to S.P.Zeidler for the help with NPTv6 work!
2014-02-13 03:34:40 +00:00
dsl
e405c62563 Change i386 to use x86/fpu.c instead of i386/isa/npx.c
This changes the trap10 and trap13 code to call directly into fpu.c,
  removing all the code for T_ARITHTRAP, T_XMM and T_FPUNDA from i386/trap.c
Not all of the code thate appeared to handle fpu traps was ever called!
Most of the changes just replace the include of machine/npx.h with x86/fpu.h
  (or remove it entirely).
2014-02-12 23:24:09 +00:00
dsl
cf7d1cf56d Add definitions of the default control words directly to this file
instead of pulling the kernel definition of the fpu (etc) into
userspace programs.
I've included machine/fenv.h into x86/cpu.c to ensure the duplicated
definitions stay in step.
The default control words are now the hardware defaults.
XXX: Anyone care to explain the differences between the i386 and amd64
versions of this file?
2014-02-12 23:04:43 +00:00
pooka
f16e4e4778 Minor comment massage, zero functionality massage. 2014-02-12 22:30:45 +00:00
pooka
9563724619 Rototill a bit, and attempt to disguise it as non-gratuitous.
Add arch/generic and move non-x86 files from rumpkern/ there.  Also,
move files from arch/i386 to arch/x86, and make both i386 and x86_64
use those.

This clarifies the situation with what is MD vs. MI code.

renames:
  rumpcpu_generic,kobj_stubs,pmap_stubs => arch/generic/rump_generic_$x
  arch/i386/* => arch/x86/rump_x86_$x

(for those who forget, x86 requires MD code because rump kernels
use the same ABI as kernel modules)
2014-02-12 22:28:43 +00:00
martin
47869c118a Unlock correct mutex in an error path.
PR kern/48592 from Kengo NAKAHARA.
2014-02-12 20:20:15 +00:00
dsl
6cb5447c23 Change the argument to fpudna() to be the trapframe.
Move the checks for fpu traps in kernel into x86/fpu.c.
Remove the code from amd64/trap.c related to fpu traps (they've not gone
  there for ages - expect to panic in kernel mode).
In fpudna():
- Don't actually enable hardware interrupts unless we need to
  allow in IPIs.
- There is no point in enabling them when they are blocked in software
  (by splhigh()).
- Keep the splhigh() to avoid a load of the KASSERTS() firing.
2014-02-12 19:53:49 +00:00
dsl
742d777c6d Move sys/arch/amd64/amd64/fpu.c and sys/arch/amd64/include/fpu.h
into sys/arch/x86 in preparation for using the same code for i386.
2014-02-11 20:17:16 +00:00
maxv
f945d6d845 Fix uninitialized variable. Harmless: it does not change the behavior
at all.

ok rmind@ christos@
2014-02-11 16:00:13 +00:00
skrll
2b38fe106e Fix typo in DF_STATIC_TLS. From Elliott Hughes on tech-userlevel. 2014-02-11 09:04:28 +00:00
tsutsui
27de5778b2 Remove unused inline version of SCSI IOCS functions. 2014-02-11 08:10:10 +00:00
tsutsui
ca5896a257 Specify default SCSI inquiry size (36 bytes) on IOCS_S_INQUIRY() command.
X680x0 SCSI IOCS stalls if SCSI device doesn't return inquiry data
of specified allocation length size on the INQUIRY command,
and it causes hangup on the XM6 based emulators that return only
upto 36 byte inquiry data on SCSI disk emulation.

Many real SCSI-2 hard drives seem to support >100 byte inquiry data,
but at least there is a harddisk that returns only supported inquiry
data size and quits transfer.

The bootloader checks only the device type and there is no reason
to read 100 bytes that includes vender specific data.

Analyzed and reported by GIMONS, a developer of XM6 TypeG emulator,
which also can run NetBSD/x68k.
2014-02-11 08:06:07 +00:00
hannken
8653615804 Change layerfs_vget(), layerfs_fhtovp() and the various layer xxx_mount()
functions to unlock/relock the node for the call to layer_node_create().

Finally remove dirty hacks (LK_NOWAIT, kpause) from layer_node_find().
2014-02-10 11:23:14 +00:00
dsl
a83194ed78 Steal the table from i386/isa/npx.c than selects the highest priority
floating point error when raising a signal.
Multiple errors bits can easily be set if different sub-fields of an
xmm simd operation generate different errors.
2014-02-09 23:02:25 +00:00
dsl
01540ebaad Tidy up and correct some comments.
Replace the hand generated 28 lines that initialised fpetable[]
  with some pre-processor expressions.
The latter was verified to give the same table entries.
2014-02-09 22:47:04 +00:00
dsl
75e68238c2 Simplify fputrap() considerably.
There is no need to save the fpu state here, and definitely no need
  to initialise the fpu.
The code is running with interrupts disabled having trapped on either
  an x87 instruction (the one after the one that generated the error)
  or on an SSE (etc) instruction that caused the error.
So all it needs to do it obtain the 'error' bits from the relevant
  status register, clear the bits, and then raise any signal.
The signal code will save the fp state if the signal itself isn't masked.
It also passes the FP state to the signal handler - which can modify it.
(I suspect that wasn't thecase when this code was written.)
Seems to work for both 64bit and 32bit 'divide by zero' errors.
For the xmm trap, the xmm registers are updated for the result of the
  instruction, but the trap returns to re-execute the instruction!
This makes it difficult for the signal handler to do anything sensible.

I've also changed the code to only use unmasked error bits when deciding
the signal code.
2014-02-09 22:19:02 +00:00
dsl
0f9c83d312 Best if x86_stmxcsr executes stmxcsr. 2014-02-09 19:42:04 +00:00
hannken
c95ccd223d Adjust comment and change vput() to vrele(). This change got missed
when changing vnode creation operations to return unlocked result.
2014-02-09 17:18:38 +00:00
hannken
ad55c847dd When layer_node_alloc() finds another thread already inserted the node
into the hashlist and discards the now unneeded node it will raise a
panic "dead but not clean".

Reorder the initialization and use ungetnewvnode() to discard the node.
2014-02-09 17:15:51 +00:00
dsl
2736f96cdb Add x86_stmxcsr for amd64. 2014-02-09 17:07:41 +00:00
chs
e5a75de98e account for the 16 bytes of AT_RANDOM data in the stack setup. fixes PR 48518.
use cprng_strong32() instead of random().  add AT_RANDOM support for linux32.
2014-02-09 16:41:42 +00:00
maxv
52673c8d59 Reorder code to avoid using an uninitialized variable: if
sysctl_copyin fails, 'tmp' is not initialized. This bug is
harmless since only the return value will be different;
it does not expose kernel memory unless diagnostic is enabled.

ok agc@ martin@
2014-02-09 14:51:13 +00:00
dsl
43beae7c02 Add compatibility for some userspace code (eg firefox) that seems to look
inside the ucontext structure passed to signal handlers to modify the
  xmm registers.
This should make the code compile - I'm not at all sure it works as expected,
  the interactions between FP and signal handlers aren't at all clear.
AFAICT the FP state is saved on the user stack when the handler is called,
  however the FP trap code can already done odd things to the FPU....
2014-02-09 14:44:42 +00:00
njoly
9d9871abbe Revert previous revision. It bkeaks profiling kernel builds.
LIBISPRIVATE unconditionnally set MKPROFILE to no, preventing
profiling kernel library.
2014-02-09 12:53:30 +00:00
njoly
3541adf977 Remove a few noisy debug printf. 2014-02-09 12:27:37 +00:00
dsl
36d637262e Add bit defs for more of the x87 status register. 2014-02-08 22:36:50 +00:00
rmind
8274d601f9 NPF: add support for static (stateless) NAT. 2014-02-07 23:45:22 +00:00
dsl
519a61193d Convert the amd64 build to use x86/cpu_extended_state.h so that the fpu
definitions match those of i386.
Mostly just structure and field renames, in addition:
1) process_xmm_to_s87() and process_s87_to_xmm() moved into
   x86/convert_xmm_s87.c so they can be used by amd64's netbsd32 code.
2) The linux signal code simplified to use a structure copy for ths fxsave
   data - it matches the hardware definition and won't change.
2014-02-07 22:40:22 +00:00
dsl
a3bf2d1fce Userspace (especially libkvm) build better is cpu_extended_state.h
is exported.
2014-02-07 21:52:46 +00:00
dsl
27a8f3e1e9 Move all the hardware register layout for the x86 cpus into a header
that can also be used by amd64.
Add in skeleton definitions for XSAVE and AVX.
Update some comments to match reality.
2014-02-07 19:36:15 +00:00
dsl
7cd0ae66b2 Remove the splurious check for EN_SW_DATACHAIN when looking at mxcsr traps.
The relevant bit is always masked out higher up.
The only place I can find a reference to a 'datachain' error is for the
  weitek 1167 fpu. Even the 8087 has the corresponding bit of the x87
  status reserved.
Quite why it has appeared here is anybodies guess.
2014-02-07 19:32:50 +00:00
msaitoh
1f7f7f0d8b Check _BYTE_ORDER. 2014-02-07 15:49:40 +00:00
hannken
97834f7ba0 Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.

Discussed on tech-kern@

Welcome to 6.99.31
2014-02-07 15:29:20 +00:00
hannken
f106eaceb6 Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.

Discussed on tech-kern@
2014-02-07 15:26:42 +00:00
msaitoh
62342f9d4d s/mesage/message/ 2014-02-07 11:51:00 +00:00
phx
f2a6e499cb Replaced enable/disable_intr by splhigh/splx. 2014-02-07 09:22:02 +00:00
phx
9f8b6ff2ae Remove enable_intr() and disable_intr(), which are unused. 2014-02-07 08:51:34 +00:00
joerg
2b03a8edfd Like amd64, use -msoft-float. 2014-02-07 00:25:45 +00:00
matt
bc6b9cafff If we just want _end, load it directly and skip the gp 2014-02-06 19:20:11 +00:00
christos
fc571bb579 fix the second copy of this file. XXX: merge them. 2014-02-06 18:45:35 +00:00
christos
de6d10c297 add missing prototype; remove names from args 2014-02-06 18:43:41 +00:00
hannken
b9c5e8c0f7 Remove an annoying printf. And to answer the question: VFS_VGET() gets
used by NFS V3 server for readdirplus.
2014-02-06 16:18:38 +00:00
msaitoh
ab7eb80a2f USE PCI_BAR[0-5]. Part of PR#48016. 2014-02-06 15:51:02 +00:00
hannken
59e42c388a Move fstrans_start()/fstrans_done() into genfs_insane_rename() to protect
the complete rename operation like we do for all other vnode operations.
2014-02-06 10:57:12 +00:00
riastradh
6c0ad81464 __HAVE_ATOMIC_AS_MEMBAR is spelled with two leading underscores.
This underscores the need to replace this error-prone cpp API by
unconditionally defined {pre,post}atomic_membar_*.

This change should only remove unnecessary membar_producers on x86.
2014-02-06 03:47:16 +00:00
rmind
ffcdc4af8d Add support for CDB based NPF tables. 2014-02-06 02:51:28 +00:00
dsl
17a304eec5 Apparantly clang doesn't like -mno-80387 or -mno-fp-ret-in-387
-msoft-float is equivalent to the former, the latter is probably unlikely
to stop anything not picked up elsewhere.
2014-02-05 23:10:41 +00:00
christos
9718726c93 fix incorrect variable; (hi matt) 2014-02-05 19:09:06 +00:00
christos
76c86da9ec make this compile. 2014-02-05 19:07:16 +00:00
christos
19629127f3 put back line accidentally deleted before (hi matt) 2014-02-05 19:03:45 +00:00
dsl
8c82df1430 Change the compiler options to explicitly specify:
-mno-mmx -mno-sse -mno-avx -mno-80387 -mno-fp-ret-in-387
Since no-sse implies no-sse2 that should ensure that the compiler really
  doesn't emit any instructions that might trap trying to use the FPU.
On amd64 at least some of those are needed to stop the compiler
  saving the registers to stack on every varargs function.
It might be that -mno-sse did that before.
2014-02-05 18:52:22 +00:00
matt
4b43c5a40c Add another set of parens 2014-02-05 01:59:58 +00:00
matt
bfd343aba6 mask the shift by __n with NBBY*sizeof(uintmax-t)-1
to suppress the following diagnostic from clang:
error: shift count >= width of type [-Werror,-Wshift-count-overflow]
    PAR_ATTR            = __BITS(63,56),// F=0 memory attributes
                          ^~~~~~~~~~~~~
src/sys/sys/cdefs.h:554:4: note: expanded from macro '__BITS'
        ((__BIT(MAX((__m), (__n)) + 1) - 1) ^ (__BIT(MIN((__m), (__n))) - 1))
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/sys/sys/cdefs.h:550:73: note: expanded from macro '__BIT'
    (((uintmax_t)(__n) >= NBBY * sizeof(uintmax_t)) ? 0 : ((uintmax_t)1 << (uintmax_t)(__n)))
                                                                        ^  ~~~~~~~~~~~~~~~~
2014-02-05 00:18:09 +00:00
dsl
5e9aed4314 Now that the sv_xmm and sv_87 fields in the pcb are the same size as the
hardware ones, and those in the mcontext, ptrace and core files we
  can really safely cast and copy between the types.
Remove a couple of temporary buffers and add CTASSERT()s that the sizes
  do actually match.
2014-02-04 22:48:26 +00:00
dsl
f0aa8ebfcc Remove the fields from 'struct save87' and 'struct fxsave' that were used
to save the control word and tag word on fp faults.
Nothing I could find looked at them before I removed the code that wrote them.
It might appear that these fields got exported to userspace (via mcontext),
  but that code carefully avoided those fields.
I've also deleted some very historic fields from the union inside __fpregset_t
  this doesn't affect its size.
The __fpregset_t fields are now the same size as the ones in the pcb.
Which is good because they get cast to each other in a few places.
2014-02-04 22:21:35 +00:00
dsl
b2f9af25a4 There is no need to check for recursive calls into fpudna().
Rename the associated ci_fpsaving field to 'unused'.
I'm not sure they could ever happen, you could get unwanted calls into
  the fpu trap code while saving state when using INT13 - but these are
  different.
The return value from the i386 fpudna() was always 1 - possibly a historic
  relic of the kernel fp emulation. Remove and don't check in trap.S.
The amd64 and i386 fpudna() code is now almost identical.
2014-02-04 21:09:23 +00:00
matt
6c558ed386 _setsoftintr is long dead. reap any leftovers from arm. 2014-02-04 18:51:16 +00:00
pgoyette
f496b70ec7 Undo previous - it still needs a lot more work.
For now, we'll use the hand-crafted cf* structures and directly
call all the config routines.
2014-02-03 23:11:40 +00:00
dsl
27e029a426 Since we always run with CR0.NE set (internal fpu using vector 0x10)
npxintr() is only generated when a process executes an FP instruction
and the TS set interrupt takes precedence - so we know the current lwp
owns the fp registers.
It is also then impossible to get a splurious error while saving
the registers.
Ths lets the npxintr() code be simplified somewhat.
XXX: I'm not at all sure it really DTRT if the process actually wished
to fixup anything in the signal handler (or even if the signal is masked).
2014-02-03 23:00:32 +00:00
matt
ecd212e672 Provide a simple version of _bus_dmamap_load_raw. If each segments can
be mapped by XKPHYS/KSEGn, then the load will succeed.  If it would
require a bounce buffer or being mapped into the kernel's address space,
the load will fail.
2014-02-03 19:18:59 +00:00
manu
f59b4d840e Properly translate struct swapent for COMPAT_NETBSD32 (missing commit) 2014-02-03 17:03:16 +00:00
manu
d7670a176d Properly translate struct swapent for COMPAT_NETBSD32 2014-02-03 13:20:20 +00:00
msaitoh
3443d04260 Carefully set IFF_OACTIVE in mvgbe_start(). Even if mvgbe_encap()
returns other than 0, the TX ring might not full. Check whether
the TX ring has one or more packets. If the ring is empty,
dont' set IFF_OACTIVE because an TX complete interrupt never
occur and IFF_OACTIVE flags is left. The interface's timer
isn't reset, so a device timeout desn't occur.

 Fixes a bug that IFF_OACTIVE flag is left on heavy load.
Part of PR#48568.
2014-02-03 05:56:23 +00:00
dsl
52252605c4 Minor fpu initialisation cleanups:
Set default CR) so that the FPU is enabled (unset CR0_EM) and initialise
  i386_fpu_present to 1.
No need to call the npx trap indirectly, rename to fpunda() to match amd64.
Remove the i386_fpu_exception variable and sysctl (It used to indicate
  which irq was used for fpu exceptions, but we only support 'internal'
  now).  Hopefully no one cares.
fpuinit() now only needs to clear TS before the fninit(). Apart from the
  checks for 486SX and the 'fdiv bug' this matches the amd64 version.
Exclude fpuinit() from XEN kernels, they don't call it - which rather begs
  the question as to whether it is needed at all!
2014-02-02 22:41:20 +00:00
tsutsui
11a902922e Misc cleanup of sio drivers.
- register softc of child devices as an argument of the sio interrupt
  handler to avoid device_lookup_private() calls on every interrupt
- change type of sc_reg from (void *) to (struct sioreg *)
  to avoid weird address offset calculations with redundant casts
- rename struct sio_softc members for consistency
- use a channel number passed via sio_attach_args in lunaws_attach()

No functional chnages.  Tested on LUNA.
2014-02-02 15:35:06 +00:00
martin
65095476e3 Cosmetics: return is an operator, not a function: remove (). 2014-02-02 14:50:46 +00:00
martin
2934fa70dc Limit the amount of kernel memory a posix_spawn syscall can use (for handling
the file action list) by limiting the maximum number of file actions to
twice the current file descriptor limit.
Fix a few bugs in the support functions and document the new limit.
From Maxime Villard.
2014-02-02 14:48:57 +00:00
dogcow
437b1ce30d Delete duplicate symbol definition introduced in 1.371. Now builds again. 2014-02-02 08:25:23 +00:00
manu
70aead41ff Add EMUL_NATIVEROOT so that native binaries can be told to search an
"emulation" directory before the real root. This makes easier to test
an amd64 kernel on the top of an i386 root filesystem prior a full
migration.
2014-02-02 04:28:42 +00:00
bouyer
454d551267 Revert previous: calling fpuinit() leads to a panic, as a domU is not
allowed to manipulate cr0 directly. Xen doesn't need this, the fpu is
handled by the hypervisor.
2014-02-01 20:07:07 +00:00
bouyer
6d602218df Stopgap measure: set i386_fpu_present to 1 for XEN.
Stop a stream of
npxintr: came from nowherenpxintr: l = 0xc17ba560, curproc = 0xc177d880, fpu_present = 0
when running some ATF tests:
http://www-soc.lip6.fr/~bouyer/NetBSD-tests/xen/HEAD/i386/201401300920Z_anita.txt

XXX this is probably still broken for native i386, at last for older CPUs.
It looks like on newer CPUs (such as the one emulated by qemu) this code path
is not used.
2014-02-01 18:57:38 +00:00
dsl
cd7408c584 Add a direct call to fpuinit().
I'm not sure this is architecturally the best place, but I think it
  is where npxattach() used to get called.
Might fix FP support in domu
2014-02-01 17:48:04 +00:00
nakayama
c7c583d9f6 Make sljit usable on sparc64 32-bit kernels. 2014-02-01 17:01:35 +00:00
matt
a5e6c1dbae All EXT_EXP defines must be conditionized. Back out previous change which
removed that.
2014-02-01 16:39:52 +00:00
matt
6b4f5dd53c Export __HAVE_LONG_DOUBLE 128 to kernel for emulation 2014-02-01 16:10:12 +00:00
matt
450a706e69 Move wrongly placed ifdef. 2014-02-01 15:40:14 +00:00
nakayama
6194e0bc7e Follow rev. 1.54, 1.55 of libexec/ld.elf_so/arch/sparc64/mdreloc.c. 2014-02-01 11:19:04 +00:00
martin
5693dcbe9d Make the constants describing extended format available even if we do
not have long doubles.
This fixes the sparc kernel build (which uses the constants in FPU emulation
code).
2014-02-01 10:41:38 +00:00
matt
1534bdf9f1 Fix definition of SYCALL_ARG_PTR
Add SYCALL_ARG_PTR_P(sy)
2014-02-01 09:04:57 +00:00
skrll
e0899599d2 Deal with unaligned DIR32 relocs as found in debug information. 2014-02-01 08:05:51 +00:00
matt
facaf3318b Only define ieee_ext_u of __HAVE_LONG_DOUBLE == 128 2014-02-01 01:34:01 +00:00
joerg
26a56fe004 Typos. 2014-02-01 01:19:50 +00:00
joerg
bf8648a7af Fix RCS ID. 2014-02-01 01:19:22 +00:00
joerg
d071de0b20 Be nice to LLVM and use an explicit immediate. 2014-02-01 01:18:57 +00:00
matt
71354d0641 Fix __HAVE_LONG_DOUBLE tests 2014-02-01 01:12:28 +00:00
tsutsui
fe4bb79f58 Make sure to define NOMAN before including <bsd.own.mk>. 2014-01-31 19:38:48 +00:00
matt
4d035bbcf3 Consolidate the 128-bit long double defintions to <sys/ieee754.h>
Each arch that uses it now defines __HAVE_LONG_DOUBLE to 128.
<machine/ieee.h> is now just include the machine's math.h followed
by <sys/ieee754.h>
2014-01-31 19:38:06 +00:00
tsutsui
1ee00af75d Workaround weird "nbmake[8]: Graph cycles through `clean'" errors. 2014-01-31 19:25:13 +00:00
tsutsui
b51976e023 defined(LKM) -> defined(MODULAR) 2014-01-31 18:49:35 +00:00
tsutsui
2ea76048e0 Fix build botched in previous.
Christos, please at least compile before commit per the guideline.
2014-01-31 18:42:45 +00:00
tsutsui
4fe67db97f Move the startup routine to the beginning of the source as other m68k ports.
No particular comments on port-x68k@.
2014-01-31 18:24:03 +00:00
pgoyette
a9062aa8b9 Use ioconf file to generate config data structures 2014-01-31 18:13:01 +00:00
pgoyette
a5060d0c64 Provide ioconf file to generate config data structures 2014-01-31 18:12:15 +00:00
pgoyette
ece0adc8d2 Replace home-grown config with standardized calls to
config_{init,fini}_component()
2014-01-31 18:11:32 +00:00
tsutsui
b4c7a4b6d3 Add WSDISPLAYIO_LINEBYTES ioctl (for Xorg wsfb driver). 2014-01-31 15:43:06 +00:00
tsutsui
cb67d0de19 Remove unnecessary #if 1/#endif. 2014-01-31 15:41:48 +00:00
matt
a755a7b9d6 Add inclusion protection.
Convert to ieee_ext to use uint64_t
Format uses implicit NBIT
2014-01-31 12:40:37 +00:00
matt
773a94325e Convert to uint64_t 2014-01-31 11:53:37 +00:00
matt
892b5e0070 Fix the naked char __INT8_TYPE__ and unsigned char case. 2014-01-31 11:37:13 +00:00
bouyer
cf5eda804a Move back call to pci_mode_detect() outside of #ifdef PCI_BUS_FIXUP.
Even if mode is not used, the call to pci_mode_detect() is mandatory to
initialize the PCI subsystem.
Fix "panic booting -current DOM0" reported by Patrick Welche on port-xen.
2014-01-31 10:37:01 +00:00
ryo
cdba191304 fix a problem to set sample rate of AC97 codec. 2014-01-31 08:38:13 +00:00
skrll
cb78453456 More symbols 2014-01-31 08:18:03 +00:00
matt
5d3d9da11e Put EHABI exception tables at the end of text.
provide __exidx_start and __exidx_end symbols.
2014-01-30 15:36:43 +00:00
martin
efe0246c05 Add missing cast (to make it compilable) 2014-01-30 13:04:06 +00:00
matt
89ee722ced ldrht is v6t2 or later so use ldrt and extract the right halfword. 2014-01-30 06:38:00 +00:00
matt
d123bcb0aa Print uboot_args using PRIxPTR 2014-01-30 00:08:46 +00:00
matt
690b8e3cf4 For BE kernels, pass --be8 to the linker 2014-01-30 00:07:35 +00:00
matt
549dd66052 Deal with the case when __UINT<N>_TYPE__ is defined as well
__INT<N>_TYPE__ is defined.  We make the assumption that if the former is
defined, the latter is also defined.
2014-01-29 23:47:35 +00:00
joerg
720b2586bd Include compiler-rt in libc, libm and libkern. 2014-01-29 23:37:18 +00:00