Commit Graph

39744 Commits

Author SHA1 Message Date
chs
d65ac815a8 use a global variable to ensure that only one instance is configured
rather than requiring that its unit number be zero.
simplify by not pretending that powermacs can have more than 1 zsc.
2005-01-10 16:38:06 +00:00
chs
35cacfdeb8 de-__P, remove register, ansify. 2005-01-10 16:34:46 +00:00
matt
b046d5ecf9 Now that countless UVM bugs have been fixed, enable "topdown" memory
allocation by default.
2005-01-10 05:42:09 +00:00
mycroft
87e784e1de Now that countless UVM bugs have been fixed, enable "topdown" memory
allocation by default.
2005-01-10 05:34:51 +00:00
mhitch
248d777d24 Fix Maxine keyboard and mouse ioctl routines to return EPASSTHROUGH for
unrecognized commands so they can be passed to other handlers.
2005-01-10 04:43:34 +00:00
mhitch
4deb82db56 Maxine mouse buttons were being mapped incorrectly (old dtop.c code mapped
them to serial mouse buttons, which were then mapped into events to pass
to the X server).
Also fix bug in mouse motion - putting 2 unsigned bytes into an integer
resulted in a 16-bit unsigned value, so negative mouse motion didn't work.
2005-01-10 04:40:05 +00:00
joff
fdb2df8f5f enable pcic(9) PCMCIA controllers in default kernel 2005-01-09 21:44:32 +00:00
joff
6b75e7b0f9 Allow for pcic(9) attachments on the ISA bus 2005-01-09 21:40:02 +00:00
joff
0686f5514c call isa_bs_mallocok() right before ISA bus attachment 2005-01-09 21:35:51 +00:00
joff
453e7edc70 Implement extent(9) based management of ISA io/mem so pcic(9) has
a chance of working.
2005-01-09 21:32:08 +00:00
tsutsui
e34a3b7f08 Small optimization in vmapbuf()/vunmapbuf().
BTW, should we also pass 'VM_PROT_READ|VM_PROT_WRITE' to flags
with PMAP_WIRED for pmap_enter() in vmapbuf()?
2005-01-09 17:41:34 +00:00
joff
5f20950e38 o reversed sense of RS in writereg
o attempt HD44780 reset on open if LCD not detected at bootup
o skip everything if sc_dev_ok == 0 in writereg/readreg
2005-01-09 15:48:51 +00:00
tsutsui
8d65a2e17f - Switch to wscons(4) with MI vga(4), pckbc(4) and pms(4).
- Reorganize console initialization code like i386 rather than cninit().
Note old pccons/opms and ofcons support still works.

XXX Xserver is not tested because XF86_4 doesn't have support
XXX for IGS CyberPro2010 on shark. (yet?)
2005-01-09 15:39:59 +00:00
tsutsui
7da0e84338 - Adapt to vga_common_attach() API changes.
- Add more VGA initialization code to vga_ofbus_cnattach() from pccons.c.
- Export vga_ofbus_cnattach() prototype for consinit() ops.
2005-01-09 15:29:27 +00:00
tsutsui
01c812cc7b Add bus_space_copy_region_2() op, which is required by MI vga(4),
from sys/arch/arm/arm/bus_space_asm_generic.S.

XXX: isa_io_asm.S and bus_space_asm_generic.S is mostly identical.
2005-01-09 15:26:19 +00:00
joff
9a859b8fc6 Support LCD by default on TS-7200 2005-01-08 20:41:56 +00:00
joff
63b4d87a37 Add tslcd device 2005-01-08 20:39:18 +00:00
joff
8bf98807a3 Add tslcd device 2005-01-08 20:24:59 +00:00
joff
c87859c9da Support for bit-banging HD44780 bus cycles on the generic LCD header 2005-01-08 20:23:32 +00:00
joff
762a60356c Replace the rwrite and rread functions that take a bus_space_tag_t and
bus_space_handle_t with the new writereg and readreg
functions that take a struct hd44780_chip * and a u_int32_t rs (register-select)
2005-01-08 20:21:00 +00:00
mhitch
d6b26ac1f0 Fix MAXINE keyboard multi-key press bug. Keyboard sends all currently
depressed keys in each message.  Any keys in current message that are
also present in previous message are ignored.  However, copying a byte
array into an integer array and comparing entry by entry doesn't have
the desired effect.  Change the definition of the save buffer to match
the current message buffer data.
2005-01-08 18:48:34 +00:00
briggs
1a7331ca01 cosmetic changes. 2005-01-08 04:24:05 +00:00
briggs
c5aa4aada2 Make obio match multiple times to allow access to devices on systems
where there might be devices under two I/O bridges (like PowerBook G3s).
Attempt to have devices under 'gatwick' share parental interrupt.  This
may still need some work, but a step in the right direction.
From Tim Kelly.
2005-01-08 03:24:58 +00:00
joff
2f2edb0a13 Support up to 4 TS-ETH10 ethernet boards on the PC/104 bus 2005-01-08 02:58:03 +00:00
briggs
4137e66929 Allow MSR[POW] off for power saving on 604-era CPUs. From Tim Kelly.
XXX -- needs benchmarking
2005-01-07 21:31:04 +00:00
briggs
35a39caef5 Don't attempt to probe the cache with l2cr on 604ev. From Tim Kelly. 2005-01-07 20:41:35 +00:00
tsutsui
6963e49e45 Add options KLOADER, to make it easier to boot a new kernel on the console. 2005-01-07 11:32:43 +00:00
skrll
6a8415b9ef KNF 2005-01-07 08:02:16 +00:00
briggs
8bf4e0c153 - Use the O'Hare mask on systems with /bandit/ohare. This basically treats
the mediabay interrupt as an internal interrupt.
- Simplify gc_reenable_irq() a bit.
- Ensure that interrupts are off when we call gc_reenable_irq().
- Make the handling for stuck interrupts on old-style interrupt controllers
  a bit more robust.  If we get stuck interrupts, don't panic.  Just disable
  them.
