Commit Graph

2744 Commits

Author SHA1 Message Date
rkujawa b57caf8fee Add driver for Delfina 1200 / Delfina Flipper. Useless now (doesn't support
audio or DSP), but is able to disable interrupts which is important if booting
NetBSD from AmigaOS to avoid unhandled interrupts.
2012-11-08 18:30:21 +00:00
rkujawa 3b84b9cffd Make Amiga video drivers work again after device/softc changes.
Patch from chs@.
2012-11-08 18:04:56 +00:00
rkujawa 208853a9ca Add sc_dev removed previously in a moment of insanity. How did this ever work
is beyond me.
2012-10-30 01:17:24 +00:00
rkujawa 0efb944636 Apparently, clockport present at offset 0xC00 is the first clockport. 2012-10-29 23:45:34 +00:00
phx 742208e873 Fixed receiving of odd-length packets. Driver works now perfectly.
Thanks to Harald Meinzer for providing me with a Hydra for a few days.
2012-10-27 21:13:03 +00:00
chs cbab9cadce split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
2012-10-27 17:17:22 +00:00
phx d539a37d01 Fixed dependencies for some new PCI and clockport devices, to make a
kernel compile without them.
2012-10-27 11:54:21 +00:00
apb f3929b106b Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
2012-10-17 14:48:07 +00:00
phx c8ba8ca4a7 CV3DONZORRO2 option is no longer needed.
grf_cv3d.c was successfully tested running in a Zorro2 slot.
2012-10-14 20:33:17 +00:00
phx 4468ae6d60 New ed(4) device driver for Hydra and ASDG Zorro2 bus network cards.
This driver is based on the MI dp8390 backend.
2012-10-14 13:36:07 +00:00
msaitoh 4a418e8c7d Fix typos 2012-08-24 09:01:22 +00:00
abs 3267a6b9fe Update all kernel configs mentioning WSEMUL_* but not already including
WSDISPLAY_COMPAT_USL using the following rules:
- If WSEMUL_ is commented out, add commented out out WSDISPLAY_COMPAT_USL
- If INSTALL or obviously memory constrained, add WSDISPLAY_DEFAULTSCREENS=1
  and commented out WSDISPLAY_COMPAT_USL
- Otherwise add WSDISPLAY_COMPAT_USL

Some of the INSTALL configs for larger memory machines are probably suitable
for adding WSDISPLAY_COMPAT_USL.

Now wsconscfg(8) should be able to switch VTs when expected.

Implemented after no objection from tech-kern to the following:

On 5 June 2012 09:47, David Brownlee <abs@absd.org> wrote:
> wsconscfg(8) requires WSDISPLAY_COMPAT_USL in order to switch virtual
> terminals.
>
> Except when in an exceptionally memory or space constrained
> environment (INSTALL being the obvious case), is there any reason why
> all GENERIC and GENERIC-like kernels which have wscons enabled
> shouldn't also have WSDISPLAY_COMPAT_USL?
2012-08-17 20:11:37 +00:00
rkujawa a06ac903b3 Declare physmem extern. It is actually initialized in amiga_init.c
(using RELOC). Discussed with martin@ and is@. Probably similar fix should
be applied to other m68k ports, but amiga is the only m68k machine I have.
2012-08-03 13:14:20 +00:00
bouyer 9edd4d81c5 Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
2012-07-31 15:50:31 +00:00
mlelstv 8ce4433821 Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.

No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().

Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().

