History log of /haiku/src/system/kernel/device_manager/device_manager.cpp
Revision Date Author Comments
# 1cdb3beb 27-Feb-2024 SED4906 <sed4906birdie@gmail.com>

sdhci: add ACPI-enumerated device support

Change-Id: I5c42344b2499bd22581d6b564192decbce937645
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7456
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# d24476aa 26-Feb-2024 Jérôme Duval <jerome.duval@gmail.com>

device_manager: PCI_display is used for virtio gpu

the mapping was missing as noticed by Julian Harnath.

Change-Id: I8ea3420e1de543571daf82d8c16ec95ac3423826
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7431
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 68578fe6 24-Jun-2023 Niels Sascha Reedijk <niels.reedijk@gmail.com>

device_manager: remove unused `#include <set>`

GCC 13 is more strict about what C++ features are available in a freestanding
(= build without standard library) build. The container types are not
available.

In this case the device manager does not use the std::set container.

Change-Id: Iaa2d71b40c9247fac8ccf2a0033c9fc288550dc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6642
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 0450e7b8 31-May-2023 Augustin Cavalier <waddlesplash@gmail.com>

USB: Acquire the device manager lock before Explore.

We must do this to prevent lock order inversion: when busses are
initialized, they are started by the (locked) device manager, and
then acquire the explore lock. We must do the same in Explore itself,
for when called by the explore thread, we would otherwise first acquire
the explore lock, then (when publishing new nodes) acquire the device lock.

Should fix #18421 and #18393.


# 912bdb2a 13-Dec-2022 X512 <danger_mail@list.ru>

busses/pci/ecam: add

Change-Id: I8decef75a2d7f30bb5d45fc4774037d6a92bc161
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6223
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# ce08f03c 01-Apr-2023 Augustin Cavalier <waddlesplash@gmail.com>

kernel & add-ons: Adjustments to use DoublyLinkedList::InsertBefore.

The Insert(before, element) function has been marked deprecated since
2010, but still had many usage and kept accumulating more. It's long
past time we got rid of all them and actually deprecated the function
itself.

Insert(before, element) just calls InsertBefore, so no functional change.


# 594a6fa9 12-Jan-2023 Alexander von Gluck IV <kallisti5@unixzen.com>

kernel/device_manager: Fix virtio device iteration on qemu-system-riscv64

Change-Id: Id8f82bcd455234a1f3a985a89050c32f880655f3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5994
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 215b685f 11-Dec-2022 X512 <danger_mail@list.ru>

kernel: Drop non-standard GNU inline assignment syntax

* We needed this previously due to our gcc2 compiled kernel.
* Now that our kernel is always latest gcc, we can move to the
c++20 syntax for inline assignment.
* Improves compatibility with clang, less GNU-specific stuff

Change-Id: Ib7272a0a52554a31e9a0e788fd3f031db9049795
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5898
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 652d5f63 20-Nov-2022 Jérôme Duval <jerome.duval@gmail.com>

ccp: driver for the RNG part of CCP on AMD

the entropy source is read every second and pushed to the PRNG.
the PCI device is tested, not the ACPI.

Change-Id: I9bb6b21c7189b28a1d8a624d83b33ff6682152dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5825
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 34e92438 19-Nov-2022 Jérôme Duval <jerome.duval@gmail.com>

random: always use the PRNG, and use entropy sources to feed it

remove the yarrow module. the hardware modules can push entropy with queue_randomness().
virtio_rng will now push entropy every 300 seconds.
helps with #14937

Change-Id: If76c5deabf61dc616a0e051332f44b89deb6b8a1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5824
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 8e17b43d 14-Oct-2022 Jérôme Duval <jerome.duval@gmail.com>

kernel/device_manager: Implement B_GET_DRIVER_FOR_DEVICE

for legacy and new drivers.

This is an opcode for ioctl that can be used on almost any device entry found in /dev.
When used, ioctl will fill a buffer with the absolute path to the driver file that is
being used by the device.

This opcode was available in BeOS R5, though remained unimplemented in Haiku since
the introduction of the Device Manager almost two decades ago.

Original change by Jacob Secunda.

Change-Id: Ic49141b677b4158a63918459d4048450c825447c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5078
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 150fecee 10-Nov-2021 X512 <danger_mail@list.ru>

