Commit Graph

1111 Commits

Author SHA1 Message Date
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
rmind
5c68e5d0ee Ephemeral mapping (emap) implementation. Concept is based on the idea that
activity of other threads will perform the TLB flush for the processes using
emap as a side effect.  To track that, global and per-CPU generation numbers
are used.  This idea was suggested by Andrew Doran; various improvements to
it by me.  Notes:

- For now, zero-copy on pipe is not yet enabled.
- TCP socket code would likely need more work.
- Additional UVM loaning improvements are needed.

Proposed on <tech-kern>, silence there.
Quickly reviewed by <ad>.
2009-06-28 15:18:50 +00:00
bouyer
3ac2dfe9bf Split mc146818-related functions from clock.c into rtc.c.
Call rtc_set_ymdhms() from xen/xen/clock.c:xen_rtc_set() for xen3 dom0
kernels as the Xen3 hypervisor doesn't write the new date/time to the CMOS
by itself.
Now a XEN3_DOM0 kernel properly updates the CMOS time.
2009-06-16 21:05:33 +00:00
tsutsui
9c2e10416b Apply fixes from jmcneill@ for PR port-i386/38729
(ACPI kernel booted under qemu cannot detect devices):
- make MP SCANPCI function for ACPI_SCANPCI and MPBIOS_SCANPCI
  return a number of attached PCI busses
- if no valid PCI busses are attached in the MP SCANPCI function,
  try to probe and attach pci0 at mainbus as well as kernels
  with no SCANPCI options

"Feel free to check it in" from jmcneill@.
Tested in pkgsrc qemu-0.9.1 (both i386 and x86_64) on NetBSD/i386.

Note original jmcneill's patch was posted on March:
http://mail-index.NetBSD.org/port-i386/2009/03/24/msg001281.html
and I also applied it to amd64:
http://mail-index.NetBSD.org/port-i386/2009/03/24/msg001283.html
but x86 MP attach functions have been reorganized by dyoung@ on April:
http://mail-index.NetBSD.org/source-changes/2009/04/17/msg219992.html
so I've modified the original patches to adapt the changes.
(mpacpi_scan_pci() and mpbios_scan_pci() have been merged into
 common mp_pci_scan() in new arch/x86/x86/mp.c)
For netbsd-5 and netbsd-5-0 branches, the original patches should be
applied cleanly, and they have been tested by abs@ on a selection of
i386 boxes and in qemu.
2009-06-13 13:35:11 +00:00
skrll
e03976623a Add TLS relocation definitions. 2009-05-30 05:56:52 +00:00
christos
5ea3c00ef0 add uhmodem, uncomment wd* at umass 2009-05-22 18:57:40 +00:00
cegger
d5ffe84070 KNF, same object code generated 2009-05-16 07:46:45 +00:00
joerg
5cef834a23 Add commented out hpet@ichlpcib entry. 2009-04-27 12:02:10 +00:00
ad
97a4cbf1a7 .long -> .quad 2009-04-24 18:26:51 +00:00
ad
c28dc6f757 A workaround for a bug with some Opteron revisions where locked operations
sometimes do not serve as memory barriers, allowing memory references to
bleed outside of critical sections.  It's possible that this is the
reason for pkgbuild's longstanding crashiness.

This is not complete (atomic ops need some work too).
2009-04-24 17:45:40 +00:00
nonaka
e0297d1ead Added SD/MMC support from OpenBSD.
tested on i386, amd64 at current-users ML by pgoyette@.
tested on zaurus by myself.
2009-04-21 03:00:29 +00:00
cegger
5fcb12705d add age(4) 2009-04-20 20:50:37 +00:00
cegger
327f4a8c43 add ale(4) 2009-04-20 20:49:21 +00:00
ad
4d8f47ae2f cpuctl:
- Add interrupt shielding (direct hardware interrupts away from the
  specified CPUs). Not documented just yet but will be soon.

