Commit Graph

1139 Commits

Author SHA1 Message Date
rmind
ce313d4fb1 Replace l_addr with uvm_lwp_getuarea() in various MD code, mostly cpu_lwp_fork(). 2009-11-29 04:15:42 +00:00
pooka
972900e4ca Move -mcmodel=kernel CFLAGS from bsd.klinks.mk to amd64/include/Makefile.inc
to avoid having the kernel toolchain flags split over a billion different
files.
2009-11-27 13:50:29 +00:00
rmind
3f18fe8123 - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places.  Reduce sys/user.h inclusions.
2009-11-27 03:23:03 +00:00
matt
11af2f9cfa Kill proc0paddr. Use lwp0.l_addr instead. 2009-11-26 00:19:11 +00:00
tron
7395068839 Enable SSP (Stack Smash Protection) in x86 kernels by default (except
in i386 *TINY kernels). The NetBSD/i386 "ALL" kernel is unconditionally
compiled with SSP enabled.

Change approved by the core team.
2009-11-25 17:08:08 +00:00
rmind
9303fb5a00 Remove IPL_LPT and IPL_IPI aliases, use the actual IPLs.
Fix some broken comments.
2009-11-25 14:28:49 +00:00
pooka
09dbb89b44 If cpu_disklabel includes struct dkbad, define __HAVE_DISKLABEL_DKBAD.
This allows use of subr_disk_mbr on all archs.  Default to it for
the rump disk component.  No functional change for regular kernels.
(The other option would've been to include dkbad in disklabels
everywhere, but arguably this approach has less possible side-effects,
especially given that wedges and related magic will take over the
world any second now).
2009-11-23 13:40:08 +00:00
bouyer
e0e426bb85 For amd64, introduce a third free list distinct from the default free list
for memory between 16M and 4G. On large memory machine, this avoids
the 32bit-accessible memory being eaten by various kernel early allocation,
causing 32bit bus_dma(9) memory allocation to fail at boot time.
Tested on a system with 48GB RAM; based on netbsd-5 patch proposed on
port-amd64 3 days ago.
2009-11-22 21:41:03 +00:00
rmind
3c2bd91e81 Use lwp_getpcb() on x86 MD code, clean from struct user usage. 2009-11-21 03:11:00 +00:00
dholland
470c8bf181 Declare trap name array as extern const char *const [] to match how
it's defined in trap.c. (Should really be in a header, of course.)
Compile-tested.
2009-11-15 18:41:31 +00:00
dsl
659c7fee7d tlbstate is 'int', so use 'cmpl' not 'cmpq'.
Fixes gprof on amd64 PR/40960.
2009-11-13 22:49:46 +00:00
haad
dd6f356cec Reert change which was not meant to be comitted. 2009-11-11 23:59:36 +00:00
haad
14ad4d5b1e Build kernel modules with -mno-red-zone like kernel is build. This fixes
frequent panics in amd64 zfs module. This should also fix problem reported
by Nicolas Joly in:

http://mail-index.netbsd.org/port-amd64/2008/12/09/msg000646.html

Thanks to cube@ for his help with this.
2009-11-11 23:53:38 +00:00
cegger
9480c51b04 Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
2009-11-07 07:27:40 +00:00
rmind
0d5ca7ed05 Make pcb_ldt_sel, in amd64, an unused field. Unlike in i386, it was
missed during clean-up of LDT handling.
2009-10-27 03:05:27 +00:00
rmind
40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
bouyer
6d07b400dc Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
2009-10-19 18:41:07 +00:00
snj
065c5ae0d0 Move Matthias Pfaller's files to 2-clause license. OK matthias@. 2009-10-18 18:13:59 +00:00
rmind
b619d660f4 Remove X86_IPI_WRITE_MSR (and msr_ipifuncs.c), replace all uses in drivers
with xc_broadcast().  AMD K8 PowerNow driver tested by <jakllsch>, thanks!

Closes PR/37665.
2009-10-05 23:59:30 +00:00
jmcneill
23e8227b7c PR# kern/42139: ACPI WMI: new driver
Import acpiwmi(4) from Jukka Ruohonen. From the PR:

Attached is a driver that implements ACPI WMI API:

http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx

The WMI is used to provide a generic interface for OEMs to use certain
platform/laptop-specific additions to the standard ACPI in a somewhat
portable way. These can be hotkeys for additional buttons, different event
handlers (wireless kill switch, lid switch, etc.), and so on. At least HP
and Acer use it by default nowadays.