kernel/device_manager: fix virtio_mmio driver loading

Change-Id: I9d2a99e79ff46482a45ef3eea398ba8c627cea2a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4717
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# 032b1422 21-Jun-2022 Jérôme Duval <jerome.duval@gmail.com>

kernel/device_manager: don't insert device node before nodes of the same priority

fix #16512

Change-Id: I76ce4cfc9346492008c11ca53302ca4df6a6b514
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5393
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 97207829 25-Jul-2021 X512 <danger_mail@list.ru>

bus_managers/pci: add riscv64 support v2

* Refactored version of X512's original work to split out
the ecam and fu740 PCI Controllers

Change-Id: I631885af03b0118fb0084ed7aa4a5aa0a355b0fa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4435
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>


# a0c6f022 10-Nov-2020 X512 <danger_mail@list.ru>

device_manager: add path and module name attributes

* Set driver module name of device_node.
* Set device module name and path for published devices.

This helps to understand what driver is used, and it's /dev path in the
Devices app.

Change-Id: Ibd902a322da7e4276052bd4429a7b869a56a592b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3390
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 36aafa56 04-Dec-2020 X512 <danger_mail@list.ru>

fix build after CObjectDeleter interface change

Change-Id: I76e217abcd13c22c4d68170e07333cdde4d7a891
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3461
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# ab57ee42 04-Dec-2020 X512 <danger_mail@list.ru>

fix build after MethodDeleter interface change

Change-Id: Iadb9e37772fd6588636085944c1455249ac0f926
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3457
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 47bf2e38 23-Dec-2018 Adrien Destugues <pulkomandy@pulkomandy.tk>

sdhci: detect Ricoh SDHCI controllers

They don't advertise themselves as standard SDHCI, but are mostly
compatible. Only check for the one in my machine for now.

Also improve tracing in the probe function.

Change-Id: Ia47238fb25b783790fa8caaedf2a71aeb6e29d89
Reviewed-on: https://review.haiku-os.org/c/haiku/+/806
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 59588089 16-May-2020 Adrien Destugues <pulkomandy@pulkomandy.tk>

device_manager: missing NULL checks.

We should investigate why there are anonymous or unset attributes. But
at least let's not KDL because of it.

Fixes #16038.

Change-Id: Ifd49475e25ce8dcc3e98bc22df81f0e4f493f915
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2710
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 75749935 23-Mar-2020 Jérôme Duval <jerome.duval@gmail.com>

kernel: add data_acquisition mapping for input devices

busses/i2c needs to be probed also for acpi devices

Change-Id: Ib75b6e8db27361e395560d069dcbf136571b7a8e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2463
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 08bc0cc9 15-Mar-2020 Jérôme Duval <jerome.duval@gmail.com>

device_manager: add find_child_node

to find a node in the hierarchy.

Change-Id: Iee858f21ce134569bf25fccbef9fe18ea8787e9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2419
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 0dbbeede 17-Mar-2020 Jérôme Duval <jerome.duval@gmail.com>

kernel: map signal processing/data acquisition in the device manager

Change-Id: I1ef8b1d2c26a7dcf04956e6ca3c591d480c881a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2387
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 8f76c031 21-Jun-2018 krish_iyer <krishnaniyer97@gmail.com>

Adding MMC bus in device manager

Change-Id: I4db868e89f426b0e9c7f8ed77d8f96442f7525e4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/293
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 067b0d08 14-Apr-2019 Augustin Cavalier <waddlesplash@gmail.com>

kernel: Add NVMe to the device manager.


# daad9a3c 05-Aug-2018 Augustin Cavalier <waddlesplash@gmail.com>

kernel: Revert MMC bus changes to device_manager.

This broke booting on most (all?) systems.


# 25b6a6f1 28-Apr-2018 krish_iyer <krishnaniyer97@gmail.com>

SDHCI MMC Driver

1. SDHCI PCI Bus: Discovering SDHC device from the PCI bus
and registers a child node(MMC bus) to which slots
are attached. SDHC registers are mapped by MMUIO,
they are binded in a structure(struct* registers).
A pin based interrupt handler is also installed,
which triggers the handler function and interrupts
are being taken care of. Added API's to set-up and
the clock for SD/MMC card, change frequency and
reset the registers.

