Commit Graph

2561 Commits

Author SHA1 Message Date
François Revol 1a8a803ee1 WIP
Abstracted cpu and mmu version dependant stuff (compatibility where are you) into ops like func arrays.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-03 21:02:03 +00:00
Ingo Weinhold 53715fe060 * Got rid of the B_PARTITION_DESCENDANT_BUSY flag.
* Added CheckAndMarkBusy() and UnmarkBusy() methods to KPartition.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-02 00:29:46 +00:00
Ingo Weinhold 8354dac78e Folded KPhysicalPartition into KPartition. Removed the notion of shadow
partitions from the disk device manager.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-01 23:36:21 +00:00
Ingo Weinhold 327887959e * Moved partition scanning back to KDiskDeviceManager. ATM only
synchronous scanning is supported.
* Removed the disk device job support from the disk device manager.
* K{Disk,File,Partitioning}System:
  - Remove querying and validation methods.
  - Commented out the modification methods until their fate is decided.
* Removed obsolete _user_get_partitionable_spaces().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-01 22:41:22 +00:00
Ingo Weinhold 300868ce27 * Removed no longer needed disk device related syscalls
(_kern_{supports,validate}_*(), etc.).
* Adjusted the prototypes of the disk device modification syscalls.
  Commented out their implementations for the time -- they'll mostly
  have to be rewritten completely.