2005-01-07 06:11:20 +00:00
briggs
8dce4f9979 - If pm_pmgrop_pm2() fails, return after splx() -- there's no sense in
continuing.
- Note that there really needs to be bounds-checking on PMData.
2005-01-07 05:03:08 +00:00
briggs
f537a73f9e Increase buffer from 32 bytes to 128 bytes in PMData. I have observed a
response from the device that had 120 bytes of data.  The lack of any
bounds-checking in pm_direct.c allowed that data to smash the stack in
the interrupt handler.
2005-01-07 04:59:58 +00:00
perry
0d3f1b36a7 space-then-tab ixpide so it comments out nicely. 2005-01-07 01:31:14 +00:00
joff
cff5504bf7 Add missing newline after preposterous time warning printf 2005-01-06 16:11:54 +00:00
scw
5643984efd In iopiic_wait(), latched status bits in the ISR is cleared by writing
ones to the appropriate bits, not zeroes. In this case, just write the
value from a previous read of the register.
2005-01-06 09:34:02 +00:00
uwe
b667c1f82d Fix lint stub for va_start so that lint is actually happy about it. 2005-01-05 23:39:51 +00:00
simonb
a773da1261 Revert previous method of stripping out the .eh_frame sections from
objects as they're built now that we strip them all out at final link
time.
2005-01-05 12:18:18 +00:00
simonb
888d4fa34c Discard any .eh_frame sections at link time by asking ${LD} to dump the
current linker script, change references for any .eh_frame sections so
that they go in to the special "DISCARD" section so that they are not
included in the final object, and use the resultant linker script when
actually linking the bootblocks.

Idea (and most of the sed expression) from Jakub Jelinek.
2005-01-05 12:16:49 +00:00
tsutsui
cac3513fa5 Purge vm_offset_t. 2005-01-05 10:25:43 +00:00
tsutsui
41e8037c12 Use MI <dev/ic/pcdisplay.h>. 2005-01-05 09:17:36 +00:00
tsutsui
f97d50b3cf 'device-major ofcons' is required by device ofcons, not ofwgencfg. 2005-01-05 09:15:19 +00:00
tsutsui
ccf08b263e - Remove attribute shark, which is always defined.
- arch/shark/ofw/ofisapc.c is required by ofisapc, not pc.
2005-01-05 09:13:29 +00:00
skrll
3a5765c0b0 Correct two reloc numbers/names 2005-01-05 09:12:38 +00:00
tsutsui
f8d82b0fa1 options<space><tab> 2005-01-05 09:06:33 +00:00
tsutsui
e2ccb8e626 Bump size of SYMTAB_SPACE. 2005-01-05 09:05:39 +00:00
tsutsui
944f772de9 options<space><tab> 2005-01-05 09:01:24 +00:00
joff
9c1013d65c Avoid duplicate IRQ deliveries by processing at most 1 IRQ for each VIC read 2005-01-05 04:53:50 +00:00
chs
ddc6ab738a drop the big lock in upcallret() like all the other platforms do. 2005-01-03 00:03:25 +00:00
chris
80ba0e9617 Remove direct references to TAILQ internal structures.
No functional change, just tidying up code.
2005-01-02 22:47:26 +00:00
mhitch
ee4185996c For Maxine serial console on a WSCONS kernel, use the correct channel
number.
2005-01-02 22:36:34 +00:00
mhitch
8bc24fad8f Fix long-standing error in interrupt index for Maxine built-in graphics
card.  It was using the same index as the Ethernet interface, but didn't
cause any problems until the new xcfb.c driver installed an interrupt
handler.  Ethernet interrupts went to the xcfb.c interrupt handler and
hung machine.
2005-01-02 22:34:57 +00:00
christos
c15f6c31fd Try one more time to pacify lint. 2005-01-02 22:00:14 +00:00
christos
b68cb5ea41 Simplify the lint case by providing simple versions of the va_ macros,
instead of defining the buildin macros used to construct them.
2005-01-02 21:55:59 +00:00
joff
33f8ad5c19 set L_SA_PAGEFAULT for prefetch aborts, too. Fixes kern/28828 2005-01-02 21:12:48 +00:00
tsutsui
2be3acc29a u_intNN_t -> uintNN_t 2005-01-02 12:03:12 +00:00
christos
ca0484bf3e add a linted comment. 2005-01-02 00:14:46 +00:00
rumble
067cc4d32d Add commented out pf and pflog pseudo-devices. 2005-01-01 21:20:19 +00:00
yamt
95c82bfee4 introduce vm_map_kernel, a subclass of vm_map, and
move some kernel-only members of vm_map to it.
2005-01-01 21:02:12 +00:00
yamt
1207308b90 for in-kernel maps,
- allocate kva for vm_map_entry from the map itsself and
  remove the static limit, MAX_KMAPENT.
