Replace it by a variable, which is initialized in amiga_init.c.
This will make the kernel actually work even if we have lots of Zorro-III
(or DraCo direct bus) i/o space.
tty structures, and on some machines (namely the DraCo internal lpt, and some
multi-i/o boards for Amigas and DraCos), tying spltty to the pretty high printer
interupt level would hurt serial performance.
On all affected ports but Amiga, spllpt() has been defined in machine/intr.h
to be spltty(), thus preserving old behaviour. Portmasters are encouraged to
change is, if they feel something else is better (e.g., one of its own were
possible).
register anyway when the bit is set, we can safe one of the (slow) custom
chip accesses by using this bit.
Sounds ridiculous, but at a hardware FIFO depth of 1 and ~1 usec per
access (at IPL 5) it might help the highspeed addicts.
now be inserted into the kernel for a self-contained installation kernel.
No more questions or problems trying to copy the miniroot to the swap
partition.
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
a HAVE_GCC28 check-variable that can now be used to add other gcc-2.8
flags in cases where they may be useful, or to remove gcc 2.7.2 "bug
workaround" flags.)
up on systems that have Zorro I/O space allocated outside the Z2 I/O
region, and then only if kvm usage is high enough to begin allocating
pages already mapped for hardware mappings. Found and fixed by Niklas
Hallqvist on OpenBSD.
From niklas@cvs.openbsd.org:
Yay! This fixes a bug that has been there since day one of the amiga port.
We have never protected the kvm area that maps Zorro I/O registers in the
Z2 memory space from being allocated by the kmem_* routines. Lately kvm
usage has increased and we have needed more kvm allocated than earlier thus
this area have got allocated with random results. Most often resulting in
MMU fault panics, but also in hangs. This bug has stalled the amiga port
release builds for several weeks, but now I *hope* the amiga will have a
chance to be built and tested in time for 2.3.
it from the QuickLogic chip version byte.
If found, switch it to non-autorepeat mode (which seems to avoid the race
condition which made my keyboard driver / X server lose state under heavy
interupt load).
If not found, assume an Amiga keyboard on CIA-A.
XXX We should probe for the presence of the CIAs on the DraCo.
as this breaks C++ code that happens to indirectly include this header.
Both Matthias Scheler and I noticed this, independently.
This problem notably does not affect the atari and sun3/sun3x ports,
which have already implemented a similar solution.
are still in-order, but cached reads dont wait for the last write to finish.
Xamiga on a Altais in 8bit-mode became 30% faster servicing xanim (well, 6%
if you count xanim, too).
- make sure all sigreturn error conditions are reported to the caller,
instead of the place jumped to.
This is the bugfix part of pr 4628 by ITOH Yasufumi.
The performance optimization part will be handled seperately, after evaluating
its implications.
Testing on 68040 and removing the performance change from the proposed patch
by scottr. Half of the Amiga machdep.c change had to be done manually by me,
as the patchfile didn't apply cleanly.
XXX Yes, Amiga should be changed to use the common sig_machdep.c instead.
XXX Really soon now. I promise.
was converted to use Mach VM for Net2/4.4BSD. The user segment table
pointer was originally stored in the PCB. When Mach VM came along,
however, it was also stored in the pmap, and loaded into the PCB in
pmap_activate(). pmap_activate() would then note that the PCB's USTP
was now in sync with the pmap's USTP, and the low-level context switch
code would use the value from the PCB.
However, pmap_activate() would also load the hardware MMU context if
the pmap was the current pmap (or, in the case where pmaps can be shared,
such as in NetBSD, if the proc was the current proc). The low-level
context switch code would then reload the hardware _again_ using the
USTP from the PCB.
However, the optimization of not calling pmap_activate() if "stchanged"
was false ended up causing some processes to use stale USTP values from
the PCB when the low-level context switch code reloaded the hardware!
This was noticed by using a real vfork(2) (which worked for some time
before failing, surprisingly!)
Since I'm hard pressed to find any real optimization here (since the
hardware was always reloaded once, sometimes twice!), the code now always
calls pmap_activate(), which uses the correct USTP value (the one in the
pmap). The PCB's USTP is now ignored, and should eventually be g/c'd.
Another optimization can actually be performed, and I have added a comment
describing what it is, but have not yet implemented it.
Also note that most of the loadustp() functions where actually incomplete.
This has been corrected. These functions should probably be split up into
MMU-specific operations, and called indirectly, rather than doing constant
run-time decision making based on values that will never change during the
course of a boot's lifetime.
We play mono samples on all 4 channels.
However, we get the volume settings for mono samples as a symmetic two-channel
setting... the other two channels used to stay at max volume...
I believe that something else is wrong here, but dont want to change MI
code (which in turn influences a couple of MD driver) thus late in the release
cycle.
- use board address space > 4 MB, instead of iszthreepa(), to detect Z3-mode
boards. We dont want the bus, but want the address configuration.
- s/CV64CONSOLE/CV3DCONSOLE/
- s/cv3d_zorroIII == 1/cv3d_zorroIII/ and s/cv3d_zorroIII != 1/!cv3d_zorroIII/
the CyberVision64 driver. Modified by Tobias Abt with some bugfixes
from Bernd Ernesti.
ZorroII is at the moment not supported and there is a small problem
with the Console driver where you just get a black screen, but the
system boots and you can use X11 without a problem.
The changes is to allow some limited mixer manipulation through
the audio device (instead of the mixer device).
This rendered 4 methods in audio_hw_if unused so garbage collect these.
pseudo-device rnd # /dev/random and in-kernel generator
in config files.
o Add declaration to all architectures.
o Clean up copyright message in rnd.c, rnd.h, and rndpool.c to include
that this code is derived in part from Ted Tyso's linux code.
This will be used by certain SCSI drivers to limit the length of DMA transfers
when the serial port is running at higher speeds. GVP and Phase5 DMA
interfers significantly with CPU execution, and significantly increases
receive buffer overruns (silo overflow). Reducing the DMA transfer length
can reduce the overruns.
- MIT syntax to Motorola syntax moveml register lists (for better readability)
- comment alignment
- remove commented out debug or alternate code from early DraCo support
development.
(I wanted to do this stuff for a long time, but always had "more important"
things to do.)
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
NOTE: due to hardware requirement of the AGA chipset, the framebuffer width
has to be a multiple of 64 bits. An 800x600 display will use a memory width
of 832 bits, which the current X server can't handle. To get a usable
display, the width needs to be 832 or 768.
instead of bp->b_bcount. The I/O operation may have changed bp->b_bcount,
and not all of the kernel virtual memory will be freed. This will result
in the VM system putting pages back on the free list which are still
mapped. This may cause a deadlock later trying to enter pages into
the kernel pmap. [See PR#4120 for more details.]
* support chip clocks != COM_FREQ, by introducing sc_frequency (for the
mainline code) and adding a frequency parameter right after the rate
parameter to comcnattach() and com_kgdb_attach().
- Make com_isa and com_multi initialize sc_frequency to COM_FREQ.
- Make i386/machdep.c and alpha/dec_xxx.c call com*attach() with the freq.
parameter.
* supio_attach_args get two more fields: a sc_ipl and a sc_arg, both ints.
- com_supio uses the first for interupt establishment (all childs will, as
soon as they exist) and the 2nd for sc_frequency.
- drsupio passes sc_ipl alway as 5, and for the "com"s, sc_arg as 16*115200
- hyper will pass sc_ipl as 6, and sc_arg as 16 * 460800
without an 'a' partition. We open the RAW_PART partition instead.
Without this, a boot partition on the 'b' or later partition of such a disk
won't be found.
is for "standard PC i/o stuff" at known and constant locations, e.g. when
multi-io chips are used on non-ISA mainboards.
Implement drsupio.c, the DraCo version of this.
Attach the generic com.c to this bus.
Remove the old drcom hack.
Currently, this is only kind of a wrapper around the *_sicallback() function
family. This way, we'll only break the new driver if it doesn't work.
After more drivers are converted, we'll change it to be the other way round.
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
at the same time instead by using two different calls. This enables
it to check more easily if the combined mode is all right.
- Improve the error checking in audio.c.
- Add a new audio property, AUDIO_PROP_INDEPENDENT, show if the
play and record settings are independent.
- Fix some buglets in audio.c.
- Change the way attach and open works to allow multiple audio
devices.
- Split the mulaw.c file into two to avoid dragging in mulaw
convertsion when they are not needed. Add 16 bit alaw/mulaw tables.
- Change the way audio properties are gotten.
- Recognize more versions os SoundBlaster.
- Add grfvideo_mode->disp_flags to select interlace, doublescan,
sync-on-green and horizontal/vertical sync polarity.
- Add some constants for grfvideo_mode->disp_flags.
This fixes a wrong output from grfconfig /dev/grf[23]
- changes for the grfconfig interface:
- Remove gv->hblank_stop and gv->vblank_stop.
- Only print doublescan and interlace flags. Horizontal/vertical sync
polarities are not yet supported and sync-on-green will never be
supported.
- Remove gv->{hblank_stop,vblank_stop} and use the other grfvideo_mode
values to set ba->data.
- Add gv->disp_flags to select interlace.
- Not yet supported are: doublescan, sync-on-green and the horizontal/vertical
sync polarity.
This makes it possible to use xfree values for grfconfig.
- changes for the grfconfig interface:
- Remove gv->{hblank_stop,vblank_stop} and calculate HBE and VBE from
gv->{htotal,vtotal}.
- Add support for gv->disp_flags to select interlace, doublescan and
horizontal/vertical sync polarity.
- Return EINVAL for gv->disp_flags and sync-on-green.
This makes it possible to use xfree values for grfconfig.
- Use interrrupt #6 instead of #2. #6 is the default interrupt and there
seems to be a problem with Cyberstorm 060 and #2.
- Set the interrupt register before enabling the interrupt.
- GC M2INS
- minor cleanup
- Switch from +hsync/+vsync to -hsync/-vsync.
- changes for the grfconfig interface:
- Remove gv->{hblank_stop,vblank_stop} and calculate HBE and VBE from
gv->{htotal,vtotal}.
- Add support for gv->disp_flags to select interlace, doublescan and
horizontal/vertical sync polarity.
- Return EINVAL for gv->disp_flags and sync-on-green.
This makes it possible to use xfree values for grfconfig.
XXX This (the m68k FPE, not the glue code) is known to be broken for
68LC040/68040V and 68LC060 cpus. This is also the reason we don't
bother to add options FPU_EMULATE to the DRACO configuration file, as
DraCos only come in 68040V (very few) and 68060 variants.
XXX This (the m68k FPE, not the glue code) is known to be broken for
68LC040/68040V and 68LC060 cpus. This is also the reason we don't
bother to add options FPU_EMULATE to the DRACO configuration file, as
DraCos only come in 68040V (very few) and 68060 variants.
renamed AUDIO_ENCODING_SLINEAR and AUDIO_ENCODING_LINEAR reverts to the
NetBSD 1.2 sematics. A kernel with COMPAT_12 defined will accept
AUDIO_ENCODING_LINEAR and treat it as before, without COMPAT_12 it
will be rejected.
Correct handling for Trap #2 in SunOS executables,
now that we know it is supposed to flush the cache.
(Was thought to be "some obscure FPU operation".)
an 68060/68LC060, possibly switching on the 68060 FPU, instead of trusting
the value passed from the ROM OS to us by the bootblock.
Most 68060 boards, unlike the DraCo (which seems to have heavily patched OS
ROMs) don't set the AMIGA_68060 flag; instead, upon detecting an 68060, its
FPU is disabled to make the ROM scheduler work, and at a much later time (at
least, later than bootblock booting time), the "68060.library" installs the
Motorola 68060 software support, patches the scheduler for the 68060 FPU, and
re-enables the FPU.
Maybe this will be fixed one day, if Amiga International sells upgraded OS
ROMs which know about the 68060. Until then, and for legacy machines, this
kludge is needed if we want to boot a non-DraCo 68060.
Btw, thats why this is NOT in std.amiga, but in GENERIC; the DRACO
configuration doesn't need it (and I still plan to make std.draco go away).
or swap partitions. Booting from a miniroot on the swap partition will
detect the miniroot as the boot partition (if the bootblock loader passes
the boot partition offset to the kernel).
(thesing@cs.uni-sb.de), heavily hacked upon by me to
- make it work with -current audio system
- make it shut off Amiga audio DMA only at appropriate places.
XXX A couple of bugs still remain, which well be handled later.
XXX Among them: only mono output; doesn't refuse to handle input, but chokes;
will not play last millichunk (is this 20 ms?) of data.
kernels, at the same time getting rid of up to 3 conditional branches and a
bit over one cacheline fetch (for the 68060; the saving is a bit smaller for
040 and yet smaller for the 020/30).
While we're here, also get rid of an redundant lea (using SP-relative
addressing) and of two redundant pushes.
While we're here, also fix a panic which would tear us down on 68060 machines
if a branch prediction error ever occured.