Commit graph

621 commits

Author SHA1 Message Date
Ben Gras
02081e4b62 rename mmap() and munmap()
. it's a good extra interface to have but doesn't
	  meet standardised functionality
	. applications (in pkgsrc) find it and expect
	  full functionality the minix mmap doesn't offter
	. on the whole probably better to hide these functions
	  (mmap and friends) until they are grown up; the base system
	  can use the new minix_* names
2011-07-16 13:01:19 +02:00
Erik van der Kouwe
66bc7580c7 Fix e1000 bug introduced in 123cf7 2011-07-13 11:36:10 +02:00
Arun Thomas
8a5484202c Support for 82801CAM PRO/100 VE
Contributed by Jan Wieck
2011-07-11 21:10:28 +02:00
Arun Thomas
b956c8735e Fix GCC image building 2011-07-09 15:04:42 +02:00
Tomas Hruby
a97a80178e E1000 - Intel 82571EB Gigabit Ethernet Controller 2011-07-08 20:31:21 +02:00
Tomas Hruby
6dea092dec E1000 - pci probing
- once we know it is not an Intel device, it is not a match
2011-07-08 20:31:21 +02:00
Tomas Hruby
123cf7fe37 E1000 - reading EEPROM
- once the DONE bit is set, we already have the data
2011-07-08 20:31:21 +02:00
Tomas Hruby
48a4ff2307 E1000 - fixed reading MAC from EEPROM
- makes case which is correct according to Intel docs the default
2011-07-08 20:31:21 +02:00
Tomas Hruby
d75138be00 E1000 - fixed reading/writing device registers
- the pointers must be flagged as volatile because otherwise they
  might be "optimized" by a compiler. It is a common good
  practice to access the registers this way, the keyword is in C
  for a reason.

- for instance, in eeprom_eerd() when polling a register the
  compiler, under certain conditions, may decide upon the first
  read and if it does not break the loop it assumes that the
  value is not going to change and thus stays in an infinite
  loop.
2011-07-08 20:31:21 +02:00
Arun Thomas
cf04da3ebe Restore stripping of elf binaries in ramdisk 2011-06-28 17:49:45 +02:00
Arun Thomas
93ae43f577 boot: Add multiboot support
Not yet fully spec-compliant; work in progress
2011-06-24 17:21:51 +02:00
Gianluca Guida
cc17b27a2b Build NetBSD libc library in world in ELF mode.
3 sets of libraries are built now:
  . ack: all libraries that ack can compile (/usr/lib/i386/)
  . clang+elf: all libraries with minix headers (/usr/lib/)
  . clang+elf: all libraries with netbsd headers (/usr/netbsd/)

Once everything can be compiled with netbsd libraries and headers, the
/usr/netbsd hierarchy will be obsolete and its libraries compiled with
netbsd headers will be installed in /usr/lib, and its headers
in /usr/include. (i.e. minix libc and current minix headers set
will be gone.)

To use the NetBSD libc system (libraries + headers) before
it is the default libc, see:
   http://wiki.minix3.org/en/DevelopersGuide/UsingNetBSDCode
This wiki page also documents the maintenance of the patch
files of minix-specific changes to imported NetBSD code.

Changes in this commit:
  . libsys: Add NBSD compilation and create a safe NBSD-based libc.
  . Port rest of libraries (except libddekit) to new header system.
  . Enable compilation of libddekit with new headers.
  . Enable kernel compilation with new headers.
  . Enable drivers compilation with new headers.
  . Port legacy commands to new headers and libc.
  . Port servers to new headers.
  . Add <sys/sigcontext.h> in compat library.
  . Remove dependency file in tree.
  . Enable compilation of common/lib/libc/atomic in libsys
  . Do not generate RCSID strings in libc.
  . Temporarily disable zoneinfo as they are incompatible with NetBSD format
  . obj-nbsd for .gitignore
  . Procfs: use only integer arithmetic. (Antoine Leca)
  . Increase ramdisk size to create NBSD-based images.
  . Remove INCSYMLINKS handling hack.
  . Add nbsd_include/sys/exec_elf.h
  . Enable ELF compilation with NBSD libc.
  . Add 'make nbsdsrc' in tools to download reference NetBSD sources.
  . Automate minix-port.patch creation.
  . Avoid using fstavfs() as it is *extremely* slow and unneeded.
  . Set err() as PRIVATE to avoid name clash with libc.
  . [NBSD] servers/vm: remove compilation warnings.
  . u32 is not a long in NBSD headers.
  . UPDATING info on netbsd hierarchy
  . commands fixes for netbsd libc