2. Device Manager: Currently, busses subdir lists are har-
dcoded and in order to load the driver. We hard
coded the bus dir under PCI devices.

3. MMC Disk Driver: In order to register the slots under
/dev/disk/mmc and hence data transfer and other
operations can be done.

4. MMC Bus Manager: Setted up a bus manager to create an object
to do a particular for eg certain data transfer and
get freed until another operation is requested.

Change-Id: I369354da6b79adc6b6dfb08fe160334af1392a34
Reviewed-on: https://review.haiku-os.org/318
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>


# 1e6dd3fe 24-Apr-2015 Murai Takashi <tmurai01@gmail.com>

Fix GCC 5 maybe-uninitialized warnings.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #12020


# 454ca0b1 23-Aug-2014 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Accidently push tracing on device_manager. Fixing.


# ad5bbfb8 23-Aug-2014 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Update ACPICA to 20140724.

Previous update was 20121018. So it was about time don't you think? I think so :)

* ACPI 5.1 is fully supported in ACPICA as of this release.

Changes are so many that I can just point to the Changelog:
https://acpica.org/sites/acpica/files/changes_13.txt

Here is the work in progress: http://instagram.com/p/sCxrHnh2sU/


# aea2cb91 29-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

device_manager: Implement unpublish_device()


# dfa5aa0c 16-Sep-2013 Ithamar R. Adema <ithamar@upgrade-android.com>

device_manager: Move init_node_tree to after kdl cmd registration

This helps when debugging, since when a driver/module causes a crash
while registering with the device manager, you can actually look at
the device manager state ;-)


# f2479c22 16-Sep-2013 Ithamar R. Adema <ithamar@upgrade-android.com>

device_manager: Move init_node_tree to after kdl cmd registration

This helps when debugging, since when a driver/module causes a crash
while registering with the device manager, you can actually look at
the device manager state ;-)


# eb5639c4 29-Aug-2013 Jérôme Duval <jerome.duval@gmail.com>

device_manager: tune the search paths

* the Virtio RNG PCI device has the class 0, so can't be found using usual
paths. Add 0 to _AlwaysRegisterDynamic() and "busses/virtio" in _GetNextDriverPath()
for non generic drivers to help finding virtio_pci.
* The RNG Virtio device is generic and needs "busses/random" to find virtio_rng.


# d3b108c5 02-Jul-2013 Jérôme Duval <jerome.duval@gmail.com>

virtio_scsi: added to the image.

* device_manager: scans busses/scsi for generic drivers.


# 3aae21ab 20-May-2013 Jérôme Duval <jerome.duval@gmail.com>

virtio: integrate into the build and image

* device_manager: scans busses/virtio for network device types
and scsi controllers.


# d7ec2fa3 20-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

A couple of format string fixes for tracing printfs.


# 4be4fc6b 15-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

More 64-bit compilation/safety fixes.


# 25dc253d 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7aba4e40 26-Apr-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved IOSchedulerRoster into its own header/source files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36491 a95241bf-73f2-0310-859d-f6bbb57e9c96


# deee8524 26-Jan-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced {malloc,memalign,free}_etc() which take an additional "flags"
argument. They replace the previous special-purpose allocation functions
(malloc_nogrow(), vip_io_request_malloc()).
* Moved the I/O VIP heap to heap.cpp accordingly.
* Added quite a bit of passing around of allocation flags in the VM,
particularly in the VM*AddressSpace classes.
* Fixed IOBuffer::GetNextVirtualVec(): It was ignoring the VIP flag and always
allocated on the normal heap.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35316 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7382f821 19-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Should have been part of an earlier commit: Initialize the IOSchedulerRoster.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34705 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a9689e84 30-Sep-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* VFS:
- Fixed vfs_get_vnode_from_fd() return type.
- Added vfs_open_vnode().
- Added a "bool traverseLeafLink" parameter to vfs_get_fs_node_from_path().
It was always resolving symlinks.
* device manager/devfs:
- devfs: get_node_for_path() no longer resolves leaf symlinks. That still
doesn't help with file disk devices, as creating partition wouldn't work
anyway.
- Pulled the module-related implementation part of BaseDevice into new class
AbstractModuleDevice and made all methods of BaseDevice virtual. Small
adjustments to devfs to be happy with the new BaseDevice interface.
- Added BaseDevice subclass FileDevice, which maps the interface to a file's
file descriptor. Still got a few TODOs, but should basically work.
- Use FileDevice for publishing file disk devices in devfs. Now those do
actually work, though there's some BFS trouble with one of the images I
tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33385 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6015793f 12-May-2009 Axel Dörfler <axeld@pinc-software.de>