Make cpu_rootconf(9) describe the calling order.
2012-07-29 18:05:39 +00:00
matt f96ef7b3c5 Remove safepri and use IPL_SAFEPRI instead. This may be defined in a MD
header file (if not, a value of 0 is assmued).
2012-07-27 05:36:09 +00:00
jakllsch 102f7b2016 Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@
2012-07-26 20:49:44 +00:00
jakllsch 5b9a15ee6c Revert dsl@'s changes of Sun, 15 Jul 2012 10:55:35 +0000 and
Sun, 15 Jul 2012 10:56:50 +0000, excepting the kernel version bump.
First step in reverting regressions to ata(4) subsystem during the addition of
port multiplier support.
2012-07-24 14:04:28 +00:00
dsl c9fe3ca8c3 Some namespace protection (and add greppablity).
Prefix the DRIVE_ and DRIVET_ constants from atavar.h with ATA_.
Don't use an enum for drive_type - you don't know how big it will be.
Move driver_type to avoid implicit structure padding (esp on arm).
This change is purely lexical and mechanical.

Update to 6.99.9 - this wasn't done when the SATA PMP changes
were made - I'm sure they warranted a bump.
2012-07-15 10:55:27 +00:00
rkujawa 3d8ca501bb Clean up p5pb console glue a bit. 2012-07-13 08:47:07 +00:00
rkujawa 2acf437055 Fix incomplete bus_dma tag. 2012-07-11 19:14:17 +00:00
rkujawa 68f1c0c41b Add support for all 4 slots of G-REX 4000D and G-REX 1200. Also add
(untested yet) DMA support for G-REX bridges.
2012-07-11 17:13:30 +00:00
rkujawa 0c335b5395 Don't enable wsmouse in a non-WSCONS kernel. 2012-07-09 19:42:14 +00:00
rkujawa 1289b24043 PR port-amiga/46672
Removed surpluss semicolon after if().
2012-07-09 19:34:56 +00:00
rkujawa 78370fcd4d Remove unused sc_dev. Thanks to cegger@. 2012-07-09 19:32:26 +00:00
rkujawa efa7930ac2 Set user page table base address dynamically on amiga. This unbreaks machines
with large Zorro III I/O spaces. Patch originally by Michael L. Hitch.
Test on an A4000.
2012-07-09 19:23:45 +00:00
bouyer 03c9df05c6 Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
  probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
  really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
  ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

propagate these changes to the ATA HBA drivers, and add support for PMP
to ahcisata(4) and siisata(4).

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
  with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
  University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
  when SATA cable move was needed
2012-07-02 18:15:44 +00:00
rkujawa df72fa039f Obtain sc using device_private(), cosmetic changes. 2012-06-28 18:55:03 +00:00
rkujawa 7f2c857092 Fix Mediator 1200 memory space support. Now it's good enough to drive a Voodoo 3. 2012-06-27 18:53:03 +00:00
rkujawa c0da2f8bbc Regen configs. 2012-06-07 23:32:47 +00:00
rkujawa 661b5de9c5 Enable empb in GENERIC, fix build, rearrange files.amiga. 2012-06-07 23:30:52 +00:00
rkujawa e38ac060b1 Finally add support for memory space access for empb(4). Buggy but better than nothing. 2012-06-04 19:45:50 +00:00
rkujawa fca4069ffb Fix PCI interrupt handling on empb. Also, continue work on memory accesses. Now empb is good enough to handle satalink! 2012-06-04 12:56:48 +00:00
rkujawa cf943d0f86 Add support for PCI_NETBSD_CONFIGURE in empb(4). Continue work on memory window. 2012-06-01 17:41:16 +00:00
rkujawa 68cabd119e More work on PCI memory accesses on empb(4). 2012-06-01 09:41:35 +00:00
rkujawa 160a9cb006 Add empb(4) functions to switch memory window position. 2012-05-31 21:29:02 +00:00
rkujawa f64d6f5619 Add a driver for Elbox Mediator 1200 PCI bridges. This is still a work in
progress, but now it is good enough to drive a NE2000 card. Support for
memory space accesses will be added soon(ish).
2012-05-30 18:01:51 +00:00
rkujawa 54b5fa0cef Cosmetic change - print newline during autoconf. 2012-05-18 20:52:02 +00:00
rkujawa 057fe0cc5b regen configs 2012-05-15 17:39:50 +00:00
rkujawa 9f18d1594f - Split X-Surf driver from if_ne_zbus, rework, add support for clockports present on X-Surf boards.
- Add gencp(4), a driver for generic clockports (it just needs a base address).