* Implemented the userland disk device jobs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-31 21:16:22 +00:00
Axel Dörfler 61291964c3 The intel_extreme driver now finally works with the i965 chipset;
acceleration works fine, but overlay doesn't - that's next on my list.
Turns out the i965 differentiates between RGB-32 and RGB-32-alpha, and 
didn't like trying to use the latter as display mode (the i865 didn't 
care at all)... finding that took me *way* too long, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-31 19:23:59 +00:00
Ingo Weinhold 3ca9267ce3 * The BMutablePartition setters adjust the change flags accordingly.
* PartitionDelegate::Uninitialize() uninitializes the mutable partition. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-31 17:02:52 +00:00
Ingo Weinhold 25ab0d1a4a * Fixed typos in the disk device job constants.
* Added missing job classes (they don't do anything yet, though) and
  completed the implementation of the job generator.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-29 23:51:02 +00:00
François Revol a790413138 More regs in m68k iframe.
Removed DOS CR.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-26 14:28:54 +00:00
François Revol 829748d89d Fix flushing the ATC, add flushing icache.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 02:24:38 +00:00
François Revol ee75f8527b This should handle TLB flushing on m68k (it's called ATC though).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 00:45:01 +00:00
François Revol 8848d5972f Fix cast.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-25 00:44:09 +00:00
François Revol d40bcaab8e m68k code.
We will use SRP (supervisor root pointer) register to hold the current thread pointer.
Its use by the pmmu is optional and I don't plan on using it.
There are 32 other bits left.
Wonder if weshouldn't use it for system_time() instead... will see, but there are no other usable regs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22696 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-23 23:48:02 +00:00
Axel Dörfler c76695a275 * The C "struct list" and the C++ DoublyLinkedList implementations had mixed
next/prev link order - that messed up the DoublyLinkedListCLink adapter.
* Since it's more likely that someone messes with the C version, the C++ version
  now uses the same order than that one.
* This fixes a bug when TCP's BufferQueue tried to iterate over a list, messing
  up its integrity.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-23 10:37:41 +00:00
Stefano Ceccherini 37b83b1a2d The system palette was defined in two files. Moved to a private header,
included by the two.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-22 13:44:37 +00:00
François Revol d09c112c3e - Yes we will have 64bit atomic funcs! Watch this PPC! :P
- m68k ELF reloc names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-22 00:43:22 +00:00
François Revol 0b2adc3d8e Headers (unfinished) for an m68k port (yes I do know it's useless, it's just for the l33t factor).
Based on ppc/x86 headers from r22648.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-21 23:42:09 +00:00
Axel Dörfler 23128566a4 Slab.h no longer includes Depot.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-21 20:56:34 +00:00
Axel Dörfler b623d277fa Moved Base.h into Slab.h, and removed Base.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-21 20:44:19 +00:00
Axel Dörfler 15ab0bcf01 * int32_t, uint32_t are now of type "int", and no longer of type "long".
This should help to reduce the number of warnings imported code will throw
  during compilation (helps a lot with tcpdump, for example).
* Since long is 64 bit on 64 bit platforms, we might want to think about doing
  that change for the Haiku types int32 and uint32 as well.
* Fixed several occurences of hidden type problems.
* Fixed build of the stack and TCP under BeOS.
* Fixed incorrect typedef in socket_interface.h.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22643 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-21 20:10:43 +00:00
Stephan Aßmus 359f014e4e * part of libbe_test build fix... why is the _IMPEXP stuff there in the
first place? Is it even needed?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-21 15:19:25 +00:00
Axel Dörfler e544dd5915 * Fixed a possible dead lock between the kernel daemon and the DDM; the media
status checker now only tries to lock the manager, it won't wait anymore.
* Added MediaChanged() and UpdateMediaStatusIfNeeded() methods to KDiskDevice.
* KDiskDeviceManager::_CheckMediaStatus() now uses these new methods; it should
  no longer detect removed media more than once :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-19 15:20:36 +00:00
Axel Dörfler d73d20e85c Fixed warning when compiling the PS/2 bus manager.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-18 17:23:14 +00:00
Ingo Weinhold 9417631f64 * Made _CountDescendants() public.
* Added private _ChildAt() and _CountChildren(), which don't ask the
  delegate, thus reflecting the hierarchy as it was before changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-18 03:42:30 +00:00
Ingo Weinhold 013e7894b7 We need flags to track what properties of the partition change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-18 03:39:50 +00:00
Ingo Weinhold 1573b62671 * Removed the BDiskDeviceJob class. Jobs won't be generated and executed
in the kernel anymore. The respective functionality will be moved into
  the userland. Depending on how we want the API user to interface with
  it, we may want to reintroduce a similar class later.
* Cleared remaining references to shadow partitions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-17 22:56:23 +00:00
Ingo Weinhold 27d7c36659 * Reimplemented BDiskDevice::IsModified()/
{Prepare,Commit,Cancel}Modifications() using the userland add-on
  backend. IsModified() and CommitModifications() are little more than
  stubs ATM.
* Made BPartition::VisitEachChild()/VisitEachDescendant() const.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-17 21:50:20 +00:00
Ingo Weinhold 46b93b2cfd Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-17 20:51:10 +00:00
Axel Dörfler 8047441723 The disk device manager now periodically checks for media changes - all it does
is dump its findings, but it's an (untested) start.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-17 17:05:48 +00:00
Ingo Weinhold c9518b6240 Removed some now obsolete methods.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-17 01:04:53 +00:00
Ingo Weinhold fe6bd3b5b7 * Moved GetNextSupportedType() and IsSubSystemFor() from
BDiskSystem to BPartition and reimplemented them using the userland
  add-on backend instead of syscalls. As a side effect this solves the
  TODO I recently added in GetNextSupportedType().
* Reimplemented BDiskSystem::GetTypeForContentType() using the userland
  add-on backend instead of a syscall.
* Moved GetTypeForContentType() and IsSubSystemFor() from
  BPartitionHandle to BDiskSystemAddOn. They were misplaced.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-17 01:01:49 +00:00
Axel Dörfler e7e325508b Allocating additional memory should now work on the i965 as well (but bad things
will happen on earlier i9xx chips for now...). Not yet tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22589 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-16 16:52:34 +00:00
Ingo Weinhold b62085b975 Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-16 00:32:41 +00:00
Axel Dörfler f6e4cbb952 * Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 20:13:55 +00:00
Axel Dörfler 332d5f437e Some cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 14:09:14 +00:00
Axel Dörfler c278448653 * Introduced a monitor_info structure and means to let it be filled by the
accelerant (or the app_server via EDID info). It's still experimental
  API, and opinions are welcome.
* Moved BPrivateScreen into the BPrivate namespace.
* Rewrote Screen.h.
* Introduced a BScreen::GetMonitorInfo() method, and implemented it in the
  app server as well (ie. AS_GET_MONITOR_INFO).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 11:41:47 +00:00
Ingo Weinhold 28541deac2 Beginning of the integration with the new userland disk system add-on
based code. Small API changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 00:41:18 +00:00
Axel Dörfler 6a0f39da22 Applied patch by Julun: time computations based on an algorithm by Fliegel,
and van Flandern (1968), instead of those inefficient loops we had before.
Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-14 17:27:44 +00:00
Axel Dörfler 53d781f439 * Now uses the new create_display_modes() function.
* Now supports the new B_GET_EDID_INFO hook under Haiku.
* Fixed build under BeOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-14 12:31:51 +00:00
Ingo Weinhold 08baf63a9f Decided that BPartition::ImmutableDelegate would basically be a big
collection of no-op methods, which could as well be implemented in
BPartition itself. This makes the Delegate hierarchy unnecessary:
MutableDelegate becomes Delegate, and we save a few casts as a side
effect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-14 00:07:03 +00:00
Ingo Weinhold 350043e707 * Initialization of BPartition::Delegate is now two-phased. The first phase
builds the object hierarchy, the second will (in case of MutableDelegate)
  let the disk systems do their initialization. This way the disk systems
  already find a fully functional object hierarchy they can work with.
* Child creation also takes a partition name as a parameter, now.
* Implemented BMutablePartition child creation/deletion.
* The BDiskSystemAddOn/BPartitionHandle::Validate*() methods return a
  status_t instead of a bool, now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-13 21:29:33 +00:00
Ingo Weinhold 103ca6a3ad The info about partitionable space will be provided by the userland disk
system add-ons. First work to make this class usable for them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-13 21:17:26 +00:00
Ingo Weinhold b3e7c4a4b9 * Added fDelegate member.
* Removed private AutoDeleter class. The shared ArrayDeleter is used instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-13 21:13:02 +00:00
Karsten Heimrich 98148bd6c5 * this should fix the build on gcc4
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-12 22:47:42 +00:00
Axel Dörfler 7bdf92f3f7 Started a create_display_modes() function that should be used by accelerants
to create their mode list. Once it's done, it should cover all possible cases,
and allow the base mode list to reside in the app_server (under Haiku, at least),
so that all drivers will benefit from an updated list.
Right now, it might already work to a degree, but it's not yet tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-12 15:59:50 +00:00
Axel Dörfler 13a81299f1 Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-12 15:56:08 +00:00
Stefano Ceccherini 65e63b987d PaletteConverter now exports a static InitializeDefault() method, which
can be used (and is, by _init_interface_kit()) to initialize the ... 
er... default instance of 
PaletteConverter using the system color map, thus avoid building the 
list of colors, which takes some time. Fixes bug #505.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-11 13:30:56 +00:00
Axel Dörfler f8941839c3 * Reworked stealing pages: the page thief thread is gone now,
vm_page_reserve_pages() and vm_page_allocate_page() will now steal pages from
  the inactive queue as needed.
* We currently never steal active pages anymore, but this might need to be
  revised later (therefore, the page scanner never waits anymore, but uses
  mutex_trylock() to lock a cache).
* The page scanner and writer now both run at normal priority - let's see how
  that will work out.
* Introduced an inactive queue.
* Instead of shuffling pages around in the queue (and therefore destroying LRU)
  the page stealing mechanism now uses a marker page to be able to release the
  page lock without losing its position in the queue.
* The page writer now always grabs the whole release count of the semaphore, so
  that there won't be a huge backlog to catch up with. 
* vm_page_num_free_pages() now also includes the inactive queue as well as the
  reserved pages (they are no longer regarded as free pages).
* Added a insert_page_after() function that inserts a page after another one,
  needed by the marker code.
* clear_page() now gets a vm_page instead of a physical address which simplified
  some code.
* Removed superfluous initialization of the queues (if those aren't zeroed on
  start, we would have serious problems, anyway).
* Removed old and unimplemented dump_free_page_table() ("free_pages") KDL
  command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-11 08:01:18 +00:00
Ingo Weinhold 15ed7c71d6 More fleshing out the disk system add-on interface and related classes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-10 21:35:22 +00:00
Ingo Weinhold 67c578e73f Added global lock that can be used for lazy initializations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-10 21:30:51 +00:00