jmc
c0f021e9fe
Put this back to a #define after he patched sys/exec_aout.h. Otherwise errno.h
...
has to be pulled in for ENOEXEC definition.
2005-02-04 22:45:05 +00:00
jmc
2f6ced07f5
Do the same thing sparc64 does and redefine sbus_promaddr_to_handle to a static
...
inline'd function. This way prototypes for it still work in the master
dev/sbusvar.h header. Found when the recent de-_P'ing occured
2005-02-04 22:20:55 +00:00
fvdl
6bdba8ddcd
The bootinfo_wedge structure must be packed, or the 32bit alignments
...
used by the bootloader don't match the amd64 kernel.
2005-02-04 22:03:53 +00:00
joff
74f7c604df
Make cpu_exec_aout_makecmds() a static inline instead of just #define'ed to
...
ENOEXEC. Broken on ARM build from the de-__P'ing, this is the fix.
2005-02-04 19:07:26 +00:00
skrll
015f297666
Modernise these to use GCC __builtin_* functions and types.
...
Also provide a (protected) va_copy.
2005-02-04 12:15:22 +00:00
joff
32262aa8f2
Support a wsdisplay(4) attachment on a tslcd
2005-02-04 06:02:36 +00:00
jmc
89f2c62a84
Add opt_scsipi_debug.h to list since compat_linux pulls in scsipi now for sg
...
driver
2005-02-04 05:59:51 +00:00
joff
9882b0c41e
Structure member misnamed. "rows" should be "cols"
2005-02-04 05:59:27 +00:00
jmc
672ed23467
vfr.c is still needed on the trunk or GENERIC doesn't compile...
2005-02-04 05:59:23 +00:00
joff
7d0231bc7f
Even though we don't use wscons on cobalt, still bring in dev/wscons/files.wscons
...
so we can get various opt_*.h generated.
2005-02-04 05:50:38 +00:00
joff
93f6c1c28a
keysyms off-by-one in numbering
2005-02-04 05:48:12 +00:00
jmc
3fed402d23
Provide lint wrappers around the va_* defs like other ports do so this can
...
make it through lint (was dying in libpam)
2005-02-03 23:45:37 +00:00
perry
449436c385
move a prototype back inside an #ifdef -- my GENERIC kernels worked
...
fine with it in the new place, but compiling another kernel found that
it wasn't a good idea.
2005-02-03 21:54:49 +00:00
bouyer
52a37d39ea
vfr.c doesn't exists any more.
2005-02-03 21:38:59 +00:00
perry
35adf4031a
de-__P, partially ANSIfy
2005-02-03 21:35:44 +00:00
perry
32a519cece
de-__P, partially ANSIfy
2005-02-03 21:08:57 +00:00
perry
2454da651e
de-__P, partially ANSIfy
2005-02-03 20:33:05 +00:00
perry
ac90d5411b
de-__P
2005-02-03 20:24:25 +00:00
perry
5fbcbbe2bb
de-__P
2005-02-03 20:08:55 +00:00
perry
09c542ec15
de-__P, partially ANSIfy
2005-02-03 20:08:44 +00:00
chs
39b340a6f4
add the early-clobber modifier on the destination reg of ldstub.
...
in some implementations (eg. sun4c), the hardware modifies the destination
reg before checking for write permission on the memory location. without
this change, gcc was using the same register for the address and the
destination, so if the store part of the instruction faulted, the address
was already gone when the instruction was retried after resolving the fault.
part of PR 25633, PR 25896.
2005-02-03 16:17:21 +00:00
chs
3cee1cf44e
sun4c hardware reports faults by the atomic load/store instructions as
...
read faults even if the problem was that the memory was read-only.
detect this case and relabel the fault as both read and write.
details cribbed from linux and openbsd.
part of PR 25633, PR 25896.
2005-02-03 16:15:06 +00:00
briggs
ecb75428c0
If we have not gotten the CPU speed yet, get it from OF here and print it.
...
This gives us the CPU speed for those CPUs that we can't probe in the ppc
common code.
2005-02-03 15:14:39 +00:00
briggs
d6e37f352e
Keep track of the CPU's current speed (in kHz) in the cpu info structure,
...
if we can get it. May want to expand this in the future to include min
and max speeds for systems where we can adjust the speed.
2005-02-03 14:47:09 +00:00
pk
b7ee084cd1
sun4/sun4c sw interrupt entry: check interrupt register to determine to
...
see whether there is a pending software interrupt at the given level.
If not, it must be a device interrupt sharing that level.
2005-02-01 22:33:02 +00:00
matt
5388f1ff2c
Add gti2c/iic entries.
2005-02-01 20:59:55 +00:00
briggs
fabe87766d
Strip old "pm1" code. All PPC PMUs are "pm2" style. Two benefits:
...
* Cleans code up a bit, and
* Reduces the call stack for PMU interrupts.
2005-02-01 03:24:29 +00:00
briggs
969369e173
Remove one level of interrupt redirection by switching on the ADB
...
hardware type and registering a Cuda or PMU interrupt handler
specifically instead of an intermediate interrupt handler.
2005-02-01 03:08:16 +00:00
briggs
c5d6d91dc9
Clear all interrupts set by cuda. From Michael Lorenz.
2005-02-01 02:54:17 +00:00
briggs
da18d7cc5e
Add a PMU initialization call at ADB init time. This probes the machine
...
type for PMU / battery information, then uses that when getting battery
information for APM. Allows older PowerBooks (pre-smart batteries) to
function with apm enabled in the kernel. Thanks to Linux code for battery
information for these old batteries. Something is still odd, though,
because a charging battery can show > 100% when it's near to full charge.
Enable more interrupts from PMU and handle PB3400 card eject buttons
properly, too.
Also use #defines for commands instead of raw hex codes.
2005-02-01 02:46:00 +00:00
briggs
2fd848709f
Calculate and use seconds of power remaining for smart battery types.
2005-02-01 02:23:26 +00:00
briggs
66ca62ad71
Add some command definitions gleaned from Linux.
...
Add a field to pmu_battery_info to contain est. seconds of power remaining.
2005-02-01 02:22:31 +00:00
briggs
805b9387ef
ADB_HW_PB is really ADB_HW_PMU.
2005-02-01 02:05:10 +00:00
briggs
dba5409d0b
adb_direct.h contents are in adbvar.h. No need for duplication.
2005-02-01 02:03:01 +00:00
jkunz
1a54c65d22
Only a part of the PCI memory space is mapped via BAT registers in machdep.c.
...
Depending on where the firmware relocated the OpenPIC register window it may
be unmapped causing a kernel panic early in bootup when the OpenPIC is
initialized. So take care of mapping it if it is outside the already mapped
region. As mapiodev() requires UVM move this initialization to cpu_startup().
2005-01-31 18:48:41 +00:00
jkunz
5d47a0a676
Disable use of BTLB mappings as BTLB handling is broken.
2005-01-31 18:22:24 +00:00
jkunz
e4bed1ee79
Implement powerd(8) interface via sysmon(9) for power switch, controllable by sysctl(8).
2005-01-31 18:17:35 +00:00
jkunz
48f11129db
Import mfcpu() from OpenBSD, needed by power switch code.
2005-01-31 17:32:15 +00:00
hannken
a524d180e1
Regen.
2005-01-31 16:58:31 +00:00
hannken
d5fbb6936f
Add file system snapshots to kernel configs.
...
- Ffs internal snapshots get compiled in unconditionally.
- File system snapshot device fss(4) added to all kernel configs that
have a disk. Device is commented out on all non-GENERIC kernels.
Reviewed by: Jason Thorpe <thorpej@netbsd.org>
2005-01-31 16:54:32 +00:00
simonb
3d23624f78
Fix some ddb build problems. Problems pointed out by Nick Hudson.
2005-01-31 07:18:51 +00:00
joff
564073f0d1
Add support for a 4x4 matrix keypad wskbd connected via the TS-7200 DIO header.
2005-01-31 06:12:35 +00:00
joff
34e8ea9d68
Add Port-B GPIO register equates
2005-01-31 05:51:44 +00:00
martin
2967f655ff
Remove the no long usefull variants selected by undefining INTRLIST and
...
INTR_INTERLOCK to improve readability. Same object code generated as before.
2005-01-30 20:02:23 +00:00
thorpej
53eac4d6eb
Eliminate use of M_HASFCS.
2005-01-30 19:15:41 +00:00
thorpej
a7ba88252d
Eliminate use of M_HASFCS.
2005-01-30 19:03:23 +00:00
chs
9a3f782ac4
define a new LWP flag which indicates that we're in the process of
...
doing a context switch. use this on sparc and sparc64 to avoid trying
to access user memory (writing the register windows back to the stack)
in this case (since it's both unnecessary and wrong).
2005-01-30 16:56:26 +00:00
tsutsui
56ac22d93c
Enable disconnect/reselect for esp(4) on 3/80 by default.
...
It also implies to enable tagged queueing, which works fine on my 3/80:
---
NetBSD 2.99.15 (CHARIOT) #184 : Sun Jan 30 07:13:08 JST 2005
tsutsui@mirage:/usr/src/sys/arch/sun3/compile/CHARIOT
Model: sun3x 80
fpu: mc68882
total memory = 65536 KB
avail memory = 62496 KB
mainbus0 (root)
obio0 at mainbus0
:
dma0 at obio0 addr 0x66001000 ipl 2: rev 0
esp0 at obio0 addr 0x66000000 ipl 2: ESP100, 20MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
:
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <SEAGATE, ST31230N, HP04> disk fixed
sd0: 1001 MB, 3992 cyl, 5 head, 102 sec, 512 bytes/sect x 2051460 sectors
sd0: async, 8-bit transfers, tagged queueing
sd1 at scsibus0 target 3 lun 0: <FUJITSU, M1606S-512, 6237> disk fixed
sd1: 1041 MB, 3457 cyl, 6 head, 102 sec, 512 bytes/sect x 2131992 sectors
sd1: async, 8-bit transfers, tagged queueing
boot device: sd0a
:
---
(yes, async but tagged queueing :-)
2005-01-30 04:07:59 +00:00
tsutsui
f855ff2dde
Enable NCR_F_DMASELECT to use DMA xfer on command/selection phase.
...
It didn't work on sun3x when I and gwr tried back in April 1999,
but now it just works fine.
2005-01-30 03:52:41 +00:00
martin
101ec2e3b7
If we get a kernel data access fault without curlwp, we would panic later
...
in uvmfault with a meaningless messages - instead, panic right away with
a helpfull message. Or course, neither of this should ever happen.
2005-01-29 22:42:19 +00:00
jonathan
0e8a3d7d0d
Now that we've switched to the split re(4) for PCI, add the cardbus
...
frontend for the split re(4) to files.cardbus, and to the generic x86
laptop config (sys/i386/conf/GENERIC_LAPTOP).
NB: as best I know, there are still unresolved issues in attach and
powersave, with the NetGear cardbus cards and re(4).
2005-01-29 21:59:53 +00:00
scw
6a6fbded73
Pull in sigcode.S only if COMPAT_16 is defined.
2005-01-29 11:41:06 +00:00
scw
1a62c87dce
Add a simple driver for the on-chip DMA controller. Its only use at
...
this time is for hardware-assisted page copy/zero.
2005-01-29 11:37:18 +00:00
scw
ac750eb431
Performance improvements for the cache/tlb manipulation routines.
2005-01-29 11:26:07 +00:00
scw
f454961d0c
When dealing with a pagefault, save pcb_onfault and set it to NULL until
...
after the pagefault has been dealt with. This ensures we DTRT if another
pagefault comes in (e.g. a NULL dereference) while dealing with the first.
2005-01-29 11:25:13 +00:00
scw
c77d6b4d62
Shave an instruction from the ADDC macro.
...
(Pointed out by Simon Burge a long time ago)
2005-01-29 11:22:30 +00:00
scw
5ef90f8740
Change pmap_copyzero_page_dpurge() to return void.
2005-01-29 11:21:47 +00:00
scw
c0efddb30c
- Add some hooks to enable hardware-assisted (e.g. DMA) copy/zero page.
...
- Fix pmap_extract() to deal with a NULL paddr_t *.
2005-01-29 11:20:09 +00:00
jkunz
3721af6a75
Import struct pdc_power_info from OpenBSD, needed by power switch code.
2005-01-28 17:38:51 +00:00
jkunz
74a2c9190e
Implement powerd(8) interface via sysmon(9) for power switch, controllable by sysctl(8).
2005-01-28 17:38:50 +00:00
jkunz
3c88ecfad5
Add two more revisions that use the pagezero info.
2005-01-28 17:38:49 +00:00
jkunz
a4d6ea5ca9
Implement powerd(8) interface via sysmon(9) for power switch, controllable by sysctl(8).
2005-01-28 17:38:49 +00:00
jkunz
58332f0318
Enable sti(4) wscons(4) for all machines.
2005-01-28 17:32:15 +00:00
is
7fa7b64071
Don't expose spl functions to non-kernel.
2005-01-28 10:19:57 +00:00
rumble
de81c2c878
Sprinkle options UFS_DIRHASH on GENERIC kernels. It's presently
...
commented out and labeled experimental pending further review and
testing.
2005-01-28 03:19:49 +00:00
mycroft
7ecc7a3071
Make awaitkey() poll once even if the timeout is 0. This also fixes a problem
...
where a keypress within the last polling interval would not be noticed.
Add a new function, conisshift(), which is used to detect whether a shift key
is pressed. Use this via awaitkey() to allow interrupting the boot by holding
down shift (similar to LILO).
This allows setting the timeout to 0 and still being able to use the boot
program.
2005-01-27 18:20:45 +00:00
simonb
90d5b03202
Fix a typo in a printf string.
2005-01-27 12:35:53 +00:00
is
97eadfd5d7
NTOHL() is not the same as ntohl()...
2005-01-27 11:00:46 +00:00
martin
c7b31c04d6
Remove orphaned extern declaration.
2005-01-27 08:50:27 +00:00
jmcneill
109219993b
Fixup ACPI wakecode on i386. This (along with some PCI power management
...
hooks) allows my Latitude D600 to recover from S3 sleep.
acpi_wakeup.c changes from lha@:
http://people.su.se/~lha/patches/netbsd/acpi-wakeup-1
2005-01-26 21:46:38 +00:00
kleink
3d7886ed58
MPC601: Use RTC instead of TB. (While I'm here, update these to use
...
the inline versions from <powerpc/cpu.h>).
2005-01-26 20:51:47 +00:00
he
0429525c8e
The ANSIfication apparently revealed a use of netif_attach() with a
...
missing argument. (It doesn't appear to be used, though, so this should
be a functional NOOP, except for fixing the build problem.)
2005-01-26 20:34:50 +00:00
he
6012a9f72d
Make forward declaration and actual function definitions consistent.
...
Some of the functions changed signature in the previous commit.
2005-01-26 20:32:27 +00:00
he
bee4200faa
Preserve the const qualifier even if we cast the "from" argument in the
...
memcpy() and memmove() inline functions.
2005-01-26 15:53:52 +00:00
briggs
d9b6766216
Ensure i/o commands are allocated on 16-byte boundary by allocating 15
...
extra bytes and adjusting array starts.
Issue pointed out on port-macppc by Michael Lorenz.
Also remove extra print of the device name on attach().
2005-01-25 19:05:22 +00:00
matt
691566cdec
Initialize zsconschannel to -1 so that it can't matched unless zscninit
...
is explicitly called to set it up.
2005-01-24 21:39:15 +00:00
shige
3ad343e546
Add OpenBlockS266 GPIO LED Driver.
2005-01-24 18:47:37 +00:00
is
909ba1f5de
Fixes by Klaus Klein.
2005-01-24 16:57:21 +00:00
is
0c23284a1c
Don't be confused with trigraphs.
...
EXEC_ELF -> EXEC_ELF32
2005-01-24 15:49:29 +00:00
simonb
0bcf992248
Fix a couple of comments.
2005-01-24 11:54:51 +00:00
drochner
50ed6c7cf3
-remove definition of "struct sigframe" -- haven't found a use of it
...
(should fix build problems w/o COMPAT_16 reported by Markus W Kilbinger
per PR port-mips/29041 and by Havard Eidnes)
-further shuffle COMPAT_* conditionals to allow COMPAT_ULTRIX
w/o COMPAT_16
2005-01-24 10:03:57 +00:00
joff
1cd0ad9aff
Add atu(4) 802.11b USB driver
2005-01-24 03:02:45 +00:00
joff
204717149e
Enable atu, vnd, and kttcp by default
2005-01-24 02:40:00 +00:00
joff
8506af05a4
Fix mem/io extents usage. Previously had been mis-using the bs_cookie for a bs_tag.
2005-01-24 02:38:15 +00:00
joff
f61320850a
whoops, had intr mask inverted
2005-01-24 02:36:04 +00:00
cdi
ab1460715b
New kernel configuration for use during Cobalt netboot or as a rescue kernel
...
image. The idea is to keep INSTALL as small as possible (XXXVERBOSE options are
off, no IP filtering, SCSI support etc.) to shoehorn into size limits imposed
by the Cobalt's firmware and to have full-blown GENERIC kernel which uses
NetBSD bootloader anyway.
2005-01-23 20:05:26 +00:00
shige
5ed37446b2
Add gpio module.
2005-01-23 19:24:31 +00:00
shige
17dda52768
Add driver for On-chip General Purpose I/O.
2005-01-23 19:22:22 +00:00
chs
924b155d98
turn interrupts on in cpu_reboot(), in case someone reboots from
...
a strange context via ddb.
2005-01-23 19:10:23 +00:00
chs
fba432b011
make this the same as the other m68k platforms.
2005-01-23 17:32:56 +00:00
chs
fa924b7be7
move spl*() and IPL_* definitions from psl.h to intr.h.
2005-01-23 17:27:03 +00:00
pk
dca752e34a
Make pmap_map() work on sun4 machines.
...
Thanks to Matthew and Julian for finding this.
2005-01-23 17:04:26 +00:00
he
e23b180fd3
Adapt to the change in type of ite_on() -- don't pretend that it returns
...
a value anymore (return type is now void).
2005-01-23 09:25:52 +00:00
simonb
dc5fd1a390
Use lis@h/ori@l instead of lis@ha/addi@l since we may use r0 and addi
...
is one of those funny instructions that treats r0 == 0 when used as the
first arg.
Fixes problems on ibm4xx. Ok'd by matt@.
2005-01-23 00:23:57 +00:00
chs
70e6d93136
bring back the sun3 MAXPHYS definition that has been missing for 8 years.
...
more recently, we changed to relying on MAXPHYS rather than MAXBSIZE to
limit page cache I/O sizes, and sun3 has been broken since then.
2005-01-22 17:13:14 +00:00
chs
10b1a7be5e
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
2005-01-22 15:36:09 +00:00
tsutsui
ec0d5b6338
Use TAILQ_* macro.
2005-01-22 11:08:18 +00:00
tsutsui
7310abde32
Make all intr_mask value types uint32_t rather than int, u_int,
...
or unsigned etc.
2005-01-22 08:43:02 +00:00
tsutsui
a510ad6a78
More ansify and KNF.
2005-01-22 07:56:28 +00:00
tsutsui
66f3c84b7a
bzero -> memset
2005-01-22 07:44:33 +00:00