- keep merged entries for later splitting to fix allocate-to-free problem.
  PR/24039.
2005-01-01 21:00:06 +00:00
chs
6bd8ed04bb add cases for '040 and '060 FPUs. from Radek Kujawa. 2005-01-01 17:11:39 +00:00
toshii
1701924009 While processing soft interrupts, don't call splx()/lowerspl() when
unnecessary, as they call dosoftints().
2005-01-01 10:39:30 +00:00
simonb
0ce7001382 Provide assembly versions of the clock timing calculation loops that
aren't effected by changes in compiler optimisation.

Fixes PR port-mips/26959 from Izumi Tsutsui
2005-01-01 09:48:39 +00:00
simonb
98ffe3f03f Don't specify the object format to pick the right endianness - the
linker already knows if it is big- or little-endian.
2005-01-01 07:00:50 +00:00
tsutsui
91c61919b2 - Make some local functions static.
- Remove unused prototype declarations.
2005-01-01 04:54:29 +00:00
tsutsui
b2a044cc20 Remove (void *) casts added to NULL. 2005-01-01 04:00:25 +00:00
simonb
4dab1db639 Use "NULL" instead of "(something-or-other *)0". 2005-01-01 03:25:46 +00:00
simonb
60e6b50deb Spell "available" correctly. 2005-01-01 03:24:43 +00:00
rumble
bf88067210 Do not report unexpected interrupts when not debugging. These
seem to occur fairly often under normal operation with HPC1.5.
Also, do not return if the interrupt is unexpected, but see if
there is anything to handle regardless, which appears to always
be the case with HPC1.5.
2004-12-31 22:32:34 +00:00
christos
faeb57b2dd Define builtin va start differently for lint, so that it does not produce
a warning.
2004-12-31 17:28:38 +00:00
joff
5a55b5cff3 Enable INET6 by default, bump SYMTAB_SPACE 2004-12-31 12:14:22 +00:00
he
b8908d5fed Make this compile again after the introduction of usb_dma_reserve;
need to include <dev/usb/usb_mem.h> now to pick up it's definition.
2004-12-31 11:06:53 +00:00
rumble
801f527111 Prepend HPC3 macros universally with "HPC3_" to distinctly recognise
the corresponding revision and maintain consistency with HPC1.

No functional change intended.
2004-12-30 23:18:09 +00:00
joff
05aeaeff39 Always expose struct sigcontext instead of just #ifdef COMPAT_16. 2004-12-30 20:38:37 +00:00
christos
2819137180 change the definition of va_start for lint. 2004-12-30 18:08:20 +00:00
christos
d8e127cb21 - don't try to to lint the va_arg() macros, instead replace them.
- replace the va_start() macro for lint
2004-12-30 16:22:27 +00:00
is
63672cded0 Hardware pointers must be volatile.
Patch by Pawel Chwalowski via PR 28810, from a similar patch by Michael
Hitch to ite_cl.c.
2004-12-30 10:07:51 +00:00
tsutsui
23bf17808a Protect accesses to PTE/TLB registers with
_cpu_exception_suspend()/_cpu_exception_resume() pair.