* Instead of deleting the device directly, we now only remove it from its
parent.
* Additionally, when a vnode is deleted, the new BaseDevice::Removed() method is
called that will remove the device from its parent if needed, and delete it
then.
* This should fix #3856.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30726 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f04362ea 10-May-2009 Stephan Aßmus <superstippi@gmx.de>

* Change the drivers that use the ATA stack (ata_adapter) to publish
themselves in busses/ata instead of busses/ide.
* Re-introduce Francois change to install these drivers in busses/ata
when building with HAIKU_ATA_STACK = 1.
* Adopted the device manager to look for drivers in busses/ata
additionally to busses/ide.

This change works fine with a clean installation on a computer where I can
(and indeed have to) use the new ATA stack.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30695 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 941b2f41 18-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleanup, added TODO.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29589 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aa4ba93e 08-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Renamed src/system/kernel/device_manager/io_requests.{h,cpp} to
IORequest.{h,cpp}.
* Introduced public <io_requests.h> header. Currently it only declares the
single function BFS uses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29446 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c2e5130 11-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* The device manager must use kprintf() when printing out stuff in the KDL.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27987 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f3a576f 11-Sep-2008 Ryan Leavengood <leavengood@gmail.com>

Fixed CID 1300: the pointer last is never modified in the loop, so there is no
need for a null check. Or the null check needs to be moved to after last is
initialized. But if the user_memcpy of cookie succeeds, last should not be null
since it is just a copy of cookie. Probably.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27429 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0316483f 27-Aug-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* DMAResource::TranslateNext(): Added parameter to limit the maximum
operation length.
* IORequest: Added owner (IORequestOwner). Also added a SetUnfinished()
method, which is invoked by the I/O scheduler after all operations of
the request have been finished, but the request isn't done yet.
* Added debugger commands "io_request_owner" and "io_scheduler" printing
information for a IORequestOwner and IOScheduler object respectively.
* Implemented an actual I/O scheduling algorithm. It's a simple round
robin strategy (a queue per thread) with a unidirectional elevator
serializing the operations. ATM priorities are ignored, the bandwidth
isn't adjusted to the device, and there are TODOs all over the place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27216 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c35ab0c3 18-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Added new devfs_unpublish_device() that gets a BaseDevice instead of a path.
* Added inode ID member to BaseDevice to make this possible.
* Removed unused and unmaintained legacy_driver::devices_published field.
* Implemented legacy driver's unpublish_driver().
* Reenabled legacy driver reloading on changes.
* Renamed devfs_driver_{added|removed}() to driver_{added|removed}(), and
made them private.
* Simplified deletion of device_node lists (no need to use an iterator here),
added device unpublishing.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27033 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d88a145e 13-Aug-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added an allocator providing memory associated with VIP (i.e. page
writer) I/O requests. Not used yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26966 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f8a59924 06-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Added Dump() method to IORequest, IOOperation, IOBuffer, and DMABuffer.
* Added KDL commands "io_request", "io_operation", "io_buffer", and
"dma_buffer".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26838 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aef87862 18-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Added support for generic drivers.
* If init_driver() fails, the device manager now prints a message to syslog.
* device_node::CompareTo() was broken: it never correctly compared the last
attribute. This could cause duplicate nodes.
* Removed superfluous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26489 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a8f9741c 04-Jul-2008 Michael Lotz <mmlr@mlotz.ch>

* Removed -Wno-unused from all KernelMergeObjects in kernel Jamfiles.
* Fixed most of the warnings resulting from that by removing actually not used
variables or moving declaration into the #IF. Left unused functions there
though, as I wouldn't know if they are supposed to be used again.
* Fixed two statements with no effect (clamping to MAX_ANCILLARY_DATA_LEN in
socket.cpp and unsetting fCounterSem in MessagingService.cpp).
* Some style cleanups.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26253 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 75d20856 06-Jun-2008 Jérôme Duval <korli@users.berlios.de>