Approved by phx.
2012-05-15 17:35:43 +00:00
tsutsui 485e133a8e Add dummy bus_dma(9) typedefs (enabled by __HAVE_NO_BUS_DMA) in <sys/bus.h>
for ports which don't bother to have unnecessary bus_dma(9) implementation
to appease MI driver modules that require bus_dma_tag_t.

For amiga, move <m68k/bus_dma.h> inclusion from <machine/pci_machdep.h>
to <machine/bus.h> since amiga will want actual bus_dma(9) in future
for PCI devices.

Fixes builds on sys/modules/if_axe etc on ancient ports.

"Sounds good" from martin@ on port-m68k@.
2012-05-07 18:16:38 +00:00
rkujawa 1bd1939218 regen configs 2012-04-17 10:06:32 +00:00
rkujawa 19eda64f80 Add clockport(4) layer, which provides support for expansion bus present on
Amiga-style clockports. Also add a1k2cp(4) backend driver and the first
clockport device driver com_ss, that supports com(4) on clockport(4)
(particurarly Individual Computers SilverSurfer). Disabled by default,
since probe procedure is not written yet.
2012-04-17 09:59:03 +00:00
rkujawa 5317f873b5 Workaround for the fake X-Surf autoconfig entry, created by the Deneb firmware v11. 2012-04-09 19:55:00 +00:00
christos 7484a2dbbe - Normalize inclusion protection (remove)
- Move CHAR_{MIN,MAX} to a common file.
- Fix broken comments
2012-03-28 17:03:27 +00:00
elad 0c9d8d15c9 Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

    http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
    http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
    http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.
2012-03-13 18:40:26 +00:00
joerg 99c3eea80c P1003_1B_SEMAPHORE is no longer optional. 2012-03-10 21:51:48 +00:00
rmind ad12c77015 Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
2012-02-19 21:05:51 +00:00
matt 1d7f24ead8 Change old-style function defintions to C89 prototypes.
Approved by releng.
2012-02-12 16:34:06 +00:00
para 4c23b30cff proper sizing of kmem_arena on different ports
PR port-i386/45946: Kernel locks up in VMEM system
2012-02-10 17:35:47 +00:00
para 8c064ceca8 adapt to extent(9) changes 2012-01-29 15:32:52 +00:00
rkujawa 5bf221d43d Add voodoofb support. Allows using 3Dfx Voodoo 3 in G-REX as a console. 2012-01-24 00:19:39 +00:00
rkujawa 91aeeb8582 Don\'t forget to disable atabus* when disabling the efa driver. 2012-01-19 22:43:11 +00:00
rkujawa f4fc0ec1f7 User reported that efa driver attached when FastATA hardware was absent, but 4x EIDE splitter was present. Disable efa in GENERIC until problem is solved and/or better probe function is written. 2012-01-19 22:11:49 +00:00
rkujawa 1502adf2fa Tons of enchancements to MD PCI code:
- The G-REX 4000 and G-REX 1200 are now really supported and working (still only 1st slot but the rest are a matter of time).
- Add bridge identification to p5pb, simplifies the driver and make it more user-friendly.
- Retire P5PB_GENFB and P5PB_OLD_FIRMWARE options, these are now handled automatically, depending on used hardware and firmware.
- Add PCI bus reconfiguration support to p5pb (PCI_NETBSD_CONFIGURE), allows using G-REX without boot to AmigaOS.
- Bring p5pb registers desription up to date with my knowledge.
- Add a lot of debugging code to p5pb (enabled by P5PB_DEBUG kernel option).
- Fix PCI_NETBSD_CONFIGURE in mppb (now it really works).
- Fix quirk handling in zbus.
- Update GENERIC.in and regen the kernel configs.
- Misc cleanup.
2012-01-19 00:14:08 +00:00
rkujawa 71d4ff0745 Make it actually build without PCI_NETBSD_CONFIGURE too. 2012-01-13 13:41:25 +00:00
rkujawa 6bd585b6bd Make it build without PCI_NETBSD_CONFIGURE too. 2012-01-13 13:36:36 +00:00
macallan 449763bb95 adjust wsfont_find() 2012-01-11 21:12:36 +00:00
rkujawa e1ed37bef6 Add cv3dpb, a driver for CyberVision64/3D PCI bridge, which was split from p5pb. 2012-01-11 17:04:29 +00:00
rkujawa 363ad7afb3 Changes to Phase5 hardware support:
- Rework p5pb driver - simplify, cleanup, make more flexible.
- Add p5membar driver, which handles PCI resources autoconfigured by the firmware.
- Introduce intermediate p5bus layer, between zbus and CSPPC/BPPC on-board devices (p5pb, cbiiisc, bppcsc).
- Add experimental G-REX support to p5pb (first slot support only).
- Split CV64/3D PCI bridge support into separate cv3dpb driver (to be committed later).