- Redo /dev/cpu time_t compat so no kernel changes are needed.

x86:

- Make intr_establish, intr_disestablish safe to use when !cold.

- Distribute hardware interrupts among the CPUs, instead of directing
  everything to the boot CPU.

- Add MD code for interrupt sheilding. This works in most cases but there is
  a bug where delivery is not accepted by an LAPIC after redistribution. It
  also needs re-balancing to make things fair after interrupts are turned
  back on for a CPU.
2009-04-19 14:11:36 +00:00
dyoung
c94ffba5d6 Introduce sys/arch/x86/x86/mp.c for common x86 MP configuration code.
mpacpi_scan_pci() and mpbios_scan_pci() are identical code, so replace
them with mp_pci_scan().

Introduce mp_pci_childdetached(), which helps us to detach root PCI
buses that were enumerated either by MP BIOS or by ACPI.

Let us detach and re-attach PCI buses from mainbus0 on i386.  This is
necessarily a work-in-progress, because testing detach and re-attach
is very difficult: to detach and re-attach the entire PCI tree on most
x86 computers that I own is not possible because some essential device
attaches under the PCI subtree: the console, com0, NIC, or storage
controller always attaches in the PCI tree.
2009-04-17 21:07:58 +00:00
rmind
3de18e79b4 - Add macros to handle (some) trapframe registers for common x86 code.
- Merge i386 and amd64 syscall.c into x86.  No functional changes intended.

Proposed on (port-i386 & port-amd64).  Unfortunately, I cannot merge these
lists into the single port-x86. :(
2009-04-16 15:34:23 +00:00
perry
ce40f4f667 add (commented out) options LOCKDEBUG 2009-04-10 23:01:46 +00:00
tsutsui
0f22466110 Use #define<tab> consistently. 2009-04-05 00:57:56 +00:00
tsutsui
47fb91c8ba Remove __HAVE_UFS2_BOOT since it belongs to sysinst for now.
"Feel free to change it" by ad@.
2009-04-05 00:54:21 +00:00
ad
95e4ccac55 +__HAVE_UFS2_BOOT 2009-04-04 10:36:08 +00:00
enami
09fcc8b316 So that profile kernel runs again,
- Adjust the size of functions used to patch.
- Fix the jump offset of mcount call when patching functions.

Approved by Andrew Doran.
2009-04-02 00:19:02 +00:00
rmind
44170e3c3a Merge i386 and amd64 ipifuncs.c into x86. No functional changes intended.
XXX: fpu #ifdefs are ugly (should be revisited at some point).
2009-03-30 22:28:39 +00:00
rmind
70456c4d9e Merge i386 and amd64 vm_machdep.c into x86. No functional changes intended.
Note: some #ifdefs will be removed with macros.
2009-03-30 22:20:55 +00:00
rmind
74a033c8eb Merge/move core_machdep.c into x86, no difference between i386 and amd64. 2009-03-30 22:13:42 +00:00
ad
ead83a47c8 _lwp_setprivate: provide the value to MD code if a hook is present.
This will be used to support TLS. The MD method must match the ELF TLS spec
for that CPU architecture (if there is a spec).

At this time it is only implemented for i386, where it means setting the
per-thread base address for %gs. Please implement this for your platform!
2009-03-29 09:24:52 +00:00
rmind
a3e23c67f6 Reduce some differences between i386 and amd64.
Mainly cosmetical changes - no functional changes intended.
2009-03-29 01:10:28 +00:00
rmind
ee70d529c3 Change amd64 fault handler to check instruction pointer for copyin/out et al
functions, like in i386.  Avoids setting pcb_onfault, saves few instructions.
2009-03-28 22:56:19 +00:00
rmind
1ce95d231e x86_64_ipi_halt: unset CPU as running (sync with i386). 2009-03-28 22:03:27 +00:00
rmind
0d4fdf8b96 kvtop: change return type to paddr_t. 2009-03-28 21:34:17 +00:00