Commit Graph

49595 Commits

Author SHA1 Message Date
cegger
ebceae53e5 ansify function definitions 2009-03-15 22:20:09 +00:00
cegger
164477c65a ansify function definitions 2009-03-15 22:16:09 +00:00
cegger
dc56dbbd97 ansify function definitions 2009-03-15 21:23:31 +00:00
cegger
f7d20361b0 ansify function definitions 2009-03-15 15:40:33 +00:00
tsutsui
312e117cb9 - use <bsd.klinks.mk> to create MD include dir symlinks
- make sure to remove lib subdirs on clean and distclean target
2009-03-15 15:20:12 +00:00
tsutsui
d1ea7a31ca Use <bsd.klinks.mk> to create MD include dir symlinks. 2009-03-15 14:54:24 +00:00
cegger
5c4da6d6bc ansify function definitions 2009-03-15 14:21:48 +00:00
tsutsui
1440fadbfd Use <bsd.klinks.mk> to create MD include dir symlinks. 2009-03-15 14:08:17 +00:00
tsutsui
b5ab529dae Use <bsd.klinks.mk> to create MD include dir symlinks. 2009-03-15 13:57:57 +00:00
tsutsui
b8675b75eb Use <bsd.klinks.mk> to create MD include dir symlinks. 2009-03-15 11:45:30 +00:00
tsutsui
e11af9c1e6 Use <bsd.klinks.mk> for MD include dir symlinks. 2009-03-15 10:47:59 +00:00
tsutsui
28b5d3e561 - create symlinks for MD system headers by <bsd.klinks.mk>
- suppress warnings on build without DESTDIR
2009-03-15 08:52:46 +00:00
tsutsui
7b7719bb1f - use <bsd.klinks.mk> to create symlinks to MD system header directories
- suppress warnings on build without DESTDIR
2009-03-15 06:17:02 +00:00
tsutsui
2ba9ae83e1 Use <bsd.klinks.mk> to create symlinks to MD system header directories. 2009-03-15 06:04:02 +00:00
tsutsui
216a370b45 Make sure to create i386 symlink on more generic targets. 2009-03-15 05:45:32 +00:00
nonaka
34b391d563 avoid assertion. 2009-03-15 02:23:52 +00:00
dsl
82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
dsl
454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
dsl
02cdf4d2c8 Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
2009-03-14 14:45:51 +00:00
jmcneill
3e9233f0fe Add acpi_md_OsEnableInterrupt, to go with acpi_md_OsDisableInterrupt 2009-03-14 13:54:28 +00:00
bouyer
c27d58c8b1 Keep the BIOS-configured interrupt number if intr_find_mpmapping() doesn't
return a APIC_INT_VIA_APIC pirq.
Problem debugged and patch tested by jym@
2009-03-13 20:19:56 +00:00
abs
072d8cc491 Use separate free lists for TT and ST ram, and give TT a lower id
so all TT ram will be used before any ST ram. (free_list param to
uvm_page_physload())
Tested on a TT with and without TT ram.
2009-03-13 19:08:20 +00:00
nonaka
a3bafaad7a zaudio(4) works now. 2009-03-13 13:55:18 +00:00
yamt
e5b76680cb tprof_amdpmi_start_cpu: PESR_COUNTER_MASK=0 for simplicity.
(my understanding of the value is that 0 and 1 mean the same thing.)
2009-03-13 11:10:20 +00:00
yamt
a67bd192f6 tprof_pmi_start_cpu: replace magic numbers with a macro. 2009-03-13 11:07:54 +00:00
abs
f681b265bc Prefer MACHINE_ARCH to MACHINE in some tests 2009-03-12 17:16:58 +00:00
cegger
960d9f288f - beautify dmesg
- print family id if not supported
spotted by jmcneill@
2009-03-12 14:24:17 +00:00
msaitoh
507aaf9eef Add rnd stuff. 2009-03-12 13:15:13 +00:00
yamt
2130617c71 a tprof backend which uses amd perfctr interrupt. 2009-03-12 12:08:17 +00:00
yamt
633a4a3ae1 add definitions for SVM features. 2009-03-12 09:08:40 +00:00
yamt
3a1d77bf94 comments 2009-03-12 09:07:29 +00:00
yamt
31d6880c49 s/__amd64__/__x86_64__/ as it's processor dependent.
suggested by matthew green on source-changes-d@.
2009-03-12 01:55:50 +00:00
yamt
b385d85bc6 test a correct macro. amd64 -> __amd64__ 2009-03-12 01:42:35 +00:00
msaitoh
227ae4c962 Bug fixes phase5.
- Catch NPE_NOTIFYMACRECOVERYDONE from NPE, reset MAC and send
   NPE_MACRECOVERYSTART to NPE. This sequence is very important :-|
   (It's easy to reproduce)

 - Don't call tsleep() in interrupt context.

 - Add randomness of the transmit deferwhen a collision occured (like CSR)

 - fix DPRINTFn() in npe_cpu_reset()
2009-03-11 16:30:20 +00:00
msaitoh
273cfb2789 Make MII stuff more generic.
Use macro.
2009-03-11 14:51:19 +00:00
yamt
0bbefb72ab fix breakage where db_regs_t != trapframe.
the problem pointed out by Martin Husemann on tech-kern@.
2009-03-11 13:48:47 +00:00
msaitoh
b9c2a5054c Read MAC address register before reset (to get IPL(e.g. redboot)'s setting). 2009-03-11 13:20:30 +00:00
nonaka
16877da791 check pmap_enter() return value. 2009-03-11 13:05:05 +00:00
msaitoh
816cf5b87a Bug fixes phase 3 (and one enhancement).
- fix if_init(), if_stop(), if_start() and ifioctl().
   Some of these bugfixes are required to use multicast filter's fix(rev. 1.11)

 - Prevent linkdown when only the promisc flag changed.
2009-03-11 12:16:12 +00:00
msaitoh
a69b43fe31 Change TX threshold from 0x08 to 0x18. This value is the same as CSR 2.4.
Use macro.
2009-03-11 11:36:33 +00:00
cegger
c920c4baa3 use paddr_t for physical addresses. u_long may not be large enough. 2009-03-11 10:30:52 +00:00
nonaka
2dfa5fff78 collect same processing. 2009-03-11 09:10:39 +00:00
nonaka
04bd9a8218 fix typo. 2009-03-11 09:04:50 +00:00
nonaka
a17a94caeb Reports the residual quantity of the battery in detail. 2009-03-11 09:04:31 +00:00
nonaka
15d23a2f88 Added kloader support. 2009-03-11 09:02:04 +00:00
yamt
aa75a65af2 add a missing _KERNEL_OPT ifdef. 2009-03-11 04:16:43 +00:00
yamt
2f719ad315 wrap opt_* includes with _KERNEL_OPT.
(i forgot to commit this with the tprof modules yesterday.)
2009-03-11 03:34:43 +00:00
martin
66170437ce Work in progress from a colaborative effort of mrg and me (all bugs are
mine) - not quite working, but improves the situation for non-MULTIPROCESSOR
kernels (makes LOCKDEBUG kernels work) and does not make SMP kernels worse:

Rearange cpu_info access and hide the actual implementation of the mapping
from all parts of the code that do not directly deal with it. Do the
mapping early in pmap_bootstrap, so that post-vmlocking2 kernels have
a chance to work.

The actual mapping of the cpus array for SMP kernels has to be fixed still,
but both mrg and me ran out of time and this lay around in our trees far
too long.
2009-03-10 23:58:20 +00:00
bouyer
f5f016d356 More i386PAE fixes:
- x86_round_page, x86_trunc_page, x86_btop and x86_ptob macros are used with
  physical addresses; cast to paddr_t instead of u_long. Issue pointed out
  by jym@
- machine_to_phys_mapping[] is a long. This is fine as it holds page
  frame numbers (and this fits in a 32bit int as physical addresses are
  only 36bits), but cast to paddr_t before << PAGE_SHIFT
- xen_start_info.store_mfn is a long; cast it to paddr_t before << PAGE_SHIFT.
  should fix issue pointed out by cegger@
2009-03-10 20:05:30 +00:00
bouyer
f6fc3b0ebe physical addresses may not fit in u_long, use paddr_t 2009-03-10 18:56:18 +00:00
bouyer
5d84b92a6d When ioapic is used, for ISA interrupts, reuse the legacy ISA interrupt
number instead of allocating a new one. Force allocating a new interrupt number
for PCI devices, as the number stored in the PCI interrupt register
may be wrong.
This should help using a pciide controller in compat mode or ISA devices
in a non-0 domain.
2009-03-10 17:21:57 +00:00
bouyer
e50e3a5ff8 Make sure xenkernfs_init() is called for XEN2 too. 2009-03-10 17:17:30 +00:00
msaitoh
3589a8fdf0 some bug fixes
- Set the flag to use multicast filter...
   Without this flag and with a shared hub, the MAC gets ALL packets and the
   packets will be forwarded if the forwarding is enabled. It results in DUP!

 - Workaround for "Non-Intel XScale Technology Eratta" No. 29.
   AA:BB:CC:DD:EE:xF's packet (the 2nd nibble from LSB is the same as the
   MAC's one) had matched the filter (both unicast and multicast).

 - Check if too {short,long} frame.

 - Add the MD hook to get MAC address
2009-03-10 17:09:48 +00:00
yamt
e1b625b4bc - adapt to MODULAR.
- some preparations to have more backends.
- add some comments.
2009-03-10 14:45:02 +00:00
msaitoh
8586a84598 some bugfixes
- Fix incorrect memset from FreeBSD CVS rev. 1.10 (SVN rev 183886)

 - Fix the bus_dmamap_create() call to prevent extra npe_defrag() call.
   Fixed by Hikaru Abe.

 - Add missing bpf_mtap() call in RX.

 - Add ETHERCAP_VLAN_MTU flag
2009-03-10 14:42:31 +00:00
nonaka
475dc08dab avail_start and avail_end is paddr_t. 2009-03-09 08:42:36 +00:00
ad
4e9e0aa85c printf -> panic so MP panics work correctly 2009-03-08 16:03:31 +00:00
tsutsui
981d751aa3 ANSIfy, some KNF, misc cosmetics. 2009-03-08 05:25:30 +00:00
ad
cd6b1c8f08 Make ddb compile and work in userspace. Mostly this is comprised of three
types of changes:

- Add a few new methods to replace stuff like p_find(), CPU_INFO_FOREACH.

- Use db_read_bytes() instead of accessing kernel structures directly,
  and similar changes.

- Add ifdef _KERNEL where the above hasn't been done, and an XXX comment.
2009-03-07 22:02:16 +00:00
ad
09e83b297e Expose more stuff if _KMEMUSER is defined. 2009-03-07 21:59:25 +00:00
abs
84c870d611 Regenerate after shrinking kernels to fit on floppies 2009-03-06 23:38:41 +00:00
abs
1c76e24a27 Shuffle some things around and comment out some options to try to ensure
we can fit a gzipped SMALL030 on a 720K floppy and FALCON / ATARITT on
1.44MB ones
2009-03-06 23:38:07 +00:00
bouyer
b124147487 Don't emulate a cold boot here, this breaks drivers using config_interrupt(). 2009-03-06 23:35:34 +00:00
bouyer
98b47cd2f6 Move a message to debug 2009-03-06 22:02:17 +00:00
bouyer
d08905dbd4 Unbind the event channel after mapping the interrupt. Otherwise domain0
will share the interrupt with the domU and xen will wait for domain0 to
ack the interrupt too. Now devices that don't share an interrupt with
a device in domain0 works too.
Make sure the same PCI bus isn't published multiple times.
2009-03-06 21:32:17 +00:00
joerg
f5b0fec0e0 Remove SHMMAXPGS from all kernel configs. Dynamically compute the
initial limit as 1/4 of the physical memory. Ensure the limit is at
least 1024 pages, the old default on most platforms.
2009-03-06 20:31:46 +00:00
cegger
61b1fbae0d add options COMPAT_50 2009-03-06 10:48:27 +00:00
cegger
1bf78a71a6 add options COMPAT_50 2009-03-06 10:37:42 +00:00
cegger
8e35c3d94f add age(4) and atphy(4) 2009-03-06 09:58:14 +00:00
cegger
23d8015c3f Go independent from Xen2 config files 2009-03-06 09:51:02 +00:00
bouyer
2c02d488fa Add pciback device to XEN3 dom0 kernels 2009-03-05 19:51:49 +00:00
bouyer
8178950407 - xentools also use pci vendor/product id and subsystem id; export them
via the kernfs file
- EVTCHNOP_bind_pirq wants the legacy IRQ number; so always set the
  legacy IRQ number in the PCI_INTERRUPT_REG.
2009-03-05 19:32:52 +00:00
tsutsui
50dbef0dcb Some KNF. 2009-03-05 13:42:59 +00:00
tsutsui
30b8022325 Remove __P(). 2009-03-05 13:21:44 +00:00
tsutsui
4a10dc6ecc Remove __P(). 2009-03-05 13:00:45 +00:00
msaitoh
4f0b35e963 Fix typo(s/interupt/interrupt/) 2009-03-05 01:48:58 +00:00
msaitoh
f9ccf64b65 Fix typo(s/interupt/interrupt/) 2009-03-05 01:38:12 +00:00
hauke
2f03f5338a Add Nubus IDs for the Atto SiliconExpress IV, an isp1000 based
fast/wide SCSI adapter.
2009-03-04 19:55:16 +00:00
jym
369b7d3476 Do not continue silently on a page fault for an INVALID_PAGE, and instead
report an EFAULT like Xen does.

This avoids bad situations where a domain calls privpgop_fault() in a loop
by trying to map an invalid MFN.

See also http://mail-index.netbsd.org/port-xen/2009/03/03/msg004803.html
2009-03-04 10:32:36 +00:00
nisimura
ff2a35dca2 comment out NFS_BOOT_BOOTSTATIC. It will be useful when a valid set of
NFS_BOOTSTATICs are specfied.
2009-03-04 07:31:33 +00:00
macallan
fd92054616 No need to have two pre-defined screen types - just adapt to whatever video
mode we find. Also, redraw screen when X exits.
TODO: find out why characters are drawn upside down, for some bizarre reason
      this happens right after exiting X but the last line is normal.
2009-03-04 01:23:28 +00:00
macallan
74c35b5de8 Comment out some register initialization which the firmware should have taken
care of anyway. Apparently doing this here disrupts newport's blitter
operations and causes a deadlock.
2009-03-03 19:45:55 +00:00
bouyer
d0ac537904 Fix rnd(4) support for Xen3 xennet
Add rnd(4) support to Xen3 xbd
Should fix port-xen/40739.
2009-03-03 19:04:41 +00:00
nonaka
53eee523f0 use pmf(9) instead of powerhook_*. 2009-03-03 18:42:19 +00:00
nonaka
26e1684598 fix make release. 2009-03-03 09:20:55 +00:00
mrg
826af0626f don't enable speedstep on systems with intel 82855GM host bridges. 2009-03-03 06:05:28 +00:00
nonaka
94654c3de9 Add missing config_pending_incr()/config_pending_incr(). 2009-03-02 10:17:58 +00:00
nonaka
af901e6821 Added zboot from OpenBSD. 2009-03-02 09:33:01 +00:00
aymeric
111a932741 . use device_private() (led to immediate crash during attach)
. while there, fix the aspect ratio of the trackpad on the geyser2 model
2009-03-01 10:18:30 +00:00
isaki
01850a5636 Remove duplicated definitions. 2009-03-01 09:23:27 +00:00
tsutsui
1832dc90cf Avoid "returned non-zero status" warning on make depend for kernels
without options FPSP on ports which have support for 68040 and FPSP.

Should close PR port-atari/40678.
2009-02-28 16:11:39 +00:00
dyoung
247a5f8a77 Add isv(4). 2009-02-27 23:37:20 +00:00
nonaka
6507ef0780 Fix for the display of attach not to mix.
Before:
atabus0 at wdc0 channel 0
wd0 at atabus0 drive 0uhub0 at usb0: PXA27x OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
: <SILICON POWER>
wd0: drive supports 1-sector PIO transfers, LBA addressing
wd0: 7775 MB, 15798 cyl, 16 head, 63 sec, 512 bytes/sect x 15924384 sectors
wd0: drive supports PIO mode 4

After:
uhub0 at usb0: PXA27x OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
atabus0 at wdc0 channel 0
wdc1 at pcmcia1 function 0: <128MB, >
wdc1: i/o mapped mode
wd0 at atabus0 drive 0: <SILICON POWER>
wd0: drive supports 1-sector PIO transfers, LBA addressing
wd0: 7775 MB, 15798 cyl, 16 head, 63 sec, 512 bytes/sect x 15924384 sectors
wd0: drive supports PIO mode 4
2009-02-27 16:45:17 +00:00
msaitoh
5ff1366c4f IXP425 is not ARM_ARCH_4 but ARM_ARCH_5 2009-02-27 03:57:41 +00:00
msaitoh
af2d7fdcc4 add missing <arm/cpu.h> to compile 2009-02-27 03:56:29 +00:00
kenh
cd2827b367 Improved support for GPIO support on the EP93xx ARM processors.
Specifically:

Support disabling specific pins on specific ports.
Modification of TS7200 kernel config file for GPIO support.
Documentatin for the current and improved GPIO interface (epgpio).
2009-02-27 03:13:55 +00:00
drochner
7ad644e970 sync TSC on resume (because CPUs were switched off in the meantime),
otherwise we get diverging timecounters leading to eg the monotonic
clock jump backwards
(pullup candidate)
2009-02-26 19:49:15 +00:00
jmcneill
8390afe513 PR# port-i386/38936: system can not power down via acpi
Merge change from amd64 machdep.c revision 1.42:

in cpu_reboot(), only halt the other CPUs after we've done the powerdown stuff.
the ACPI code may end up removing some pmap entries, which wants the other
CPUs to still be running to handle TLB invalidations.
2009-02-26 15:07:33 +00:00
jmcneill
7d16528c20 PR# port-i386/40751: power button does not work after halt
PR# kern/37506: Have to hold power button for 5 seconds to turn off Laptop
    after "halt" command.

Transfer the system from ACPI to Legacy mode if RB_HALT is set.
2009-02-26 13:56:46 +00:00
mhitch
daf32f5010 The ci_want_resched check and preempt() call had been removed from
userret() which resulted in no process preemption (and probably
contributed to the signal trap loop locking up the machine that was
recently fixed).  Put the check and preempt() call in the AST trap
handler to restore process preemption.
2009-02-25 19:56:49 +00:00
sekiya
223c75c0bc Un-hardcode IP32 serial console bus tags. Fixes regression introduced in revision 1.28. 2009-02-25 09:37:22 +00:00
yamt
80d3528400 nmi_disestablish: fix an inverted condition. pointed out by ad@. 2009-02-24 10:37:27 +00:00
yamt
4b64c2cb3d - rewrite x86 nmi dispatcher so that establish and disesablish are safe
on a running system.
- adapt existing users of the api.  (elan)
- adapt tprof_pmi driver to use the api.
2009-02-24 06:03:54 +00:00
rmind
f7d3fa20ef Add ucas (CAS for user-space address) support for i386 and amd64.
API provides ucas_int() and ucas_ptr() for now.

Reviewed by <ad>.
2009-02-23 20:27:59 +00:00
ad
59fcf21389 PR kern/26878 FFSv2 + softdep = livelock (no free ram)
PR kern/16942 panic with softdep and quotas
PR kern/19565 panic: softdep_write_inodeblock: indirect pointer #1 mismatch
PR kern/26274 softdep panic: allocdirect_merge: ...
PR kern/26374 Long delay before non-root users can write to softdep partitions
PR kern/28621 1.6.x "vp != NULL" panic in ffs_softdep.c:4653 while unmounting a softdep (+quota) filesystem
PR kern/29513 FFS+Softdep panic with unfsck-able file-corruption
PR kern/31544 The ffs softdep code appears to fail to write dirty bits to disk
PR kern/31981 stopping scsi disk can cause panic (softdep)
PR kern/32116 kernel panic in softdep (assertion failure)
PR kern/32532 softdep_trackbufs deadlock
PR kern/37191 softdep: locking against myself
PR kern/40474 Kernel panic after remounting raid root with softdep

Retire softdep, pass 2. As discussed and later formally announced on the
mailing lists.
2009-02-22 20:28:05 +00:00
ahoka
c0dfcdb337 Add a missing opt_multiboot.h into sys/arch/i386/i386/machdep.c.
Also do the missed rename of multiboot_ksyms_init to
multiboot_ksyms_addsyms_elf to compile with MULTIBOOT set.

This caused a minor and a more serious bug in the past:
- dmesg did not contain the information about the loader
- /dev/ksyms did not work when the kernel was booted with a
  multiboot bootloader (grub for example)

Ok by jmcneill, joerg.
2009-02-22 18:05:42 +00:00
dholland
57ebf9a50f Improve some cryptic warning messages; from a patch attached to PR 38019
by Greg A. Woods, with a couple adjustments. Compile-tested only, but should
not be able to break anything.
2009-02-22 07:14:46 +00:00
jun
f7db2a9184 add
COMPAT_50
2009-02-22 04:36:16 +00:00
mhitch
ddaf305db5 Not all 32 bits of the interval count register are being used, so set
the counter_mask to the number of significant bits we are actually using.
Fixes user/system CPU usage times.
2009-02-21 23:19:30 +00:00
jmcneill
2f56ffd259 Adjust for acpi_resource_parse aprint changes, noted by Jukka Salmi 2009-02-21 00:30:37 +00:00
sekiya
b73781ae2c Pull in Atheros HAL. 2009-02-20 12:57:06 +00:00
cegger
674307235b backout rev. 1.47.
per request from dyoung@ and cube@
2009-02-20 05:54:40 +00:00
cegger
262f0052cd bus_dmamap_create(): on failure, reset dmamp or drivers
like nfe(4) try to call bus_dmamap_destroy() on an invalid dmamap in their error path.
2009-02-19 23:34:14 +00:00
jmcneill
f654d345dd Mark old vesabios/vesafb flags as obsolete, noted by cube 2009-02-19 13:06:49 +00:00
jmcneill
849400ad6e vesabios is no more 2009-02-19 02:49:41 +00:00
jmcneill
96a6346404 vesafb is no more 2009-02-19 01:14:43 +00:00
jmcneill
08224a94a7 Remove vesafb, it has been replaced by genfb on x86. 2009-02-19 00:54:08 +00:00
mhitch
9259dea89c On the vax, the trapsignal() call will change frame->sp to point to a
callg on the user's stack that calls the user's signal handler, so do
the skip_opcode() before calling trapsignal().  A floating point
overflow no longer causes a signal loop.  This should stop the native
compile hangs trying to compile src/lib/libm/complex/catan.ln.
2009-02-18 17:32:12 +00:00
jmcneill
41a1bce5b4 Reorder command line parsing logic; previously the code assumed a string
containing the letter 'x' was a mode string (eg. 640x480), which prevented
the parser from picking up a mode number (eg. 0x101).
2009-02-17 23:17:39 +00:00
ad
d3f85b9eb7 Repair x86_patch to install optimized routines.
Pointed out by enami@.
2009-02-17 21:20:49 +00:00
ad
294fed3756 Adjust previous:
Output platform info with aprint_verbose(), so it shows up in dmesg output.
It's useful for bug reports.
2009-02-17 21:15:19 +00:00
jmcneill
60c3292c48 Use aprint_* 2009-02-17 20:35:35 +00:00
christos
78c0289565 Add INDEX_OPCODE() 2009-02-17 13:48:29 +00:00
jmcneill
1592daaedc Shorten est message, use aprint_debug 2009-02-17 12:27:13 +00:00
jmcneill
d63fa13cb6 Make platform_print use aprint_debug 2009-02-17 12:24:42 +00:00
jmcneill
e56c8e7c79 Make SMBIOS rev. message use aprint_debug (matches i386) 2009-02-17 12:23:33 +00:00
jmcneill
399b654397 x86_genfb_console_screen is only available if NWSDISPLAY > 0 and
NGENFB > 0, spotted by Geoff Wing.
2009-02-17 11:16:10 +00:00
jmcneill
7075548498 Set clear-screen and cursor-row so the transition from the early console
driver and genfb is seamless. While we're here, clear the screen when
we first attach in case the bootloader scribbled on it.
2009-02-17 02:21:13 +00:00
jmcneill
26168b4071 PR# port-i386/37026: userconf(4) doesn't work with vesafb(4)
Add early console support for x86 genfb.
2009-02-17 01:42:51 +00:00
jmcneill
a0e45b868c Just like i386 cpu_startup, for console drivers that require uvm and pmap
to be initialized, call consinit for a third time here.
2009-02-17 01:39:25 +00:00
cegger
914a0b8bf0 nuke unused global variable 2009-02-17 00:09:50 +00:00
christos
b2fabde467 - add siginfo translation for all arithmetic faults and traps.
- skip the current instruction for all faults, to avoid infinite loops on
  SIGFPE (from OpenBSD)
Info from: http://bitsavers.vt100.net/pdf/dec/vax/archSpec/EK-VAXAR-RM-001_Arch_May82.pdf
2009-02-16 23:55:31 +00:00
jmcneill
c4cff68cbd Fix typo in genfb line 2009-02-16 23:40:14 +00:00
jmcneill
57d51ea339 Add and enable genfb(4), and remove vesafb(4) section. 2009-02-16 22:43:47 +00:00
jmcneill
77fe169e3d Add and enable genfb(4) 2009-02-16 22:41:32 +00:00
jmcneill
c6d7607b67 Bootloader modifications for generic framebuffer console support on i386
and amd64 where VESA VBE 2.0+ is available.

* Add helper library and stubs to invoke VBE bioscalls.
* Bump HEAP_START as we were already dangerously close to our limits.
* bootdataseg now allows access > 16MB so in the future we can scribble
  on the framebuffer.
* Pass BTINFO_FRAMEBUFFER parameters to kernel when configured.
* VBE modes are configured with the new 'vesa' command. Usage, when present:
    * vesa {enabled|disabled}
      Enable / disable linear framebuffer, default mode is 640x480x8. May
      be changed in the future to determine mode based on VBE/DDC where
      available.
    * vesa list
      List modes supported by the firmware that meet the following criteria:
	* linear framebuffer
	* packed pixel or direct colour mode
    * vesa {modenum|modestr}
      Enable specific VBE mode. The mode can be specified either as a
      VBE mode number (eg. 0x101) or as a string (eg. 800x600x16).
2009-02-16 22:39:30 +00:00
jmcneill
95fed9400a Kernel-side modifications for framebuffer console support on i386 and amd64.
* New BTINFO_FRAMEBUFFER kernel parameter to pass screen configuration
* Early attach support for framebuffer console
* Pass BTINFO_FRAMEBUFFER parameters to genfb in device_register
* Provide hooks to genfb to set VGA DAC palette in 8bpp mode
2009-02-16 22:29:33 +00:00
bjh21
c4605d6440 Make arckbd(4) compile even if the kernel is lacking wsmouse(4), wskbd(4),
rnd(4), or any combination of thoses.  Thanks to Havard Eidnes for reporting
the build breakage.
2009-02-16 21:36:09 +00:00
martin
4159709210 fix the formats of a debug printf for the time_t changes. 2009-02-15 13:04:03 +00:00
skrll
d6c5edc918 Use the new OPT_DDB= %DDB% to add -fno-omit-frame-pointer so that ddb
backtrace will work.
2009-02-15 10:21:10 +00:00
cube
ec543a2ce5 Convert the recently introduced awk command to retrieve the value of the
option MODULAR to using %MODULAR%.  While it is now possible to only
request the new version in the affected Makefiles, it is made mandatory for
everybody because I just fixed a bug in config(1) that would not make it
fail in the case of a syntax error in the Makefile template.
2009-02-15 01:58:01 +00:00
jmcneill
1ead3177d3 Add genfb(4) 2009-02-14 22:13:22 +00:00
cube
df0059e2e8 Don't set version deep in the source tree if it's older than the one in
conf/files.
2009-02-14 20:22:59 +00:00
cegger
a96c46296c build & bugfix: spl0 is an alias for splx(IPL_NONE), which effectively results in calling splx() twice. 2009-02-14 18:00:26 +00:00
apb
6c4fc39a9f Now that "options MODULAR" is handled via defflag, the Makefile
generated by config(1) in the kernel compile directory no longer
contains IDENT=-DMODULAR.  Instead, there's an opt_modular.h file that
might or might not contain "#define MODULAR 1".

Adapt to this by adding an OPT_MODULAR variable to relevant Makefiles,
set via an awk script that parses opt_modular.h.
2009-02-14 16:53:55 +00:00
abs
515e52158b Convert more MACHINE tests to MACHINE_ARCH 2009-02-14 13:50:50 +00:00
he
cc9abff897 Also include <arm/cpu.h> here for the required definitions of
curcpl() and set_curcpl(), so that kern_ssp.c builds here as well.
2009-02-14 12:44:20 +00:00
abs
923c2f94e0 Use relative paths so we can avoid using ${MACHINE} in a path 2009-02-14 10:39:17 +00:00
bjh21
a0263b80b8 I've just discovered config_found_ia(), which means that wskbd(4) and
wsmouse(4) can attach directly at arckbd(4) and I can dispose of the
ugly arcwsmouse(4) and arcwskbd(4) interpositions.  Do that, and purge
them from the documentation as well.
2009-02-14 10:20:55 +00:00
he
aa2d981102 The attribute for if_le_oioc.c should apparently be le24, not le,
so that this file is not pulled into the GENERIC32_IP3x kernel,
where am7990.c isn't built.
2009-02-13 23:55:33 +00:00
apb
0cc72e51ac Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
2009-02-13 22:41:00 +00:00
bouyer
24584a19d8 Add commented out PCI pass-through support:
#xpci* at xenbus ?                      #Xen3 PCI front end driver
#pci* at xpci ?
2009-02-13 21:18:43 +00:00
bouyer
97f5912f84 Add kernel config file for i386PAE dom0 kernel. 2009-02-13 21:14:46 +00:00
he
a5e21717ca Another port which needs <arm/cpu.h> added as in include due to
the new kern_ssp.c.
2009-02-13 21:08:40 +00:00
bouyer
ad86c9a128 Work in progress on PCI front-end/back-end support
front-end:
- add a xpci* at xenbus? which provides pci busses from the dom0
  xpci provides support routines for PCI config space operations and
  enumeration in xpci_xenbus.c
- hypervisor.c: do dom0-style PCI attach only ifdef DOM0OPS
- pci_intr_machdep.c:  check line value only if DOM0OPS

back-end:
- add a pciback* at pci? device which takes precedences over all
  other PCI devices (match return 500) and matches all devices passed
  to pciback.hide option on boot command line.
  It exports the PCI device informations to files in /kern/xen/pci/
- hypervisor.c: create /kern/xen earlier so pciback can create its
  entries while PCI devices are probed
- xen_machdep.c: add handling for pciback.hide=

frontend is know working on Xen 3.1.x dom0 with ahc(4) and pciide(4)
devices. uhci(4) fail when trying to allocate a large contigous DMA
buffer.

backend is work in progress; support in xentools is not there yet.
2009-02-13 21:03:59 +00:00
bouyer
a72a7c9806 Fix printf format for 64bit paddr_t on i386 2009-02-13 20:51:19 +00:00
bouyer
07a0db581b Change bus_size_t from paddr_t to size_t. It doens't make sense to have
a 64bit bus_size_t on i386 as the address space is 32bits anyway.
With a 64bit bus_size_t we need a different bus_space.S for PAE and non-PAE.
2009-02-13 20:50:38 +00:00
bouyer
40dab4ba52 Prepare for PCI frontend support in Xen3 domUs:
call x86_bus_space_init() and x86_bus_space_mallocok() if we have ISA or PCI
  devices configured; not only for non-Xen or dom0 Xen
On Xen, always call PHYSDEVOP_SET_IOPL on context switch
on amd64, also call PHYSDEVOP_SET_IOPL from x86_64_proc0_tss_ldt_init()
2009-02-13 20:42:24 +00:00
macallan
50f7b2a157 Don't bother drawing a cursor until wsdisplay attaches. This works around
the deadlock I've seen with the previous version.
While there do some KNF policing.
2009-02-13 17:50:36 +00:00
cegger
23c2bff805 apply fix from upstream:
pciif: Fix typo in constant definition.


xen-unstable changeset: 19190
xen-3.3-testing changeset: 18580
2009-02-13 10:35:48 +00:00
he
2b6c605f60 Allow kern_ssp.c to build. That file includes <sys/intr.h> without
first including <sys/cpu.h>, so include <arm/cpu.h> here so that
curcpl() and set_curcpl() are declared before they are used.
2009-02-13 08:37:52 +00:00
bouyer
2a8972c890 Remove dead code 2009-02-12 20:57:45 +00:00
cegger
17fa4af4f6 Make Dom0/DomU boot with root-on-nfs when 'bootdev' parameter is missing or wrong.
In this case, we get prompted for the root device.
Make sure that nfs_bootstatic_callback is initialized or we will miss the nfsroot bootparameter,
causing a boot failure even when root device is correct.
2009-02-12 15:40:15 +00:00
nonaka
50b0e1a573 Processing that installed the card first was moved from pxapcic_attach_common()
to the head of pxapcic_event_thread().
As a result, the problem that built-in CF card is not detected is solved.
This problem occurred because of the fix of kern/40531.
2009-02-12 15:37:12 +00:00
rumble
85716c44d5 Enable Personal IRIS 4D/20 and 4D/25 support:
- Adapt int(4) to handle the INT1 chip
  - Move generic rtc clocks out of hpc/ and into dev/
  - Handle the very strangely wired eeprom and other bits in arcemu
  - Sprinkle MACH_SGI_IP6 as necessary
  - Enable IP6/IP10 devices in GENERIC32_IP12. Yes, the naming is poor but
    there's no winning with kernel/hw compatibility on sgimips...

Tested on my 4D/25. Doesn't (appear to) break macallan@'s IP22.
2009-02-12 06:33:56 +00:00
rumble
0e95582ed1 WD33C93 has only two registers, which often times aren't mapped to adjacent
bus space locations. Map them individually, instead.
2009-02-12 06:24:45 +00:00
macallan
d6232854b7 Become a good vcons citizen.
Also, don't use the cursor sprite as text cursor - it's not worth the pain and
the sprite doesn't have an invert-background plane either so the cursor wasn't
transparent.
Instead blit the cursor using the appropriate ROPs. This way we get rid of the
cursor misplacement problem as well.
While there also use device_t.
TODO: arbitrary font sizes, cleanup, support for mapping all blitter registers
so we can use them from X.
2009-02-12 02:29:58 +00:00
jnemeth
dd808e2b11 PR/40608 - Gao Ya'nan -- typo in comment 2009-02-11 07:24:40 +00:00
rumble
129b85dd87 IP6/IP10 known as 'Eclipse'. 2009-02-10 06:12:27 +00:00
rumble
439e902ae2 Be selective on match, since it makes sense to combine an IP12 and IP6
kernel and IP6 has no GIO bus.
2009-02-10 06:11:49 +00:00
rumble
4fcfe1330c Ready these for IP6. 2009-02-10 06:10:50 +00:00
rumble
b610ccb0d6 Check in work in progress of Personal IRIS 4D/20 and 4D/25 support (IP6
and IP10, respectively).
2009-02-10 06:04:56 +00:00
macallan
4aae227a17 A bunch of bugfixes:
- set blitter direction appropriately so scrolling downwards works now
- remove a bunch of false +1 so we only copy/erase what we really need to
- slightly change the logic for the cursor sprite offset so it works on this
  Indy ( I think what matters is VC2 revision 0 )
TODO: virtual consoles, fonts wider than 8 pixels
2009-02-10 03:40:26 +00:00
macallan
589ddc1d0a add a few more register definitions 2009-02-10 03:35:29 +00:00
bouyer
65fae56208 Apply patch proposed on port-amd64/port-i386, allowing to use a 64bit
bus_addr_t on i386PAE kernels:
change bus_addr_t to be a paddr_t (so its size follows paddr_t depending
   on options PAE)
remplace bus_addr_t with vaddr_t where the value is used as a virtual address.

Difference with the proposed patch: cast to uintmax_t and use %jx in
printf() as suggested by Joerg.
2009-02-08 20:59:19 +00:00
jym
5d7efd3c35 - add comments
- wrap long lines for easier reading
- make some debug messages a bit more relevant
2009-02-08 19:05:50 +00:00
jdc
940659ed15 Cosmetic clean up:
options<space><tab>
2009-02-08 13:05:50 +00:00
pgoyette
c8996319e0 Avoid asking the controller to transfer zero bytes of data, since we have
no clue if this works or not.  This prevents the i2c quick_{read,write}
protocols from working, but the only place those protocols are used is in
the code that enumerates the i2c bus and that just doesn't make sense for
ki2c anyway.

While here, make sure that i2c send_{byte,word} operations will work even
if the caller provides the cmd (ie, register to modify) and the data in
separate args.  This is the normal calling sequence for iic_exec() routines
and will enable dbcool (4) driver to update device registers.

OK'd macallan@
2009-02-08 01:13:39 +00:00
mrg
9bd6af36c2 move COMPAT_50 into MONOLITHIC, as pointed out by enami@. 2009-02-07 09:58:10 +00:00
jym
92ae85d18e Changes to MEMORY_RBFLAGS option:
- renamed to MEMORY_DISK_RBFLAGS to better fit the rest of the
MEMORY_DISK options(4)
- change default value to RB_AUTOBOOT instead of RB_SINGLE, and adapt
the config(5) files accordingly
- document this option inside options(4)

See also http://mail-index.netbsd.org/tech-kern/2008/12/25/msg003924.html

Reviewed by abs@ in private mail.
2009-02-06 18:50:26 +00:00
jym
78f949082f Fix some whitespace and indentation. No functional change. 2009-02-06 18:34:19 +00:00
dyoung
758cabb9ef When elansc(4) is detached, restore BIOS settings on the SC520's
programmable interrupt controller (PIC).
2009-02-06 01:40:36 +00:00
dyoung
7d8d7e5e0f So that I can both detach and *re-attach* elanpar0, elanpex0, and
gpio0, let elansc(4) rescan for them.
2009-02-06 01:38:28 +00:00
dyoung
2c4e9d51df Explicitly initialize mem_cluster_cnt to 0 for my peace of mind. 2009-02-05 22:26:53 +00:00
macallan
685cae19f2 Recycle OBP's framebuffer mapping if available instead of wasting KVA space
by creating our own.
2009-02-05 16:04:00 +00:00
pgoyette
397929c01e Return error status if an attempt is made to use the quick_{read,write}
i2c protocols, since we don't (yet) know how to make the controller do it.
2009-02-04 16:11:12 +00:00
tsutsui
f3b5f74b58 - use multiple sector read on floppy boot
(speeds up ustarfs floppy boot from ~840sec to ~100sec)
- use twiddle() rather than printing CHS numbers on reading floppy sectors
- make ustarfs_load() work with more than two volumes
- bump revision

XXX: FD_FORMAT_2D is not identified properly in boot_device() on EWS4800/360SX.
2009-02-04 15:22:13 +00:00
pgoyette
0e3187ea05 Add support for i2c quick_{read,write} protocols.
OK'd by nisimura@
2009-02-04 13:53:19 +00:00
tsutsui
5d71772dad Disable LOAD_NOTE on ustarboot to avoid backward seek on loading a kernel.
Tested on DEC 3000/300 and AlphaPC 164, fixes PR install/38943 on alpha.

XXX: should we enable LOAD_NOTE on ustarfs tape boot to load modules?
2009-02-03 12:49:00 +00:00
tsutsui
aa1af4640d Disable LOAD_NOTE on floppy boot.
Tested by isaki@ and fixes PR install/38943 on x68k.
2009-01-31 14:22:21 +00:00
christos
29358e4ac0 don't clear the screen unconditionally. Now controlled by an option.
Thanks enami
2009-01-30 14:09:44 +00:00
ad
12cbb1b52b Enable BUFQ_PRIOCSCAN by default. 2009-01-29 21:48:13 +00:00
nonaka
0f33b03f39 Added MiniSD and MicroSD card folder. 2009-01-29 21:27:35 +00:00
nonaka
a11abf1107 Regen. (by Added XScale PXA270) 2009-01-29 21:26:14 +00:00
nonaka
283e440864 Support XScale PXA270. 2009-01-29 21:23:38 +00:00
nonaka
2e2f22d5a5 Regen. (by Added XScale PXA270) 2009-01-29 21:20:42 +00:00
nonaka
b1577664ba Added XScale PXA270. 2009-01-29 21:18:23 +00:00
nonaka
e529d52724 Added include <stdlib.h> for exit() function. 2009-01-29 21:13:15 +00:00
nonaka
9a28c06bfc fix splx() function prototype. 2009-01-29 20:54:52 +00:00
nonaka
664df27b21 Use pmf(9) instead of powerhook_*. 2009-01-29 16:00:33 +00:00