Commit Graph

49546 Commits

Author SHA1 Message Date
tsutsui
2a6ed85992 - use -Os to shrink bianries
- remove local shrinked memcpy() from bootxx.c bacause
  now it's identical with __OPTIMIZE_SIZE__ libsa one
  derived from src/common/lib/libc/string/bcopy.c.

Tested netboot from le0 and bootxx + boot from sd0 on SS1+.
2009-03-23 13:47:32 +00:00
ad
dabb2cae17 Set up module_map correctly so that the system does not panic if it
becomes full.
2009-03-22 19:57:11 +00:00
uwe
1ebb57a8c6 Don't bother trying to attach GPIO, AFE and FIR modules for which we
have no drivers.

Standby TIMER that we don't use.  One of the timers is always out of
standby on my Jornada on boot (WinCE uses it), so save some power.

Standby AFE and FIR for which we have no drivers (I don't know if any
hpcsh hardware actually uses them, so they are likely to be in standby
already anyway).
2009-03-22 02:25:11 +00:00
ad
2fc1c0de55 Add 2 event counters:
"x86", "io bitmap copy"
"x86", "ldt sync"
2009-03-21 22:55:08 +00:00
ad
e23c2bc3ad A couple more comments. 2009-03-21 22:17:13 +00:00
ad
b8dea7e04e Add a comment. 2009-03-21 21:42:00 +00:00
ad
3c11640e0d Fix 'boot -z' bogons. 2009-03-21 15:01:56 +00:00
ad
418272808a Correction to previous. 2009-03-21 14:48:02 +00:00
ad
d16d704d62 PR port-i386/40143 Viewing an mpeg transport stream with mplayer causes crash
Fix numerous problems:

1. LDT updates are not atomic.

2. Number of processes running with private LDTs and/or I/O bitmaps
   is not capped. System with high maxprocs can be paniced.

3. LDTR can be leaked over context switch.

4. GDT slot allocations can race, giving the same LDT slot to two procs.

5. Incomplete interrupt/trap frames can be stacked.

6. In some rare cases segment faults are not handled correctly.
2009-03-21 14:41:29 +00:00
uwe
490f3711c0 Interrupt handling changes (revision 1.23) bumped down _IPL_N to 8 for
some reason.  Restore it to correct 16.

HTF did hpcsh work all this time with hd6446x_imask[_IPL_N] indexed
with IPLs 0..15 is a mistery...  Discovered by accidentally triggering
hd64461 timer interrupt that is not enabled and should have been
masked.

_IPL_N used to be *also incorrect* 15 before Andy's change, which
makes one wonder if dumb luck is severly underappreciated.
2009-03-21 06:11:08 +00:00
uwe
1251c9c4c1 Print only the offending masked HD6446x interrupt, not all of the NIRR. 2009-03-21 04:58:32 +00:00
uwe
89c9d74da9 Fix typo in message. 2009-03-21 03:51:41 +00:00
uwe
ba51317c25 Minor cosmetic. 2009-03-21 03:13:30 +00:00
uwe
76c0e81d47 In the current code the even loop is never exited, but it's cleaner to
have explicit kthread_exit at the end of the event thread routine.
2009-03-21 02:23:03 +00:00
uwe
df7998fac1 Move channel attachment to event thread (we already have one, so it's
easier to do it there rather than mess with config_interrupts()).

From kiyohara@.  Discussed with drochner@, who pointed out that pcmcia
drivers are expected to attach with interrupts enabled.
2009-03-21 02:02:39 +00:00
tsutsui
e61fbf18ec Build common standalone MD sources in libsa. 2009-03-20 13:59:49 +00:00
tsutsui
1b7ed0b13a Switch sun68k standalone programs to using MI libsa and libkern.
Bump version.

Tested bootxx + ufsboot on TME (sun2 and sun3) and 3/80 (sun3x).
2009-03-20 11:42:25 +00:00
he
2c9ccd9e54 Correct one more bungled bcopy() -> memcpy() conversion. 2009-03-19 23:09:13 +00:00
he
9cd8fe02fa Correct a few more bungled bcopy() -> memcpy() conversions. 2009-03-19 22:52:16 +00:00
he
521052f60d It seems gcc is unhappy about a literal 0 as a pointer argument
to memcpy().  Work around that by using a local variable instead.
(This looks a bit dubious, but who am I to judge the restrictions
in the standalone environment on the vax -- this should not change
the semantics of what was here before.)
2009-03-19 14:11:20 +00:00
he
009f7e26ee Now that the stand/ code was converted to use memcpy(), the private
implementation of bcopy() needs to become memcpy() as well.  The
simpler local implementation is needed so that the boot code doesn't
overflow the available space.
2009-03-19 14:05:24 +00:00
tsutsui
18014b1a99 Remove bcmp() from MD libsa.
XXX: These ports should be rewritten to use MI libsa for maintainability.
2009-03-19 10:19:33 +00:00
mrg
4df09e915b remove a bunch of special casing to handle improperly set segment
registers.  if we faulted trying to set them, just fall into
"we_re_toast", and arrange for a SEGV to be delivered to the
userland process.  fixes kernel mode faults.