Approved by phx.
2012-01-10 20:29:49 +00:00
mlelstv e932471de0 regen from GENERIC.in 2011-12-26 13:09:03 +00:00
mlelstv db2549249c Add putter device to generic kernels. 2011-12-26 13:07:24 +00:00
tsutsui b417004b5f Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.
2011-12-22 15:33:28 +00:00
dholland 7bbf82b772 WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
2011-12-18 05:49:22 +00:00
phx 01173747fc Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
2011-12-15 14:25:12 +00:00
mrg 9a4a666ff3 implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places.  avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.
2011-12-12 19:03:07 +00:00
tsutsui 6218939425 Make sure to call pflusha before (not after) enabling MMU on
68030/68851 initialization paths.

Pointed out by isaki@ per observation of ATC status on XM6i emulator.
Tested on TT030, HP362, NWS-1750, and X68030 by me.

XXX: probably we can remove existing pflusha or TBIA calls after MMU turned
XXX: on (and before enabling cache) but I leave them as is for now to avoid
XXX: unexcpected side effects.
2011-11-26 14:05:52 +00:00
jmcneill 8a962f23f2 Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

  Add MP locking to the audio drivers.

  Making the audio drivers MP safe is necessary before efforts
  can be made to make the VM system MP safe.

  The are two locks per device instance, an ISR lock and
  a character device lock. The ISR lock replaces calls to
  splaudio()/splx(), and will be held across calls to device
  methods which were called at splaudio() before (e.g.
  trigger_output). The character device lock is held across
  calls to nearly all of the methods, excluding some only
  used for initialization, e.g. get_locks.

Welcome to 5.99.57.
2011-11-23 23:07:28 +00:00
tls a22a3917ac The rnd pseudo-device is not really optional, because it is in the same
source file as the entropy-pool code itself.  Move it to std.  This
will be cleaned up more when I split the sources up as they should be.