2011-06-24 11:46:30 +02:00
Erik van der Kouwe
6e0f3b3bda Split off sys_umap_remote from sys_umap
sys_umap now supports only:
- looking up the physical address of a virtual address in the address space
  of the caller;
- looking up the physical address of a grant for which the caller is the
  grantee.

This is enough for nearly all umap users. The new sys_umap_remote supports
lookups in arbitrary address spaces and grants for arbitrary grantees.
2011-06-10 14:28:20 +00:00
Ben Gras
b19820774e fixed clang warnings in drivers/
. changed debug statements system for audio/ to do so
2011-06-09 16:57:51 +02:00
Erik van der Kouwe
419dadf528 Remove redundant atwini code, use PIO for bad DMA 2011-06-08 19:24:41 +00:00
Erik van der Kouwe
c2da8cb535 Globally enable -Wall warnings for GCC 2011-06-08 19:21:03 +00:00
Tomas Hruby
f5a1e58f59 PCI - do not panic when ACPI cannot map bridges
- when ACPI does not find mappings for pci brdiges, do no panic,
  only report a warning and continue to a fallback which uses
  only the root bus IRQ routing table. Fail only if that is not
  present.
2011-05-06 17:41:14 +02:00
David van Moolenbroek
c51cd5fe91 Server/driver protocols: no longer allow third-party copies.
Before safecopies, the IO_ENDPT and DL_ENDPT message fields were needed
to know which actual process to copy data from/to, as that process may
not always be the caller. Now that we have full safecopy support, these
fields have become useless for that purpose: the owner of the grant is
*always* the caller. Allowing the caller to supply another endpoint is
in fact dangerous, because the callee may then end up using a grant
from a third party. One could call this a variant of the confused
deputy problem.

From now on, safecopy calls should always use the caller's endpoint as
grant owner. This fully obsoletes the DL_ENDPT field in the
inet/ethernet protocol. IO_ENDPT has other uses besides identifying the
grant owner though. This patch renames IO_ENDPT to USER_ENDPT, not only
because that is a more fitting name (it should never be used for I/O
after all), but also in order to intentionally break any old system
source code outside the base system. If this patch breaks your code,
fixing it is fairly simple:

- DL_ENDPT should be replaced with m_source;
- IO_ENDPT should be replaced with m_source when used for safecopies;
- IO_ENDPT should be replaced with USER_ENDPT for any other use, e.g.
  when setting REP_ENDPT, matching requests in CANCEL calls, getting
  DEV_SELECT flags, and retrieving of the real user process's endpoint
  in DEV_OPEN.

The changes in this patch are binary backward compatible.
2011-04-11 17:35:05 +00:00
David van Moolenbroek
7a9e3651fd drivers/sb16: delete altogether; the latest copy is in drivers/audio/sb16 2011-03-25 10:48:16 +00:00
David van Moolenbroek
294112db54 misc drivers: remove more non-safecopy support 2011-03-25 10:45:57 +00:00
David van Moolenbroek
f56c4001d5 TTY/LOG driver cleanup:
- remove non-safecopy support from TTY
- make TTY warning-free with gcc -Wall
- remove obsolete diagnostics support
2011-03-25 10:43:24 +00:00
Thomas Veerman
898cce256f Add support for the 82567LM flavor of e1000 2011-03-15 10:04:35 +00:00
Arun Thomas
bac0222eec ramdisk: Add procfs to ramdisk
-Prevents kernel/procfs mismatches
-Also, strip ELF binaries in ramdisk
2011-02-23 13:05:28 +00:00
Ben Gras
3beb81a5d0 memory driver: munmap() imgrd after first close.
(that munmap() range not supported yet by vm.)
2011-02-10 15:39:56 +00:00
Dirk Vogt
c22564335f Added possibility to inject input events to tty
M    include/Makefile
A    include/minix/input.h
M    include/minix/com.h
M    drivers/tty/keyboard.c
M    drivers/tty/tty.c
M    drivers/tty/tty.h
M    include/minix/syslib.h
M    lib/libsys/Makefile
A    lib/libsys/input.c
2010-11-17 14:53:07 +00:00
Ben Gras
f3e1b1c226 Updated some CLEANFILES macros in Makefiles. 2010-11-17 14:27:23 +00:00
Arun Thomas
8173242e01 Remove redundant sha2 code from inet 2010-11-15 11:10:02 +00:00
Arun Thomas
aaaad89244 Use int64 functions consistently
Instead of manipulating the u64_t type directly, use the
ex64hi()/ex64lo()/make64() functions.
2010-11-07 23:35:29 +00:00
Arun Thomas
40fb96b838 Remove revision IDs from files 2010-11-04 01:13:59 +00:00
Tomas Hruby
40bfed28cd ACPI pci-to-pci bridges
- every pci device which implements _PRT acpi method is considered to
  be a pci-to-pci bridge