fixed listdev and device_manager syscalls


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25833 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fd7ff3cf 04-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* While it's okay to allow nodes with fixed children to register their own
children, you either have dynamic or fixed children, never both.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25801 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b8d33bd 03-Jun-2008 Jérôme Duval <korli@users.berlios.de>

* some typos
* a driver can register children and have a fixed child (ie for a bus manager).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25799 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b07bbe1 03-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a bit more debug output when enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25780 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 557335a9 03-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* device_nodes now have a priority that is used to sort them when they are
added to their parent. Currently, only the existence of B_FIND_MULTIPLE_CHILDREN
influences the priority.
* This makes it possible to register/probe intelligent busses earlier than
simple/generic busses.
* Reenabled the ISA bus manager using the new device architecture; the
ide_isa driver can and will now actually work.
* device_node::Probe() now sets the global sGenericContextPath for generic
nodes. This causes a special handling in _GetNextDriverPath().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25779 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2ecef3ac 03-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* As Korli pointed out, I got a bit confused with Rescan() vs. Probe().
* Therefore, device_manager::rescan_node() now actually causes the
driver::rescan_child_devices() function to be called, instead of probing
again.
* Added a device_node::Reprobe() method that does what Rescan() did previously.
* Probe() should now also work with "dumb" busses that don't support type
information - it will now probe all of these nodes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25778 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7830589f 03-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

Patch by Vasilis Kaoutsis:
* Added a missing close_module_list().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25777 a95241bf-73f2-0310-859d-f6bbb57e9c96


# abc69063 29-May-2008 Axel Dörfler <axeld@pinc-software.de>

* AHCI and other SATA drivers aren't in busses/sata, but either busses/scsi
or busses/ide.
* This change makes the AHCI driver working again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25705 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2b07b8e0 28-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Replaced all instances of benaphores in the kernel code by mutexes.
* Removed kernel benaphores.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25690 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2976912a 26-May-2008 Axel Dörfler <axeld@pinc-software.de>

* BaseDevice didn't initialize the fInitialized member, and thus causing bug
#2265.
* Device::InitDevice()/UninitDevice() are called from outside of the device
manager, so they better lock it.
* Turned off debug output in devfs and the device manager.
* Fixed debug output in devfs to print the actual vnode/cookie values, instead
of the structures the VFS passes in now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25670 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4584521e 26-May-2008 Axel Dörfler <axeld@pinc-software.de>

* PCI_mass_storage_other no longer scans the non-existing busses/disk path, but
all busses now. This should help with broken controllers that don't advertize
their capabilities correctly.
* Maybe we want to have a list that translates some types for certain devices,
too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25667 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac1d597e 26-May-2008 Maurice Kalinowski <mauricek@nowhere.fake>

gcc4 build fix. Don't have default value for declaration+definition. Build is still broken...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25666 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 368167ed 26-May-2008 Axel Dörfler <axeld@pinc-software.de>

* Integration of the new driver architecture.
* Moved devfs from fs/ to device_manager/, and separated the legacy driver
support from it.
* Removed fast_log module.
* There are a couple of (temporary) regressions, though:
- legacy SATA and ISA IDE support is disabled, the drivers haven't been
ported yet.
- The not yet used ATA bus manager hasn't been ported yet, either.
- AHCI changes have not been tested.
- the listdev command has been removed from the build (as it currently
doesn't work anymore).
- device manager generated IDs currently are not freed anymore when a device
node is removed.
- generic drivers can't yet use the new driver architecture.
- simple busses that do not support device types won't work yet.
- legacy driver publishing/unpublishing (ie. what USB needs) has not been
tested, and may be broken.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25662 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 454ca0b1aacad5be1c943ea7449a59dea86d949a 23-Aug-2014 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Accidently push tracing on device_manager. Fixing.


# ad5bbfb8e1be05ad72aab31d4149034d4078fe0d 23-Aug-2014 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Update ACPICA to 20140724.

Previous update was 20121018. So it was about time don't you think? I think so :)

* ACPI 5.1 is fully supported in ACPICA as of this release.

Changes are so many that I can just point to the Changelog:
https://acpica.org/sites/acpica/files/changes_13.txt

Here is the work in progress: http://instagram.com/p/sCxrHnh2sU/


# aea2cb917eb329bf2b56b64097e113d4417ba3b1 29-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

device_manager: Implement unpublish_device()


# dfa5aa0c9875001fa3508463f61862ba580952f0 16-Sep-2013 Ithamar R. Adema <ithamar@upgrade-android.com>

device_manager: Move init_node_tree to after kdl cmd registration

This helps when debugging, since when a driver/module causes a crash
while registering with the device manager, you can actually look at
the device manager state ;-)