Should fix spontaneous reboot problem on heavy load reported by
Christian Groessler on port-dreamcast.
2004-12-30 09:48:30 +00:00
rumble
3de38c1738 Replace the hpc0 base address with the definition from
hpc/hpcregs.h.
2004-12-30 02:41:03 +00:00
rumble
4aa50cac2f Remove a few HPC1 register definitions for ones that don't exist.
Also, HPC1_ENET_INTDELAYVAL isn't a magic number. It turns the
interrupt delay off (by being the timer trigger bit), so name it
more appropriately.
2004-12-30 02:35:41 +00:00
rumble
57329acafa Wrap seeq and hpc register reads and writes in macros for
readability. While here, engage in some KNF and 80-column policing.
No functional changes intended.
2004-12-30 02:26:20 +00:00
rumble
d4734bb3d4 Fix the HPC1 transmit logic, which was previously very broken.
HPC1 does not mark transmitted descriptors like HPC3. We must
query the HPC1 chip to determine what it expects the next
descriptor to be, reclaim used ones, and restart if necessary. Each
revision's corresponding logic now lives in its own
sq_txring_hpc{1,3} function.

HPC1's transmit interrupt conditions also differ from HPC3, so
remove the INTR bits from descriptors when tagging new packets on
to the end of the chain in order to avoid unwanted interrupts.

Also, be extra careful when restarting the transmit ring. Since
transmit interrupts seem to be relatively slow on HPC1, sq_start
may be called while the DMA engine is quiescent, and before a
transmit interrupt is asserted. We cannot behave like HPC3, which
begins transmission from the first packet pulled from IFQ if the
DMA engine is quiescent as this would skip enqueued packets. It
appears that sq_start is never called before HPC3 asserts an
interrupt, which restarts the transmit queue at the appropriate
place. However, this often happens with HPC1 and we cannot assume
that if DMA is inactive in sq_start, then all previously queued
packets have fled the coop.
XXX Is there a similar race possible with HPC3?

HPC3 logic should remain functionally unchanged, and HPC1 should
finally work properly.
2004-12-29 06:57:52 +00:00
joff
5beb7d303e improve intr handling behavior in light of the fact that there is no transmit completion irqs on epcom 2004-12-29 06:31:32 +00:00
rumble
5cf01464f1 HPC1 seems to benefit from larger rings. This should be especially
true on the transmit side, which appears to be significantly slower at
interrupting than HPC3.

XXX I used to be able to occasionally wedge the chip with
SQ_NTXDESC == 32, but have not yet been able to reproduce that
behaviour this evening with a larger value.
2004-12-29 06:28:14 +00:00
joff
193578fd49 Bump UPAGES back down to 8KB now that real issue was found with ep93xx intr handling 2004-12-29 04:47:44 +00:00
joff
54fe88f7fd Fix the potential recursion processing soft interrupts that was eating
all the stack.
2004-12-29 04:46:13 +00:00
rumble
e837411407 Remove the static sq_trace array and make it per-device as
multiple seeq interfaces may exist. While here, add a few trace
actions, move the related macros into sqvar.h, and enhance the
sq_trace_dump output a bit.
2004-12-29 02:11:31 +00:00
joff
3a8922c4d8 descend into TS7200_flash_0x60660000 2004-12-28 16:19:41 +00:00
jmc
a6be320e8b Make sure all objects strip out the .eh_frame section and force libsa/etc to
also do this for their objects. Otherwise this creates bootblocks that
are too large w. binutils 2.15
2004-12-28 07:50:00 +00:00
joff
60b9b5a6ef do things the todr(9) way 2004-12-27 02:46:22 +00:00
joff
3f09dcaa18 Add tsrtc to TS-7200 config 2004-12-27 02:44:38 +00:00
joff
bb0dbb71f1 Clean up autoconf stuff 2004-12-27 02:42:49 +00:00
joff
cff4f0088d Add support for TS-5620 daughter card RTC 2004-12-27 02:41:54 +00:00
joff
0ac1f404ba support watchdog timer on TS-7200 CPLD 2004-12-26 22:02:10 +00:00
yamt
3954031773 enable debug code in pmap_emulate_reference. ok'ed by Jason Thorpe. 2004-12-25 06:35:30 +00:00
christos
2c2559cb73 PR/28773: Takahiro Kambe: Support for newer cpu's in enhanced speedstep 2004-12-24 17:37:43 +00:00
joff
b6d96c3c3d Pad .sdata section to a 4-byte boundary so that the .image section
is always aligned.  This makes md_root_loadaddr always 4 byte aligned.
Without this, may get an un-aligned access trap before we even print
anything on the console which was a pain in the neck to debug since so
early in the bootstrap the CPU usually just halts on exceptions.
2004-12-24 16:17:27 +00:00
shige
d2306c8cf3 Add functions:
- com_opb_cnattach
	- com_opb_device_register