- acpi driver constructs a hierarchy of pci-to-pci bridges

- when pci driver identifies a pci-to-pci bridge it tells acpi driver
  what is the primary and the secondary bus for this device

- when pci requests IRQ routing information from acpi, it passes the
  bus number too to be able to identify the device accurately
2010-10-21 17:07:09 +00:00
Tomas Hruby
7fddd8358d PCI driver debug output fix
- bus number (busnr) must be used instead of internal busind
2010-10-19 10:30:15 +00:00
Tomas Hruby
613ff40936 acpi driver Makefile fix
- by Antoine Leca
2010-10-15 22:20:01 +00:00
Erik van der Kouwe
431a5a556d e1000: add 82574L ethernet adapter (thx Niek for your comments) 2010-10-15 08:53:22 +00:00
Tomas Hruby
b0572bfd1e No need to scan devices in PIC mode 2010-09-22 08:01:43 +00:00
David van Moolenbroek
6b902492ae memory driver: propagate data copy error to caller 2010-09-09 16:13:02 +00:00
Tomas Hruby
e6ebac015d APIC mode uses IO APICs
- kernel turns on IO APICs if no_apic is _not_ set or is equal 0

- pci driver must use the acpi driver to setup IRQ routing otherwise
  the system cannot work correctly except systems like KVM that use
  only legacy (E)ISA IRQs 0-15
2010-09-07 07:18:11 +00:00
Tomas Hruby
99d9144556 PCI driver uses ACPI if APIC is used.
-  PCI must query ACPI, if (IO)APIC is in use, for the routing
   information and change the ILR (interrupt line register) of each
   device accordingly so drivers use the right IRQ.
2010-09-02 15:44:38 +00:00
Tomas Hruby
7ae6f8740d ACPI driver loaded at boot time
- the acpi driver is part of the ramdisk and if present the rc script
  starts it before pci is started as pci needs if APIC mode is turned
  on.
2010-09-02 15:44:36 +00:00
Tomas Hruby
9560b6dea8 ACPI driver
- 99% of the code is Intel's ACPICA. The license is compliant with BSD
  and GNU and virtually all systems that use ACPI use this code, For
  instance it is part of the Linux kernel.

- The only minix specific files are

  acpi.c
  osminixxf.c
  platform/acminix.h

  and

  include/minix/acpi.h

- At the moment the driver does not register interrupt hooks which I
  believe is mainly for handling PnP, events like "battery level is
  low" and power management. Should not be difficult to add it if need
  be.

- The interface to the outside world is virtually non-existent except
  a trivial message based service for PCI driver to query which device
  is connected to what IRQ line. This will evolve as more components
  start using this driver. VM, Scheduler and IOMMU are the possible
  users right now.

- because of dependency on a native 64bit (long long, part of c99) it
  is compiled only with a gnu-like compilers which in case of Minix
  includes gcc llvm-gcc and clang
2010-09-02 15:44:04 +00:00
Tomas Hruby
43a4725423 pci_*.h headers moved from drivers/pci to include/machine 2010-09-02 15:43:59 +00:00
Erik van der Kouwe
1f2054c89c Shutdown changes for multiboot: CTRL-ALT-DEL resets, panic halts 2010-08-30 19:01:58 +00:00
David van Moolenbroek
4448836263 ramdisk: more inodes 2010-08-30 17:08:19 +00:00
Erik van der Kouwe
a37514163b Touch generated files to avoid dependency generation warnings and missing dependencies 2010-08-29 17:50:51 +00:00
Arun Thomas
a78608ec86 Fix dependency problems in the build 2010-08-26 19:54:49 +00:00
Ben Gras
0f4eda33eb new base libaudiodriver out of -lcommon in drivers/audio.
- this lets the drivers that used that library be compiled easily with
   different compilers.
2010-08-25 11:03:53 +00:00
Ben Gras
cb86231930 sb16: flatten mixer, common, dsp hierarchy into 2-PROGS dir 2010-08-25 09:57:10 +00:00
Ben Gras
36fa521a0e further ramdisk size increase for gcc+gcov binaries. 2010-08-25 07:26:00 +00:00
Ben Gras
6fb1789ba4 at_wini: fix warning, bogus PRIVATE in struct type declaration 2010-08-24 12:45:37 +00:00
Ben Gras
205855b8ee boot ramdisk slightly bigger for gcc-compiled binaries. 2010-08-20 12:59:55 +00:00
David van Moolenbroek
484b2f43d6 at_wini/ahci: write cache ioctls 2010-08-12 14:09:34 +00:00