# f2479c22a8fc50b3086c63d2c823621d39c183ba 16-Sep-2013 Ithamar R. Adema <ithamar@upgrade-android.com>

device_manager: Move init_node_tree to after kdl cmd registration

This helps when debugging, since when a driver/module causes a crash
while registering with the device manager, you can actually look at
the device manager state ;-)


# eb5639c43ec74cf0fd714685a6add1c54a2388ac 29-Aug-2013 Jérôme Duval <jerome.duval@gmail.com>

device_manager: tune the search paths

* the Virtio RNG PCI device has the class 0, so can't be found using usual
paths. Add 0 to _AlwaysRegisterDynamic() and "busses/virtio" in _GetNextDriverPath()
for non generic drivers to help finding virtio_pci.
* The RNG Virtio device is generic and needs "busses/random" to find virtio_rng.


# d3b108c53d151d7c0aab32c1562bca355462868b 02-Jul-2013 Jérôme Duval <jerome.duval@gmail.com>

virtio_scsi: added to the image.

* device_manager: scans busses/scsi for generic drivers.


# 3aae21ab63efe37cb6c8c94bf011fc3d36b58728 20-May-2013 Jérôme Duval <jerome.duval@gmail.com>

virtio: integrate into the build and image

* device_manager: scans busses/virtio for network device types
and scsi controllers.


# d7ec2fa3bfda5ba1674e97528fba2f4cfec00144 20-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

A couple of format string fixes for tracing printfs.


# 4be4fc6b1faddbd037146214a0011d320842b4f3 15-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

More 64-bit compilation/safety fixes.


# 25dc253d6ab28ce204fa4de2d3e7a27d167fc817 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7aba4e400ed69d328320c4fcda1617f759e98707 26-Apr-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved IOSchedulerRoster into its own header/source files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36491 a95241bf-73f2-0310-859d-f6bbb57e9c96


# deee8524b7534d9b586cbcbf366d0660c9769a8e 26-Jan-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced {malloc,memalign,free}_etc() which take an additional "flags"
argument. They replace the previous special-purpose allocation functions
(malloc_nogrow(), vip_io_request_malloc()).
* Moved the I/O VIP heap to heap.cpp accordingly.
* Added quite a bit of passing around of allocation flags in the VM,
particularly in the VM*AddressSpace classes.
* Fixed IOBuffer::GetNextVirtualVec(): It was ignoring the VIP flag and always
allocated on the normal heap.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35316 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7382f821163f5df7cc6fc11a0cf25ef955044313 19-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Should have been part of an earlier commit: Initialize the IOSchedulerRoster.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34705 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a9689e8492e520d532410c762bb3d5e3a5ac4819 30-Sep-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* VFS:
- Fixed vfs_get_vnode_from_fd() return type.
- Added vfs_open_vnode().
- Added a "bool traverseLeafLink" parameter to vfs_get_fs_node_from_path().
It was always resolving symlinks.
* device manager/devfs:
- devfs: get_node_for_path() no longer resolves leaf symlinks. That still
doesn't help with file disk devices, as creating partition wouldn't work
anyway.
- Pulled the module-related implementation part of BaseDevice into new class
AbstractModuleDevice and made all methods of BaseDevice virtual. Small
adjustments to devfs to be happy with the new BaseDevice interface.
- Added BaseDevice subclass FileDevice, which maps the interface to a file's
file descriptor. Still got a few TODOs, but should basically work.
- Use FileDevice for publishing file disk devices in devfs. Now those do
actually work, though there's some BFS trouble with one of the images I
tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33385 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6015793f57d08929e6e27b7bdc690835ac98eedc 12-May-2009 Axel Dörfler <axeld@pinc-software.de>

* Instead of deleting the device directly, we now only remove it from its
parent.
* Additionally, when a vnode is deleted, the new BaseDevice::Removed() method is
called that will remove the device from its parent if needed, and delete it
then.
* This should fix #3856.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30726 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f04362eac370efa2b6824b7109a737db126a526a 10-May-2009 Stephan Aßmus <superstippi@gmx.de>

