Commit Graph

2832 Commits

Author SHA1 Message Date
skrll
4e8e66439e Merge nick-nhusb
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
    - kern/48308
    - uhub status notification improvements
    - umass(4) probe fix (applied to HEAD already)
    - ohci(4) short transfer fix
2016-04-23 10:15:27 +00:00
mlelstv
2232a82848 appease compiler. Fixes options MODULAR build. 2016-04-02 08:16:54 +00:00
christos
0a584b1b23 PR/50928: David Binderman: Clarify precedence with parentheses. 2016-03-09 20:11:41 +00:00
ozaki-r
9c4cd06355 Introduce softint-based if_input
This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
2016-02-09 08:32:07 +00:00
jandberg
e09dd753e1 Fix some awkward language in manpage and code comments. 2016-02-06 20:20:18 +00:00
mlelstv
2aacffe133 Add 'C' option to bootblock to enable serial console. 2016-01-15 08:27:04 +00:00
phx
7a71b65cf8 Make the -p option work, like with loadbsd.
Otherwise the kernel could load into a low-priority 512MB Z3 RAM segment.
2016-01-04 14:10:15 +00:00
christos
d5137ecf34 fenv for m68k 2015-12-24 14:12:39 +00:00
phx
ce99ffa7ea wscons and Xorg support for CirrusLogic GD542x based boards (grf3). 2015-11-16 21:25:34 +00:00
phx
2bf6198c32 Fixed bug in wsdisplay copyrows textop.
Fixed WSDISPLAYIO_SVIDEO, which had inverted functionality.
Improved FBINFO setup. 15 and 16 bits depth both have 16bpp now.
2015-11-16 21:24:06 +00:00
phx
d91190d038 Make sure the graphics device which has the console gets wsdisplay0,
otherwise neither virtual terminals nor Xorg's wsfb driver will work.
2015-11-13 16:04:07 +00:00
phx
599bbc23d0 Use the MD_BTOP() macro as replacement for m68k_btop() in all device
drivers which are shared with amigappc.
2015-11-12 12:19:49 +00:00
phx
656c43404f Xorg for amiga via wsfb. Currently available on CV64 and CV64/3D. More
graphics cards will follow, when adding wscons support to them.

I didn't manage to make the "wskbd" protocol the default in the X server,
so you have to provide a small xorg.conf with Option "Protocol" "wskbd".
The standard protocol will not work as the Amiga wskbd cannot be switched
into raw mode and has no AT-scancode translation in the kernel.

On the positive side, wskbd also works with national keymaps under X.

The graphics modes can still be defined via grfconfig(8). Xorg's wsfb
driver uses the current grf video mode, which is usually mode #1.
All resolutions and depths seem to work (tested on CV64).
2015-11-12 12:01:53 +00:00
phx
272a1c3817 Build instructions and Makefile for loadbsd 3.0.
Submitted by Gunther Nikl.
2015-11-11 16:08:52 +00:00
phx
e99c9b55dd Improved wscons support. Virtual screens are now working. 2015-11-07 14:29:10 +00:00
phx
eef94f0d39 Fixed format string types to make it compile with BAH_DEBUG again. 2015-10-30 12:19:08 +00:00
phx
bac2deebd6 Include genfb.h for NGENFB. 2015-10-30 12:14:32 +00:00
msaitoh
605f564f52 PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
  if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
  Currently the following extended capabilities are decoded:
   - Advanced Error Reporting
   - Virtual Channel
   - Device Serial Number
   - Power Budgeting
   - Root Complex Link Declaration
   - Root Complex Event Collector Association
   - Access Control Services
   - Alternative Routing-ID Interpretation
   - Address Translation Services
   - Single Root IO Virtualization
   - Page Request
   - TPH Requester
   - Latency Tolerance Reporting
   - Secondary PCI Express
   - Process Address Space ID
   - LN Requester
   - L1 PM Substates
  The following extended capabilities are not decoded yet:
   - Root Complex Internal Link Control
   - Multi-Function Virtual Channel
   - RCRB Header
   - Vendor Unique
   - Configuration Access Correction
   - Multiple Root IO Virtualization
   - Multicast
   - Resizable BAR
   - Dynamic Power Allocation
   - Protocol Multiplexing
   - Downstream Port Containment
   - Precision Time Management
   - M-PCIe
   - Function Reading Status Queueing
   - Readiness Time Reporting
   - Designated Vendor-Specific
2015-10-02 05:22:49 +00:00
phx
cd5e999b29 Reduce MAXDSIZ from 416MB back to 224MB.
Due to limitations by the current pmap implementation our virtual address
space is limited to 512MB. A MAXDSIZ of 416MB would leave only a little bit
more than 30MB for shared objects and heap allocations, so 224MB seems like
a good compromise.
2015-09-30 20:36:28 +00:00
dholland
25d3b9e7cb Final bit of PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers most if not all of the MD headers.

XXX: a lot of the ioctl definitions in some of these files are cutpasted.
2015-09-07 03:49:44 +00:00
uebayasi
44e9385020 Declare dependency on fpsp.o via newly introduced ${MD_LIBS} instead of
${MD_OBJS}.

${MD_OBJS} should be used only for objects that must be linked first (i.e.,
start code).  Objects have to be compiled following common compile rules,
and have to be generated into common places (i.e., top of kernel build
directory).