This fixes build breaks on several ports.  Thanks to Havard Eidnes for
pointing them out.
2011-11-22 21:24:51 +00:00
mlelstv 341a625922 identifycpu() is not just cosmetic for the banner but initializes how FPU
contexts are saved.
Also drop code that checks for fputype before it is determined.
2011-11-17 07:45:53 +00:00
tsutsui e179a96fd3 Move spread getsfc() and getdfc() functions into common m68k/support.s.
Note:
- ENTRY_NOPROFILE() is okay since they are used only for debug printf
- they are declared to return int so no need to put a return value into %a0
2011-11-15 10:57:00 +00:00
rkujawa faff4b1af3 Simplify bus space mapping. 2011-11-05 17:44:25 +00:00
rkujawa 2e23399ee2 regen kernel configs 2011-10-30 11:19:56 +00:00
rkujawa 4e1e3afac4 Enable efa in GENERIC. 2011-10-30 11:16:05 +00:00
rkujawa 9d89628a47 Improve probe procedure in efa(4). Update man apge to reflect this. 2011-10-30 11:10:42 +00:00
rkujawa 0dd2fda376 Update comment (mention added 32-bit methods). 2011-10-30 08:33:43 +00:00
rkujawa 9f8ca4f47e Allow 32-bit transfers for drives which support it. Add missing bus_space methods needed for such transfers. 2011-10-29 19:25:19 +00:00
rkujawa 361194f4ef Fix style (pointed out by phx). 2011-10-29 11:16:19 +00:00
rkujawa 32850ee9da regen kernel configs 2011-10-27 22:13:41 +00:00
rkujawa 25abb1786a Add driver for ELBOX FastATA 1200 Mk-III/Mk-IV (and the man page). 2011-10-27 22:12:23 +00:00
rkujawa 262fb5f975 P5PB_MATCH_CV643D is supposed to be disabled by default 2011-10-07 23:08:33 +00:00
rkujawa 1190cfb430 Added experimental support for CV64/3D PCI bridge to p5pb(4). Approved by phx. 2011-10-07 08:44:21 +00:00
chs 4b3d270286 build cread.c with -O1 to work around a gcc 4.5 bug. 2011-10-04 04:04:15 +00:00
christos 31674ac746 don't mark vers.c phony. 2011-10-02 18:30:50 +00:00
rkujawa e6f3c8ee59 Remove zbusmap prototype from bus.h (now in zbusvar.h) 2011-09-21 13:05:32 +00:00
christos 96c3e77145 no parameter names. 2011-09-21 12:48:57 +00:00
rkujawa 3e2616d8d1 Fix build for both amiga and amigappc (discussed with christos). 2011-09-21 12:40:25 +00:00
christos e1cb9e9e42 try to make this compile again. 2011-09-20 18:11:51 +00:00
rkujawa 0d5229b834 Minor changes to Amiga PCI MD code:
- Add bus enumeration and resource assignment (PCI_NETBSD_CONFIGURE) to mppb(4) - no more need to run AmigaOS to configure the bus.
- Add PCI configuration address register to p5pb(4).
- Add PCI I/O space support to p5pb(4).
- Move common code from p5pb(4) and mppb(4) to new pci_machdep.c file.
- Fix style.
2011-09-19 19:15:28 +00:00
rkujawa 7f06d42d8f Add driver for Prometheus PCI bridge.
Change approved by phx.
2011-09-17 16:55:34 +00:00
rkujawa 86a4d8f318 Fix typos (make this compile again...) 2011-09-16 10:23:01 +00:00
christos d1e409fc48 add c99 initializers. 2011-09-15 12:50:00 +00:00
rkujawa f2b08a0344 Fix typo, add missing include (make this compile again). 2011-09-14 09:19:09 +00:00
christos 24fd4911c2 Use c99 struct initializers so that this compiles. 2011-09-13 19:21:20 +00:00
bouyer a47e2eb758 Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
2011-08-30 12:39:49 +00:00
rkujawa f02273fb5e Add basic PCI support for amiga port.
Add missing bus_space(9) methods needed for MI PCI.
Add p5pb(4) - Phase5 PCI bridge driver (and the man page).
Add quirks table to zbus(4) - needed for p5pb.
Change approved by phx.
2011-08-04 17:48:50 +00:00
dyoung 75ccda5a51 Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.
2011-07-26 22:52:47 +00:00
dyoung 3a45360b72 Change <machine/bus.h> to <sys/bus.h> throughout. 2011-07-19 15:55:26 +00:00
joerg 3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
mrg e3166ce34c fix previous and only force the failure if reloc2bb already failed. 2011-07-12 03:09:03 +00:00