2004-12-24 14:55:50 +00:00
joff
881290e4de add netbsd-wd0, netbsd-sd0, netbsd-epe0 configurations 2004-12-24 10:53:34 +00:00
joff
eadf291885 On-chip EP93xx UART support 2004-12-24 10:34:27 +00:00
joff
a1ed993cf1 generic TS-7200 gzboot support 2004-12-24 10:33:54 +00:00
joff
04fb7eeb00 support for gzimg's in TS-7200 Redboot on-board flash 2004-12-24 10:32:40 +00:00
joff
23fe936a38 bump default U-area size from 8KB to 64KB, 8KB is too little to even successfully boot a tsarm SBC 2004-12-23 04:39:41 +00:00
joff
e8d2af9dd0 Need these files present for ISA support 2004-12-23 04:36:18 +00:00
joff
419237bbb9 generic kernel configuration for TS-7200 SBC's 2004-12-23 04:35:01 +00:00
joff
cf4725f858 build configuration metadata for TS-7200 SBC 2004-12-23 04:34:03 +00:00
joff
01f7ff5bd1 PC/104 aka ISA bus support on TS-7200 2004-12-23 04:31:47 +00:00
joff
e95044fa10 CompactFlash IDE controller glue 2004-12-23 04:30:50 +00:00
joff
37b0a6b3f3 TS-7200 onboard CPLD driver 2004-12-23 04:30:19 +00:00
joff
5494e0fbe9 TS-7200 magic numbers/structs 2004-12-23 04:29:38 +00:00
joff
9817c7eefb TS-7200 machdep initialization 2004-12-23 04:28:31 +00:00
joff
16a20082fa TS-7200 SBC epcom UART glue 2004-12-23 04:27:56 +00:00
joff
781176b751 char major 107 to ep93xx processor UART driver epcom 2004-12-22 19:23:18 +00:00
joff
ece4d58532 support high vectors on ARM9 2004-12-22 19:18:13 +00:00
joff
0fac6fa89b ep93xx ARM system-on-chip support 2004-12-22 19:14:11 +00:00
joff
c1caa5af5e ep93xx processor system tick timer and microtime()/delay() impl 2004-12-22 19:13:32 +00:00
joff
2980391051 ep93xx ARM system-on-chip support 2004-12-22 19:12:21 +00:00
joff
81551c0b8b ep93xx processor on-chip USB OHCI driver glue 2004-12-22 19:11:49 +00:00
joff
4eeab77519 ep93xx processor on-chip 1/10/100 ethernet MAC driver 2004-12-22 19:11:10 +00:00
joff
4e771f5ddb ep93xx processor on-chip UART driver 2004-12-22 19:10:25 +00:00
joff
e98c2a1dac ep93xx processor system tick timer and microtime()/delay() impl 2004-12-22 19:09:29 +00:00
joff
9241ff0062 ep93xx processor bus_space impl 2004-12-22 19:08:16 +00:00
joff
91e542a4f5 ep93xx processor VIC interrupt controller support 2004-12-22 19:07:14 +00:00
fvdl
a5e7e03043 Use fixed mode, not lopri, for delivering IO interrupts. Suggested by
Peter O'Kane. Fixes interrupt problems on some Xeon systems.
2004-12-21 11:33:04 +00:00
sekiya
d7a784e1a7 Recognize mec as a valid netboot device. Add IP12 to the wdsc comment. 2004-12-18 00:51:30 +00:00
sekiya
523a6664f4 Nuke MIPS64; we'll use MIPS3 to indicate the presence of MIPS3 instructions
and _LP64 to indicate that 64-bit is desired.

Pointed out by simonb@
2004-12-17 22:59:49 +00:00
shige
cef61c32cd X1226 RTC is connected to IBM405GPr On-chip IIC(I2C).
These files were already moved to sys/dev/i2c.
We don't need these files.
2004-12-17 19:41:04 +00:00
shige
eb555844f1 Substitute PPC405_ with PPC_IBM405_. 2004-12-17 16:23:57 +00:00
briggs
38ffdc4f30 Back out part of previous. OF_open() works fine with /chaos/control, but
is a bit picky about interrupts.
2004-12-17 05:44:12 +00:00
briggs
78776b6678 - Avoid looking for lost interrupts when recalculating interrupt priorities.
- Use atomic_setbits_ulong() for softintr().  Thanks to Tim Kelly for
  reminding me about atomic_*.
2004-12-17 05:42:30 +00:00
is
80dd3cea87 new world order 2004-12-16 21:51:04 +00:00
tsutsui
25c45d8b5f Now ctrl_led is set in locore.s so remove it from machdep.c. 2004-12-16 12:14:51 +00:00
tsutsui
b3da46dc10 - Use macro for CTRL_POWER port
- Store machine dependent CTRL_LED address in ctrl_led
- Fix LED debug functions to use stored MD values

Actually I only used these debug routines at the very early porting stage
before I got working kernel printf. Heh.