* Change the drivers that use the ATA stack (ata_adapter) to publish
themselves in busses/ata instead of busses/ide.
* Re-introduce Francois change to install these drivers in busses/ata
when building with HAIKU_ATA_STACK = 1.
* Adopted the device manager to look for drivers in busses/ata
additionally to busses/ide.

This change works fine with a clean installation on a computer where I can
(and indeed have to) use the new ATA stack.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30695 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 941b2f41ec616ebc95039ebdb14a3c0d28aa0237 18-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleanup, added TODO.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29589 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aa4ba93e25c1c63730ba69e04d3d96c3253924fd 08-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Renamed src/system/kernel/device_manager/io_requests.{h,cpp} to
IORequest.{h,cpp}.
* Introduced public <io_requests.h> header. Currently it only declares the
single function BFS uses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29446 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c2e5130053e32b277bdfe67c20f709baf82bdb6 11-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* The device manager must use kprintf() when printing out stuff in the KDL.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27987 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f3a576f7ef58b52f57b28a7fc48fe7a0d99313a 11-Sep-2008 Ryan Leavengood <leavengood@gmail.com>

Fixed CID 1300: the pointer last is never modified in the loop, so there is no
need for a null check. Or the null check needs to be moved to after last is
initialized. But if the user_memcpy of cookie succeeds, last should not be null
since it is just a copy of cookie. Probably.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27429 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0316483f0ade2904583955b57cc396bf060f9027 27-Aug-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* DMAResource::TranslateNext(): Added parameter to limit the maximum
operation length.
* IORequest: Added owner (IORequestOwner). Also added a SetUnfinished()
method, which is invoked by the I/O scheduler after all operations of
the request have been finished, but the request isn't done yet.
* Added debugger commands "io_request_owner" and "io_scheduler" printing
information for a IORequestOwner and IOScheduler object respectively.
* Implemented an actual I/O scheduling algorithm. It's a simple round
robin strategy (a queue per thread) with a unidirectional elevator
serializing the operations. ATM priorities are ignored, the bandwidth
isn't adjusted to the device, and there are TODOs all over the place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27216 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c35ab0c38d10cbbaa712e06044a7cf49b942a64e 18-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Added new devfs_unpublish_device() that gets a BaseDevice instead of a path.
* Added inode ID member to BaseDevice to make this possible.
* Removed unused and unmaintained legacy_driver::devices_published field.
* Implemented legacy driver's unpublish_driver().
* Reenabled legacy driver reloading on changes.
* Renamed devfs_driver_{added|removed}() to driver_{added|removed}(), and
made them private.
* Simplified deletion of device_node lists (no need to use an iterator here),
added device unpublishing.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27033 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d88a145e9e7581affe75cd11c5512ed802399499 13-Aug-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added an allocator providing memory associated with VIP (i.e. page
writer) I/O requests. Not used yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26966 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f8a59924e5a8afacf7c966c00156cf55b151cf9a 06-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Added Dump() method to IORequest, IOOperation, IOBuffer, and DMABuffer.
* Added KDL commands "io_request", "io_operation", "io_buffer", and
"dma_buffer".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26838 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aef87862a4588d5874595c6c70f440dda081fc42 18-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Added support for generic drivers.
* If init_driver() fails, the device manager now prints a message to syslog.
* device_node::CompareTo() was broken: it never correctly compared the last
attribute. This could cause duplicate nodes.
* Removed superfluous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26489 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a8f9741c8c2815234e87b78167738057b976b537 04-Jul-2008 Michael Lotz <mmlr@mlotz.ch>

* Removed -Wno-unused from all KernelMergeObjects in kernel Jamfiles.
* Fixed most of the warnings resulting from that by removing actually not used
variables or moving declaration into the #IF. Left unused functions there
though, as I wouldn't know if they are supposed to be used again.
* Fixed two statements with no effect (clamping to MAX_ANCILLARY_DATA_LEN in
socket.cpp and unsetting fCounterSem in MessagingService.cpp).
* Some style cleanups.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26253 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 75d2085651c0f0647e31f30f4c3889ba9cfcf25f 06-Jun-2008 Jérôme Duval <korli@users.berlios.de>

