- 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.
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.
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
- 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
- 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
- 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.
- 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
- check the DF status flag after each command
- increase I/O timeout from 15 to 30 seconds
- share some code between ATA and ATAPI after all
- produce more accurate errors on DIOCEJECT
- rename AHCI_ID_SIZE to the more appropriate ATA_ID_SIZE
- rearrange ahci.h in a now more sensible way
patch to allow MINIX to boot from ext2.
To create a setup with MINIX on ext2, follow these steps:
- Assumptions:
- there exists a primary partition c0dApB with a MINIX installation
with GRUB support (/boot/image_latest exists on /dev/c0dApB)
- there exists a free primary partition c0dCpD
- Create an ext2 filesystem on c0dApB (from Linux, until Tthom
has ported mke2fs)
- Follow these steps (from a MINIX CD with ext2 support, another MINIX
installation (not c0dApB) or Linux >= 2.6.35):
mkdir /mnt/mfs /mnt/ext2
mount /dev/c0dApBs0 /mnt/mfs
mount /dev/c0dApBs1 /mnt/mfs/home
mount /dev/c0dApBs2 /mnt/mfs/usr
mount /dev/c0dCpD /mnt/ext2
synctree -f /mnt/mfs /mnt/ext2
echo root=/dev/c0dCpD > /mnt/ext2/etc/fstab
(note: no subpartitions used because that would confuse an unmodified
bootloader)
- Add the new MINIX installation to GRUB according to steps 7&8 in
http://wiki.minix3.org/en/SummerOfCode2010/MultiBoot/HowTo