The benefit of this interface would be portability. For an example, instead
of hpqlb(4) that works only with certain HP models, we could have a generic
HP WMI-driver that should work in theory across all HP laptops. On many new
laptops WMI may also be the only way to access laptop/manufacturer-specific
features.
2009-10-02 16:47:52 +00:00
skrll
980b1066f3 It's -z max-page-size, not -z maxpagesize. 2009-10-02 10:14:20 +00:00
skrll
1521a0436b MAXPAGESIZE got bumped to 0x200000. Use -z maxpagesize=0x100000 until
someone(tm) decides that kernels should have that alignment, etc.
2009-10-01 09:15:19 +00:00
skrll
a5f3419efe Fix up mwait/monitor now that gas has been fixed. 2009-10-01 09:13:54 +00:00
jmcneill
c05491c171 Need sdmmc* at wb? 2009-09-30 22:19:00 +00:00
jmcneill
e7a9e26c28 wss@acpi doesn't make much sense on amd64, so remove it 2009-09-30 20:49:07 +00:00
jmcneill
beb3879990 add and enable wb(4) 2009-09-30 20:47:09 +00:00
mlelstv
f4d53c7199 Ensure FP state is reset, if FP is used in a signal handler.
Fixes PR kern/39299 for 32bit code.
2009-09-25 13:56:32 +00:00
christos
68b7139cf2 add toshide 2009-09-20 01:14:31 +00:00
jmcneill
68aba25e22 Switch on hdaudio(4) 2009-09-07 22:59:09 +00:00
jmcneill
ad5f1845fb Refer to hdaudio as 'High Definition Audio', not
'Intel High Definition Audio' as many vendors implement the HD audio spec.
2009-09-07 10:40:54 +00:00
sborrill
b88195cfa1 hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio*	at pci? dev ? function ?
hdafg*		at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio
2009-09-06 17:25:55 +00:00
jmcneill
dd324f8480 Add definition for WAKEUP_vesa_modenum 2009-08-24 22:06:50 +00:00
jmcneill
e1f4092924 Ensure that the VBE mode is only restored when machdep.acpi_vbios_reset=1 2009-08-24 10:16:12 +00:00
jmcneill
b585cf85b2 Pass the VBE mode number from the bootloader to the kernel, and then
make the ACPI wakecode aware of it. Restore the desired VBE mode on resume
when acpi_vbios_reset=1, so suspend/resume with genfb console will work.
2009-08-24 02:15:46 +00:00
jmcneill
b0fb7abfad Switch to ACPICA 20090730, and update for API changes. 2009-08-18 16:41:02 +00:00
pgoyette
f6f3b4be8a Repair more fallout from the exec_aout.h change.
No guarantee that these are the "right" things to do, but they do allow
building of port-amd64 again.
2009-08-16 17:12:47 +00:00
yamt
5fa695e8c1 reduce differences between x86 ports. 2009-08-16 11:04:48 +00:00
matt
209a0b42e3 Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
do it for us.
2009-08-15 23:44:57 +00:00
christos
9d70e21035 put back drm. 2009-08-09 21:32:16 +00:00
christos
c0dd0d68ac remove drm stuff for now 2009-08-09 20:27:06 +00:00
christos
8ae4a49631 add spic and drm to generic 2009-08-09 19:37:35 +00:00
jym
bba2c41d59 Add Intel SpeedStep and AMD PowerNow! support in Xen dom0. MSR operations
are now compiled in by default.

Note that MSR support in Xen depends on its version. rdmsr() should always
succeed, but wrmsr() to certain registers can end in a NOOP. In that case,
the error will be logged (see xm dmesg).

Setting CPU frequency (SpeedStep) requires Xen 3.3 with the option
cpufreq="dom0-kernel" passed down to hypervisor during boot.

Compiled and tested for SpeedStep under i386 for XEN3_DOM0 and XEN3PAE_DOM0
by jym@. amd64 was tested by Joel Carnat.

See also http://mail-index.netbsd.org/port-xen/2009/08/02/msg005213.html .

Commit requested by bouyer@.
2009-08-05 20:15:36 +00:00
rmind
cbc808fd9c Reduce the difference between i386 and amd64 trap handler.
No functional changes intended.
2009-07-29 18:47:15 +00:00
rmind
4992872919 T_ASTFLT|T_USER: check for LP_OWEUPC in l_lpflag, not l_flag. Also, flag
unset was on p->p_flag.  Luckily, it did not corrupt the p_flag, because
we don't have LW_ flag matching LP_OWEUPC.
2009-07-29 17:14:38 +00:00
cegger
3518084fc6 remove Xen2 support.
ok bouyer@
2009-07-29 12:02:05 +00:00
kiyohara
ce1343fcd9 Support Marvell Hercules-I/II SATA Controllers. 2009-07-27 12:34:12 +00:00
kiyohara
1f46950ef0 Support siisata@cardbus.
It tested on amd64 and i386 only.
2009-07-19 06:28:08 +00:00
christos
ba603ac79f a little more diagnostic 2009-07-16 14:21:12 +00:00
christos
6a588dd8e6 handle protection fault properly. 2009-07-16 14:18:09 +00:00
rmind
3cee4be877 - Fix rare crashe in the intr_lapic_tlb_bcast() handler: save and setup
%fs on i386, %gs on amd64 registers, before using them.  Otherwise, it
  might be invalid/garbage, eg. IPI can interrupt userspace.

- Explicitly initialize per-CPU emap generation number.

Thanks <drochner> for reporting and testing of patch.
2009-07-09 21:43:16 +00:00