fixed listdev and device_manager syscalls


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25833 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fd7ff3cfc863635f817cb9b5b7f5bef2be81cc44 04-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* While it's okay to allow nodes with fixed children to register their own
children, you either have dynamic or fixed children, never both.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25801 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b8d33bd7569385cbd4c4ec6dc37a5b06f7ffd19 03-Jun-2008 Jérôme Duval <korli@users.berlios.de>

* some typos
* a driver can register children and have a fixed child (ie for a bus manager).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25799 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b07bbe1081c3a45500cd0dbb04ebe1eff4c0834 03-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* Added a bit more debug output when enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25780 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 557335a99102b2df15fe4e877cfe8f678bd29995 03-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* device_nodes now have a priority that is used to sort them when they are
added to their parent. Currently, only the existence of B_FIND_MULTIPLE_CHILDREN
influences the priority.
* This makes it possible to register/probe intelligent busses earlier than
simple/generic busses.
* Reenabled the ISA bus manager using the new device architecture; the
ide_isa driver can and will now actually work.
* device_node::Probe() now sets the global sGenericContextPath for generic
nodes. This causes a special handling in _GetNextDriverPath().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25779 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2ecef3acbef27f58ed5e64a9732bee0a87d88112 03-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* As Korli pointed out, I got a bit confused with Rescan() vs. Probe().
* Therefore, device_manager::rescan_node() now actually causes the
driver::rescan_child_devices() function to be called, instead of probing
again.
* Added a device_node::Reprobe() method that does what Rescan() did previously.
* Probe() should now also work with "dumb" busses that don't support type
information - it will now probe all of these nodes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25778 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7830589f020c7311d9954b888909e434a7e03006 03-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

Patch by Vasilis Kaoutsis:
* Added a missing close_module_list().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25777 a95241bf-73f2-0310-859d-f6bbb57e9c96


# abc690633a5801e0094f292f6c1d12efe2afc441 29-May-2008 Axel Dörfler <axeld@pinc-software.de>

* AHCI and other SATA drivers aren't in busses/sata, but either busses/scsi
or busses/ide.
* This change makes the AHCI driver working again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25705 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2b07b8e0f1a7f1e76f31db24a21a42cbb01d7b9c 28-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Replaced all instances of benaphores in the kernel code by mutexes.
* Removed kernel benaphores.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25690 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2976912a518db378fc4f89d3506d5e206fbd0844 26-May-2008 Axel Dörfler <axeld@pinc-software.de>

* BaseDevice didn't initialize the fInitialized member, and thus causing bug
#2265.
* Device::InitDevice()/UninitDevice() are called from outside of the device
manager, so they better lock it.
* Turned off debug output in devfs and the device manager.
* Fixed debug output in devfs to print the actual vnode/cookie values, instead
of the structures the VFS passes in now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25670 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4584521e0b7cdba2c622e7474788d96cd9f4af58 26-May-2008 Axel Dörfler <axeld@pinc-software.de>

* PCI_mass_storage_other no longer scans the non-existing busses/disk path, but
all busses now. This should help with broken controllers that don't advertize
their capabilities correctly.
* Maybe we want to have a list that translates some types for certain devices,
too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25667 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac1d597e94797a8bd63b052b0a47fec1b654950e 26-May-2008 Maurice Kalinowski <mauricek@nowhere.fake>

gcc4 build fix. Don't have default value for declaration+definition. Build is still broken...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25666 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 368167ede8118f72da8c9ac5bb98ce9b46a8a639 26-May-2008 Axel Dörfler <axeld@pinc-software.de>

* Integration of the new driver architecture.
* Moved devfs from fs/ to device_manager/, and separated the legacy driver
support from it.
* Removed fast_log module.
* There are a couple of (temporary) regressions, though:
- legacy SATA and ISA IDE support is disabled, the drivers haven't been
ported yet.
- The not yet used ATA bus manager hasn't been ported yet, either.
- AHCI changes have not been tested.
- the listdev command has been removed from the build (as it currently
doesn't work anymore).
- device manager generated IDs currently are not freed anymore when a device
node is removed.
- generic drivers can't yet use the new driver architecture.
- simple busses that do not support device types won't work yet.
- legacy driver publishing/unpublishing (ie. what USB needs) has not been
tested, and may be broken.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25662 a95241bf-73f2-0310-859d-f6bbb57e9c96