XXX: news1200 has not been tested for many years.
2004-12-15 17:30:46 +00:00
tsutsui
62724bfcae Add definitions for ports CTRL_POWER and CTRL_LED. 2004-12-15 17:22:11 +00:00
tsutsui
7c2dd89551 Backout previous because:
- we should fix genassym.sh to generate proper unsigned values rather than
  remove use of such values in each source
- 0xe0dc0000 is port to control LED so INTIOBASE1700_OFF is not proper name
- these LED debug code didn't work on news1200 and it should be fixed anyway
2004-12-15 14:03:52 +00:00
jmc
a00ad2295a Due to cpp always treating constants as signed and gas no longer accepting
X - -Y in any form, need to convert a subtract into + (-1 * val).
2004-12-15 05:21:36 +00:00
jmc
e2fee8d9b1 Convert -MMU_68040 into a form gas will take now (-- isn't valid) 2004-12-15 05:03:23 +00:00
jmc
11ea356c3f Convert expression for (0xe0dc0000-INTIOBASE1700) directly within a cpp
macro as otherwise gas gets handed an X - -Y expression and w 2.15 it won't
treat that as a valid expression
2004-12-15 04:56:13 +00:00
briggs
6aba8dfd50 * Don't try to clear the screen if we failed to map it.
* Don't try to call OF_open for /chaos@F0000000/control@B -- it hangs.
2004-12-15 04:52:05 +00:00
jmc
051513394b Use correct locator name 2004-12-15 04:09:29 +00:00
jmc
60c10a987e If LKM deal w. locators different 2004-12-15 04:09:16 +00:00
jmc
0c600e6739 Add a missing include for locators.h 2004-12-15 03:56:20 +00:00
tls
c1545077ff Terminate the domain on RB_HALT, not just on reboot. This avoids looping
around a cngetc() that will never return while "halted", which is rude,
and which also requires domain 0 to not just restart us, but kill us
first.  Suggestion from Michael Kukat (though this change is not the
same as the one he suggested).

Will cngetc() actually return something when running in domain 0 with a
VGA console?  I don't think it will; if it actually does, we should make
this behaviour depend on whether we're in domain 0 or some other domain.
2004-12-14 18:07:42 +00:00
tls
2f6318305f Change confusing name HYPERVISOR_yield to HYPERVISOR_sched_op as suggested
by Michael Kukat.
2004-12-14 17:13:56 +00:00
christos
2294df2c80 Move the definition of sccA from zc.c to machdep.c and always initialize it.
This way we save a mess of #ifdefs. XXX: This code is disgusting. Drivers
should not communicate with the rest of the kernel by means of global variables.
2004-12-14 16:28:00 +00:00
chs
267af995b7 use the generated macros in locators.h rather than hard-coded numbers
to index the cf_loc[] array.  reviewed by allen briggs.
2004-12-14 02:32:02 +00:00
tls
db47b27974 HYPERVISOR_yield is one of the hypervisor calls that's "overloaded"; it
does different things depending what's in %ebx.

We weren't setting %ebx here *at all*; so we did not get SCHEDOP_yield,
which was what was wanted; so unpredictable things happened, notably
immediate return to the NetBSD idle loop, in other words spinning on CPU.
Definitely not cool!

Michael Kukat caught this one and suggested this fix on port-xen.
2004-12-13 19:33:56 +00:00
sekiya
c01662e204 Add prototype for r5k_sdcache_wbinv_range_index() 2004-12-13 08:39:50 +00:00
sekiya
07b6e1e982 Implement r5k indexed writeback-invalidate, and fix usage of Page_Invalidate_S.
Originally written by rafal@ back in April 2003.  Field-tested by many
people since.

(I am not committing the pmap hack at this time; although pmap changes are
necessary to fully address the r5k panic/coma problems, the implementation
needs further thought)
2004-12-13 08:39:21 +00:00
sekiya
d1eab478d8 Remove gratuitous use of MIPS1/MIPS3. 2004-12-13 08:31:54 +00:00
sekiya
d45f3ffb2c MIPS3_CONFIG_SC is an unreliable indicator for SC presence; r5k_enable_sdcache()
will gracefully exit if there is no secondary cache.  Rework #ifdef'd out
r5k cache code to take this into account, and remove pointless r10k case.
2004-12-13 08:30:58 +00:00
chs
f873a82973 for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
2004-12-13 02:39:07 +00:00
chs
25c1fe704b rather than duplicate the contents of the MI version of this file,
just include it and redefine the one thing that we want to be different.
2004-12-13 02:36:50 +00:00
chs
fa37aec784 remove an unused macro (which was also removed from the sh3 version of this). 2004-12-13 02:34:03 +00:00
chs
f91d38c18c adjust for b_bcount changing from long to int. 2004-12-13 02:33:06 +00:00
chs
1da81163d5 for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
2004-12-13 02:31:56 +00:00
chs
0ded74691b for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
2004-12-13 02:14:13 +00:00
abs
964859d895 Fix comments regarding configration bounaries 2004-12-12 21:03:06 +00:00
abs
5958dd944e Fix comments slighly 2004-12-12 20:42:53 +00:00
tsutsui
29ec4fefaa news68k/locore.s directly includes <machine/trap.h> and
m68k/copy.s directly includes <sys/errno.h>,
so remove definitions for them from assym.h.
2004-12-12 10:26:36 +00:00
tsutsui
e76635baae Remove definitions for EFAULT and ENAMETOOLONG.
m68k/copy.s directly includes <sys/errno.h>.
2004-12-12 10:22:20 +00:00
tsutsui
3725e9832e u_intXX_t -> uintXX_t 2004-12-11 03:32:27 +00:00
jmc
d33fb8436c Fix some improper casts now that b_count is an int 2004-12-10 20:05:05 +00:00
christos
142373a47b dkvar.h now needs bufq.h, and now xen compiles again. 2004-12-10 18:54:08 +00:00
christos
78db5aa65d catch up with field name rename. 2004-12-10 18:53:43 +00:00
christos
d0f26be538 Just when I thought it was all working... Unfortunately cpu.h defines
clockframe -> intrframe, but that is included too late, because this
file includes systm.h and it is in the path of including systm.h. Fix
it by not including <systm.h>; it was only needed for the panic() calls
which I have disabled, since they look more like debugging calls to me.
Also add forward struct declaration for trapframe.
2004-12-10 18:51:15 +00:00
christos
d4ea0343bc don't use va_list here; use _BSD_VA_LIST_ because we could be included
before va_list is defined. This is common practice for kernel header
files (syslog.h)
2004-12-10 18:49:02 +00:00
christos
174c6b074b Move the disable_intr and enable_intr functions from xenfunc.h to cpufunc.h,
because the x86/intr.h needs them and does not include xenfunc.h. Including
xenfunc.h in cpufunc.h is a clear lose because xenfunc.h needs a boatload
of include functions in order to compile.
2004-12-10 18:47:52 +00:00
matt
eb30eca3e3 Add -Wa,-maltivec so that AltiVec instuctions will be recognized. 2004-12-09 22:57:12 +00:00
briggs
b222b60d4a Start I/O range at base+0x1000 to avoid 0. 2004-12-09 04:40:20 +00:00
briggs
f31e26a3dd Several changes from Michael Lorenz. Adapted from PR port-macppc/27680.
1. Reset SCSI bus & MESH on reboot to keep OF happy.
2. Tweak interrupt handler to clear interrupt register again if we get a
   CMDDONE interrupt with DMA active and a 0 fifocnt.  It's not clear why
   this is necessary, but is well documented in some other open source
   drivers.  This enables synchronous mode to work.
3. Dump a little more information if we do get a timeout.
2004-12-09 04:37:30 +00:00
briggs
d6a3e9bb82 Apply patch from Makoto Fujiwara (and Timm Wetzel) in PR port-macppc/15505
to enable internal modem for KeyLargo and Pangea.
2004-12-09 03:19:56 +00:00
briggs
a20a28eda2 Add wi devices so that devices can install over wireless LAN.
Addresses part of PR port-macppc/26466 from Chris Scott.
2004-12-09 02:54:18 +00:00
briggs
2268345329 Add VIA Rhine to install kernel.
Addresses PR port-macppc/26459 from Daan Goedkoop.
2004-12-09 02:46:01 +00:00
briggs
82b7820648 Revamp the old-world interrupt support based on better understanding of
the hardware.  Inspired by Michael Lorenz with some hints from OpenDarwin
sources.  Thanks to Michael for beginnings of the patch and for both
discussion and testing.  Thanks to Tim Kelly and Riccardo Mottola for
further testing.
2004-12-09 01:43:37 +00:00
matt
42e9e00c87 Make MSIZE and MCLSHIFT overrideable in <machine/param.h> 2004-12-09 00:37:54 +00:00
reinoud
a80eefb9fc Accidently added SMBfs support as default wich is still declared as
expirimental to my knowledge.
2004-12-08 13:30:10 +00:00
reinoud
4dddbc1c21 Add IPv6 support like all other architectures do and add NetBSD 2.0
binary compatibility
2004-12-08 13:28:27 +00:00
reinoud
ce52f6650b Add NetBSD 2.0 compatibility setting 2004-12-08 13:24:49 +00:00
reinoud
fc45116dff Add IPv6 support as default since all ports now have it as default; no use
to delay NC's since it doesn't that much memory too.
2004-12-08 13:23:45 +00:00
briggs
710cfd7aef Add MPC7400 to the list of CPUs for which we try to measure the speed.
Noticed missing by Tim Kelly.
2004-12-08 03:07:03 +00:00
chs
bc7f8afb31 use the m68k-common procfs_machdep.c on all m68k platforms. 2004-12-08 02:32:33 +00:00
thorpej
dffe7d8e8d READ_CAPACITY -> READ_CAPACITY_10 2004-12-07 23:14:03 +00:00
thorpej
ce91ac7d6b USe more appropriate macro/struct names for READ/WRITE (6) and
READ/WRITE (10).
2004-12-07 23:07:31 +00:00
thorpej
d5083f78be Use "struct scsipi_command" in internal command structures so that
we have enough space for 16-byte CDBs.
2004-12-07 22:23:45 +00:00
thorpej
a974bfe8ce - Use the cmdlen specified in the scsipi_xfer structure. Keying off
the command group ID won't necessarily work for vendor-specific commands.
- Expand the storage in the SC_REQ structure to account for 16-byte commands.
2004-12-07 21:12:42 +00:00
briggs
f06d48126e Bring in some code to deal with devices in the lower slots of a UMAX S900
and perhaps PowerMac 9500.  These slots sit behind a PCI-PCI bridge, and
devices in those slots inherit the PCI-PCI bridge interrupt.  Derived from
a patch submitted in PR port-macppc/26341 by Michael Loreny, who was also
diligent in prodding me to look at it.
2004-12-07 15:42:08 +00:00
thorpej
d41e8f00bf Don't use "struct scsi_generic" in a hardware-defined structure. Instead,
use an array of 12 bytes.  Check the incoming CDB to see that it will fit,
and print and error and fail the command if it won't.
2004-12-07 14:50:56 +00:00
briggs
6fec1d4f73 OpenFirmware on machines with the "Grackle" bridge assign an 'AAPL,interrupts'
property instead of 'interrupt-map' and 'interrupt-map-mask' properties.
Adjust for this by checking for the latter, and if they're not present
(and the parent isn't 'pci-bridge'), then look for 'AAPL,interrupts'.

Problem analyzed and patched by Tim Kelly on port-macppc.  I modified the
patch to move the fallback into find_node_intr(), tweaking some previously-
disabled code.
2004-12-07 13:22:51 +00:00
chs
cf58c69b3e use the m68k-common procfs_machdep.c on all m68k platforms. 2004-12-07 04:33:24 +00:00
cube
99b014db5e Add ixpide(4). 2004-12-06 19:28:12 +00:00
briggs
52af8374ec Minor (old) patch from me to correct CPU ID of 604e vs. 604ev.
Tested by Tim Kelly.
Also patched from Tim to
 - Delay longer for second CPU spinup.
 - Only attempt to print CPU speed and cache configuration on certain
   CPU types.
2004-12-06 04:15:03 +00:00
chs
2a728789eb elf2bb is a host program, don't assume that m68k pointer alignment is
sufficient.  fixes PR 27055.
2004-12-04 16:23:31 +00:00
chs
e3f37f50b8 the arguments to BUS_ADDR() are (space, offset), not the other way around.
fixes PR 26472.
2004-12-04 16:19:36 +00:00
matt
080d581a20 Make sure to enable interrupts before lower IPL so we don't block any
interrupts (IPI) we shouldn't.
2004-12-04 05:56:28 +00:00
chs
5500ae7993 remove cache_flush_virt() and PADDRT, they're no longer used.
allocate a stack frame for blast_dcache() when profiling so it shows up.
in dcache_flush_page(), use a stride of 32 instead of 16 to match the
cache line size.  correct various comments.
2004-12-03 02:04:00 +00:00
chs
2db3939de3 remove dead code and other minor cleaning. 2004-12-03 01:54:14 +00:00
xtraeme
76025558e1 Add ACPI joy(4) attachment, based on lpt_acpi.c by jmcneill@,
reviewed and ok'ed by cube@ and martin@.
2004-12-02 14:33:31 +00:00
xtraeme
347378fc9f Add ACPI mpu(4) attachment, based on lpt_acpi.c by jmcneill@,
reviewed by christos@, cube@ and martin@.

While here, remove a printf() in mpu_attach() (ic/mpu.c) to remove
an empty line in some frontends (mpu_isa.c, etc).
2004-12-02 09:50:41 +00:00
grant
9204390fe4 add iteide(4) driver for ITE8212-based IDE controllers. from
OpenBSD, ported to NetBSD by me.

ok'd by bouyer@, thorpej@.
2004-12-01 22:27:45 +00:00
shige
4b61add729 Add header file for IBM405XX(AMCC405XX) Device Control Registers. 2004-12-01 17:55:33 +00:00
martin
416a47df13 Better return value checking for pseg_get/pseg_set. Turn Debugger() calls
into proper panics and sprinkle some KASSERTs. Closes PR 27288.
2004-12-01 09:48:03 +00:00