from andrew doran.
2009-03-19 02:59:00 +00:00
he
9df5574fb1 Correct a bzero() -> memset conversion. 2009-03-18 22:13:05 +00:00
dyoung
75c7534526 Remove native compatibility options to stop the config(1) errors
that Juergen Hannken-Illjes reports:

    sys/arch/i386/conf/MONOLITHIC:16: already have options `COMPAT_NOMID'
    sys/arch/i386/conf/MONOLITHIC:17: already have options `COMPAT_09'
    ...
2009-03-18 20:57:45 +00:00
cegger
e2cb85904d bcopy -> memcpy 2009-03-18 17:06:41 +00:00
cegger
c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
cegger
35fb64746b bcmp -> memcmp 2009-03-18 15:14:29 +00:00
tsutsui
83a448a377 Include <string.h> for memcpy(3). 2009-03-18 13:24:38 +00:00
cegger
df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
cegger
20cd1777db ansify function definitions 2009-03-18 07:41:54 +00:00
uwe
7ae7c6b0f8 Turn on display on attachment. Fixes the scenario when serial console
is used and you reboot (using kloader) with screen turned off.
2009-03-18 02:49:34 +00:00
dyoung
69fbb7297e Reactivate native compatibility in GENERIC. 2009-03-17 20:04:39 +00:00
he
6dc3c9a69e Make putchar() conform to the stand.h prototype, so that this builds again. 2009-03-17 19:41:32 +00:00
he
f39d6889ae Due to the way these files are used, ref. libdos/makedoscalls.awk and
libiocs/makeiocscalls.awk, we need a space between the function name
and the parameter list in the declaration.
2009-03-17 18:58:26 +00:00
he
75306d0938 Correct the sense of the test for LIBSA_NO_FS_CLOSE
so that this builds again.
2009-03-17 18:43:43 +00:00
dsl
98ae204731 Add some 'int' into function definitions where the K&R one didn't
specify a type.
2009-03-17 18:19:15 +00:00
he
62db563030 Re-balance parenthesis in a couple of places. 2009-03-17 10:16:55 +00:00
msaitoh
50a765e44b Make it compile without PCI. 2009-03-17 00:51:27 +00:00
he
d44fdcfc47 Introduce LIBSA_NO_DEV_IOCTL, and don't declare ioctl() if it's defined.
Also, don't declare the close() function if LIBSA_NO_DEV_CLOSE is defined.
2009-03-17 00:45:46 +00:00
he
cdd90ae5f0 Introduce LIBSA_NO_DEV_IOCTL. Don't declare the ioctl routine
if it is defined, and don't declare the close routine if
LIBSA_NO_DEV_CLOSE is defined.
2009-03-17 00:35:08 +00:00
he
62f5486c1b Make a couple of functions conform to the prototype, restoring buildability. 2009-03-17 00:18:40 +00:00
he
715f7f5caa Make putchar() obey the stand.h prototype. 2009-03-17 00:13:43 +00:00
he
d6a69143f8 Correct the sense of the check for LIBSA_NO_FS_CLOSE; restores buildability. 2009-03-16 23:46:12 +00:00
dsl
7cc9af7d64 ANSIfy functions with function-pointer arguments 2009-03-16 23:11:09 +00:00
nonaka
f0b5e260c9 Don't use kloader_reboot() when after panic. 2009-03-16 12:54:52 +00:00
nonaka
b8c79d033f set DALGN register when address is misaligned (PXA27x only). 2009-03-16 11:42:31 +00:00
nonaka
72d2ade5d7 Added DMA Alignment register definition. 2009-03-16 11:32:27 +00:00
tsutsui
31b444f9ae Add a dumb RX hardware TCPv4/UDPv4 checksum support. 2009-03-16 09:58:51 +00:00
cegger
05d33dc7bf ansify function definitions 2009-03-16 09:32:38 +00:00
cegger
962766853c ansify function definitions 2009-03-16 05:59:21 +00:00
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