${MD_LIBS} defines libraries that are built by separate makefiles, under
separate directories.  `Makefile.kern.inc' doesn't know intermediate library
objects.
2015-09-06 02:17:30 +00:00
uebayasi
7fe7089a02 Add pseudo-device ksyms' where options DDB' is used, because
config(1)/config(5) can't handle module dependency correctly at this
moment.

(This is another proof that shared file definition (`file xxx.c a|b')
is a bad idea.)
2015-08-21 01:52:07 +00:00
christos
e7ae23fd9e include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
mrg
b8ce913648 remove include of <dev/rcons/raster.h>, which is not necessary. 2015-08-05 07:02:20 +00:00
maxv
c9d5e93a69 Remove a dead continue.
Harmless, found by Brainy
2015-07-04 06:13:01 +00:00
mlelstv
ad909f3fd2 remove obsolete comments 2015-06-19 14:55:51 +00:00
phx
86f1c74589 Use all the changes from
http://ftp.netbsd.org/pub/NetBSD/misc/mlelstv/vmparam.diff
after a discussion on port-m68k. I tested them on several Amiga models
and they seem to work fine.
This gives us the maximum virtual memory space for a process under the
current 512MB pmap limitation.
Also bump VM_KERNEL_PT_PAGES to allow up to 2 GB RAM.
2015-06-13 23:55:18 +00:00
mlelstv
5d01999423 btoc is already rounding up to click size, use predefined ctod macro
to translate to disk blocks.
2015-06-13 07:35:50 +00:00
mlelstv
e48922a086 Fix space calculation for dump header. Round up to clicks to avoid
disk alignment issues.
2015-06-07 20:00:11 +00:00
phx
ff34925b8f Remove unused KUSER_AREA, SYSPTSIZE, USRPTSIZE.
Bump MAXTSIZ and MAXDSIZ to the same values atari is using.
This makes gcc 4.8 (/usr/libexec/cc1) load and execute.
2015-06-01 17:16:56 +00:00
phx
1e2924a83b Removed unused variable to make it compile again. 2015-06-01 17:09:46 +00:00
mlelstv
6e25b419e7 Don't use conflicting parameters for compiler and assembler. 2015-05-25 05:48:18 +00:00
ozaki-r
b8199900dc Remove leftover use of AF_NS and NS option
Unnecessary NETISR_NS is also removed.
2015-05-20 09:17:17 +00:00
mlelstv
6f00c789e1 Use C99-style initializers for struct dkdriver. 2015-04-26 15:15:19 +00:00
mlelstv
3db8c4f6af detect a4000 hardware only once, then use the result. 2015-04-18 14:21:41 +00:00
mlelstv
a5c8e347b5 Handle EINVAL in the fault path and send SIGBUS on mmap'd access past EOF.
From martin@
2015-03-04 19:56:24 +00:00
mlelstv
e09a8fe332 amidisplaycc requires vcons 2015-03-04 19:10:20 +00:00
jandberg
100db321d0 Add a delay between the recently added new PCMCIA reset method and the old
reset method to get the card reset work reliably on my A1200 model and network
cards.

Discussed on port-amiga.
2015-02-08 09:55:25 +00:00
aymeric
d8ecb4515d . don't depend on -ll to provide a main() function. Lex on ArchLinux doesn't
provide a libl
. still depend on -ll for the !HOSTPROG case for yywrap()
. ANSIfy
2015-02-03 19:58:41 +00:00
phx
2ba2ab2e09 Make it compile with -DDEBUG again. 2015-01-19 20:10:27 +00:00
phx
daeff8a9d2 Fixed crash of A4000 IDE due to uninitialised bus_space_tag and bus_space
handle for the interrupt status register.
2015-01-16 23:34:11 +00:00
christos
c182898b0d We have three sets of DTYPE_ constants in the kernel:
altq		Drop 		Type
	disklabel	Disk 		Type
	file		Descriptor	Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.
2015-01-02 19:42:05 +00:00
christos
4a751d18af fix typo 2014-12-31 20:55:53 +00:00
christos
c60db2e923 make more drivers use disk_ioctl, and add a dev parameter to it so that
we can merge the "easy" disklabel ioctls to it. Ultimately all this will
go do dk_ioctl once all the drivers have been converted.
2014-12-31 19:52:04 +00:00
manu
239cf5506d Remove unused extended attributes kernel options
As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
2014-11-16 16:01:39 +00:00
manu
2cab231d44 Support for UFS1 extended attributes in GENERIC and GENERIC-like kernels
This change just brings UFS1 extended attribute *support* in the kernel,
extended attributes are not enabled unless three conditions are met:
1) filesystem is UFS1 (newfs -O1)
2) .attribute/system and .attribute/user directories are created at fs root
3) filesystem is mounted with -o extattr

Some GENERIC kernels are obviously memory constrained, the extended
attributes options were not enabled for them, but just added commented out.
(kernel were considered memory constrained if QUOTA option was disabled)
2014-11-12 10:47:20 +00:00
snj
f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
christos
80d9ffa917 remove dead code 2014-09-21 15:43:11 +00:00
phx
e26e7a8a22 According to http://eab.abime.net/showpost.php?p=782840&postcount=115
there are two methods for a Gayle PCMCIA soft-reset.
pccard_attach() only implemented a method with works on A600 and some
older (?) A1200 models. I added the second method as well, to make the
reset work in any case. Tested on the latest A1200 model, which failed before.
2014-09-07 22:24:40 +00:00
mlelstv
044affb986 use RAW_PART to trigger read of disklabel, other units might by busy due
to discovered wedges.
2014-08-24 12:18:21 +00:00