Commit Graph

2857 Commits

Author SHA1 Message Date
Axel Dörfler
995ab7b3c6 The server now differentiates between hidden and minimized - that concept somehow
got lost, before.
It might not work 100% correctly yet, but it works good enough to hide the Tracker
status window from the Deskbar, and thus, fixing bug #133.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-09 18:28:29 +00:00
Stephan Aßmus
c81d2e7a59 * fixed window zooming/unzooming behaviour
* fixed FrameResized() and FrameMoved() not
  being called anymore in response to ResizeTo()
  and MoveTo() since I introduced a check in
  DispatchMessage() (fixes bug #123)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-09 16:39:46 +00:00
Rudolf Cornelissen
c72f6a6d0b rewrote kerneldriver and accelerants retrace INT handling. Bumped version to 0.72.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-07 15:00:40 +00:00
Ingo Weinhold
f4b0f67cf6 Added [arch_]int_post_device_manager() which is invoked after
the device manager is initialized. For x86 it does nothing, but
for PPC it searches for a supported interrupt controller and
remembers it for later use.
arch_int_{enable,disable}_io_interrupt() are implemented as
well as handling of external exceptions (aka as I/O interrupts).
We'll see later how well that works.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-07 02:50:32 +00:00
Ingo Weinhold
cda4ca9582 Module interface for interrupt controllers. Might change later.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16269 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-07 02:31:07 +00:00
Ingo Weinhold
3277aade49 * Added get_root() to device_manager_info. Surprisingly enough, it
returns the root device node. Now its actually possible to
  traverse the device node tree without a node to start with.
* Fixed execution order problem in dm_get_next_child_node(). The
  supplied node was put first (which could cause its immediate
  deletion), but was still accessed thereafter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-07 02:29:14 +00:00
Ingo Weinhold
41f7459c23 Added a get_pci_info() to pci_device_module_info. It was a bit too
complicated to get a pci_info for a given pci_device before. The
function is not very efficiently implemented, but I didn't see how to
do that without more intrusive changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-07 02:15:53 +00:00
Michael Lotz
9e7948f45e * Fixed locking of the FT_Face by moving it into Get/PutTransformedFace()
* Removed the FaceGetter as it was only needed for locking
* Cleaned up TruncateString()
* Fixed a typo in moreUTF8.h

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 17:42:18 +00:00
Jérôme Duval
38f16e924f added some missing definitions from usb_audio driver
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 13:11:30 +00:00
Axel Dörfler
d5ffccabb7 * Removed unused MakeBlendColor().
* At least 15 bit mode is broken, and should probably be removed.
* Cleanup - do we really need this class?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16247 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 11:47:13 +00:00
Michael Lotz
db5734a452 More work on the BFont special functions.
* Reworked functions like GetEscapements(), GetBoundingBoxesAsString() and GetGlyphShapes() completely
* Made the ServerFont functions uniform in their prototypes and cleaned out unnecessary arguments
* Added new UTF8 handling functions to moreUTF8.h that are now used by ServerFont
* Put the common transformations of the FT_Face into an own GetTransformedFace() to lessen code duplication

In other words, ServerFont is now cleaned and handles UTF8 pretty efficiently. Some ToDo's are still left though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 23:36:59 +00:00
Axel Dörfler
195e980ef1 * Cursors are now reference counted, so it shouldn't be possible anymore
to delete them accidently :)
* You should no longer call HWInterface::SetCursor(), but the new Desktop::SetCursor()
  if you need to change the cursor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 19:43:44 +00:00
Axel Dörfler
aa1f543799 Some work on cursors:
* Fixed a myriad of bugs all over the place, ranging from locking errors to
  deleting objects that don't belong to the one deleting them (hello HWInterface!)
* Almost all ServerWindow cursor stuff was broken; I've replaced all commands
  to set a cursor with a single one AS_SET_CURSOR.
* Renamed some cursor commands.
* Changed the (broken) way ServerApp::fAppCursor was maintained - the application
  cursor is now NULL as long as possible.
* Removed superfluous ServerCursor app signature stuff.
* The BApplication will no longer duplicate the default/I-beam cursors, it will
  just reuse the default ones which now have fixed tokens.
* As a result, changing the cursor is now working as expected, closing bug #102.
* Rewrote Cursor.h, renamed private members to match our style guide.
* Minor cleanup.

What's still left to be done is reference counting the cursor objects to make them
work right and reliable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 18:14:14 +00:00
Michael Lotz
bb96bd0a70 * Fixed GetGlyphShapes(). The BShapes that are outputted are correct now but the app_server still cannot draw them correctly.
* Changed the allocation to new for GetGlyphShapes() and GetEscapements() as the data is deleted in ServerApp.cpp
* Minor cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-04 22:20:00 +00:00
Michael Lotz
ec56c2c1dc Fixed and cleaned up BShape and BShapeIterator. They should now work and behave like the R5 version.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-04 22:11:57 +00:00
Stefano Ceccherini
e333843348 Added Alloc/Copy/FreeRunArray() as Axel's suggestion, and used it internally in TextView. Also fixed small memory leak
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-03 21:22:00 +00:00
Axel Dörfler
9f8734ebea FreeBSD doesn't have strnlen(), and therefore couldn't compile our strlcat.c.
Sorry, that was the problem actually reported by Alexander Deynichenko...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-03 12:24:15 +00:00
Axel Dörfler
40b8343312 Should fix the build under FreeBSD, problem reported by Alexander Deynichenko.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-03 12:14:56 +00:00
Rudolf Cornelissen
20b32cf501 added dangerous-RAM-size defines for hw-bug workaround.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-02 15:53:37 +00:00
Axel Dörfler
d14aab0dca Changed the way how CPU activity is monitored: instead of taking the active
time of the idle thread as a measure, we now compute the CPU activity on
each thread switch - the time the CPU worked is the total of user and kernel
time a thread spent during its quantum.
Unlike before, this mechanism works correctly on SMP machines. I hope this
works as expected :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 20:03:55 +00:00
Axel Dörfler
df213cedbc * CPUs can now be disabled - that is, they will keep idling.
* Added syscalls _kern_set_cpu_enabled() and _kern_cpu_enabled().
* scheduler.c::sRunQueue::tail was not maintained at all; changed sRunQueue to
  be a simple thread pointer instead of a struct thread_queue.
* Turns out we're monitoring CPU activity incorrectly when we've got more
  than one CPU.
* Renamed the global CPU array from "cpu" to gCPU.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 16:09:05 +00:00
Ingo Weinhold
1cac47bfa9 Added a few more constructors and initialization methods. Among them two
SetToImage() variants for initializing the object to the resources of
the shared object file belonging to a loaded image. Should be handy for
libraries and add-ons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 00:15:01 +00:00
Axel Dörfler
204131dc97 Added a real yield function to the kernel (using the next_priority approach).
The test application lets run a thread at the highest priority that calls
yield all the time - the system stays responsible when it runs, so it seems
to work fine :)
Changed the malloc implementation to use _kern_thread_yield() instead of
snoozing.
We should think about making this call public, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 02:29:02 +00:00
Axel Dörfler
d14af9fde6 Introduced a next_priority field to struct thread that will be used when
enqueueing a thread to the run queue.
This mechanism is now used for the thread priority boost on semaphore
release. Also, those threads are no longer made real time threads, they
now get a temporary priority of B_FIRST_REAL_TIME_PRIORITY - 1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 01:58:49 +00:00
Stefano Ceccherini
61ba5a32c1 Added some code to draw "empty" in empty menus. Not working for the
moment, but committing since it's too late to continue working, and at 
least the window is resized correctly...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-29 22:27:46 +00:00
Axel Dörfler
1ee28f024a Too more FreeBSD build fixes by Alexander Deynichenko.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16139 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-29 17:45:52 +00:00
Axel Dörfler
5da68569d0 The APM now successfully shuts down my IBM ThinkPad T40. It's still disabled
for more testing on other machines.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-29 15:51:33 +00:00
Ingo Weinhold
15285cb04d Good deal of hackery to get update_mime_info() to work on the host
platform to the extend we need it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16129 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 22:00:16 +00:00
Ingo Weinhold
e9bd9044fd Dummy BApplication class. So we don't have to #ifdef it out in tools we
to build for the build platform.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 21:56:38 +00:00
Ingo Weinhold
0b537029e3 Synchronized the MIME stuff in the build platform support libbe with
the current Haiku libbe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 20:20:27 +00:00
Ingo Weinhold
15424f3d37 Finally fixed update_mime_info(). As Be's version it understands two
different "force" levels now and updates the app file info attributes
for shared object files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16123 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 19:41:07 +00:00
Axel Dörfler
afd6dfc8b4 Implemented first basic APM driver. Only tested with QEMU so far, that's why
it's currently disabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 18:11:20 +00:00
Ingo Weinhold
906b28a9ac Added some PPC support to the PCI bus manager. We scan the Open Firmware
device tree for PCI controllers and make them known to the bus manager,
if we know how to talk with them. ATM we support only the UniNorth chip,
which can be found in G4 Macs (code ported from FreeBSD).
As far as I can judge it, all attached devices are identified correctly
on all three host bridges of my Mac mini.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-26 15:21:31 +00:00
Ingo Weinhold
f602da2b72 * Turned the kernel platform support from a library into an object.
* Moved the Open Firmware function platform_get_next_device() from
  the boot loader into the kernel (renamed to of_get_next_device()).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-26 15:06:59 +00:00
Rudolf Cornelissen
f970e0066a reverting to 16021, removing that panel hack solution. Let's forget about that for now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-26 15:03:01 +00:00
Ingo Weinhold
6cdd45a94b Added enum to PPCPlatform to identify the platform.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-26 14:59:16 +00:00
Axel Dörfler
924479179b Implemented on screen debug output during boot - to be enabled in the boot loader
safemode menu.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-25 16:12:10 +00:00
Axel Dörfler
979aeaf71c Fixed bug #97:
* BEntry::Remove() now uses _kern_remove_dir() for directories.
* Added fd parameter to _kern_remove_dir().
* Fixed LibBeAdapter's _kern_unlink() to only work on files, and
  added _kern_remove_dir() for directories.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-25 11:12:21 +00:00
Rudolf Cornelissen
fa9f20e97e added a flag to shared_info indicating one-time BIOS checking has been done, added struct typedef that can hold the BIOS info needed. More will probably come, like slaved-CRTC info (TVout use concurrent with panels).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-24 20:38:55 +00:00
Axel Dörfler
eb2fc29abd Implemented syslog support for the kernel debug output. Not fancy at all yet, but
it seems to be working fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-24 20:28:52 +00:00
Marcus Overhagen
583578c557 added experimental support for CardBus<->PCI bridges
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-23 17:50:01 +00:00
Axel Dörfler
05b4b0d7ce Node monitoring didn't work because unflattening KMessages didn't take the
message header into account. It worked before at some point as BLooper was
letting the looper handle messages to invalid targets - they are now just
dropped.
This fixes bug #93.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-23 13:30:17 +00:00
Rudolf Cornelissen
f4610faea8 added DPMS state to shared_info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16038 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-22 19:53:27 +00:00
Rudolf Cornelissen
e999b3e654 added several things to shared_info, accomodating the driver updates.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16034 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-21 22:15:23 +00:00
Stefano Ceccherini
ccee0bb56d renamed fToken to fAreaOffset and use it instead of fArea for the area offset. Less hacky.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-21 20:30:31 +00:00
Rudolf Cornelissen
6e6488d678 driver now enforces correct order of use of INIT_ACCELERANT and CLONE_ACCELERANT: bailing out with B_NOT_ALLOWED if incorrect use is detected.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16027 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-21 17:05:26 +00:00
Rudolf Cornelissen
098b042978 driver now enforces correct order of use of INIT_ACCELERANT and CLONE_ACCELERANT: bailing out with B_NOT_ALLOWED if incorrect use is detected.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16021 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-21 14:50:11 +00:00
Stefano Ceccherini
9e8d2dd28b Removed PicturePlayer, it only contains code duplicated from TPicture. Some cleanups for BPicture. This commit also completes previous commit for BMenu
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-17 21:39:07 +00:00
Axel Dörfler
0e382a4667 Implemented a syscall to get information about the open file descriptors of all teams.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15991 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-17 01:29:18 +00:00
Jérôme Duval
c3f86c8050 fix build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-15 23:17:05 +00:00
Axel Dörfler
ddb7d0b6a6 Implemented force unmounting - by passing the "-f" option to "unmount" you
can now safely unmount volumes that are still in use by some applications.
Minor fixes to the FD disconnection implementation:
* put_fd() checked the condition for being able to disconnect a descriptor
  incorrectly (causing the FD to never be disconnected).
* remove_fd() would hand out disconnected descriptors (but should have
  returned NULL for them).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15952 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-15 19:26:42 +00:00
Axel Dörfler
128165101a Implemented disconnecting file descriptors: this will be used by the
force unmounting code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-15 17:11:48 +00:00
Ingo Weinhold
7afc16f059 * Fixed a bug regarding storing/restoring FPSCR in the interrupt
code. The stack pointer was not adjusted, hence we were
  overwriting the previous register value. But it looks like I
  missed to check in the arch_cpu.h with the iframe structure
  including the floating point registers anyway.
* Backported the ELF PPC relocation code from the boot loader to
  the kernel.
* Fixed the PPC version of arch_thread_switch_kstack_and_call().
  Apparently the signature had changed, but the assembly
  implementation was not adjusted accordingly.
* sc prints more registers now (LR, CR, CTR, XER,...).
* Fixed several occurences of not-working fault handlers.
  Apparently the compiler realized, that the "error" label was
  never jumped to (by the code it knew), and optimized the
  respective code away. Now we use a trick to make it think the
  error label might actually be jumped to. I wonder whether the
  x86 version has the same problem when being compiled with GCC4.
* Adopted the x86 page fault handling interrupt code.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-13 00:49:13 +00:00
Stephan Aßmus
55f6067fcd * I thought it was a good idea to Flush() the server link
in all drawing methods in case the parent window was
  not in a "transaction" (fInTransaction). For ordinary
  updates, nothing has changed, but if you call drawing
  methods outside of an update, they will happen "immediately"
  rather than when the link is sporadically full and auto
  flushes. The effect is that the cursor in Terminal blinks
  reliably, the selection in BTextViews follows the mouse
  right on the spot (and so on). BWindow::BeginViewTransaction()
  and EndViewTransaction() now have a meaning in Haiku too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-12 12:22:34 +00:00
Ingo Weinhold
fc1e671b53 Made C++ safe.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-11 14:36:43 +00:00
Stefano Ceccherini
f9f970d98c Yesterday's commit triggered some other visual bugs: hopefully fixed them all. A disabled menufield now doesn't open its associated menu anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-11 09:31:27 +00:00
Axel Dörfler
ba61df6d0b Beginnings of APM support: we now connect to the APM BIOS in 32 bit protected mode.
We don't do anything with it yet, though, so the BIOS will probably ignore us since
we are supposed to poll for events.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 22:54:36 +00:00
Rudolf Cornelissen
f668e4770d added 'accelerant_device_info' struct to shared_info.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 20:07:31 +00:00
Rudolf Cornelissen
c9e85dd9c2 added 'accelerant_device_info' struct to shared_info, once again breaking binary compatibility with the 3D add-on.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 19:43:41 +00:00
Ingo Weinhold
6c678c57c7 * The exception vector offset is now also part of the iframe.
* Cloned iframe stack management from x86.
* Reimplemented arch_thread_{get,set}_current_thread(). The
  thread structure is stored in SPRG2. It is set to NULL in
  arch_cpu_preboot_init(), now. A non-null current thread
  causes all kinds of undesired behavior in early boot code.
* We establish the address space mappings we know from the
  Open Firmware as areas. At least those in kernel address
  space. The ones in userland address space are tougher.
  Fortunately on my Mac mini there aren't any save the
  boot_loader stack, which is not needed any longer anyway.
* Added stack trace support to the kernel debugger. Mostly
  cloned and adjusted the x86 code. Some bits are still
  missing, like stack traces for other threads.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 03:00:33 +00:00
Ingo Weinhold
7176dd57e5 Reworked the exception handling code. The former one ran into the
void after turning off BAT for the segment containing itself.
The monster macro for the exception vector code was not really
elegant besides being too long for the 32 byte performance
monitor exception slot. Furthermore wasting three of the SPRG*
registers as cheap scratch memory wasn't that nice either.

We now have a three-step approach: The exception vectors
themselves contain only five instructions which branch to common
code at the beginning of the same physical page. That one sets
up BAT for itself, turns address translation back on and jumps
into the kernel. There we turn off BAT again, dump an iframe,
and enter the actual exception handler (/dispatcher). Upon return
the registers are restored from the iframe and we get back to the
place where the exception occurred.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-09 03:30:52 +00:00
Ingo Weinhold
c9eb843c35 Added comment about the use of some special purpose registers.
Haven't found a better place yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-09 03:11:31 +00:00
Stephan Aßmus
7afc7c5074 ServerFont:
* fixed weird pointer conversion in SetStyle()
* fixed a potential mix up in operator=() in case the
  other ServerFont has fStyle == NULL

ServerWindow:
* the WindowLayer fTopLayer cannot be deleted by
  client request, just for safety reasons
* the link is flushed if there is no drawing engine,
  but this case is theoretical only
* deleting the ServerWindow object syncs with the
  client, so that when BBitmaps are deleted, they
  can be sure there are no pending messages (which
  would be executed in a nother thread)
* there is no timeout anymore when sending messages
  to the client, which made absolutely no sense

AGGTextRenderer:
* renamed fFontManager to fFontCache, because that's
  what it really is
* fLastFamilyAndStyle defaulted to the system plain
  font and therefor that font was never loaded when
  the font never changed meanwhile

DrawingMode:
* I'm not quite sure but I think there was the
  potential of a division by zero, at least I
  had crashes with "divide error"

HWInterface:
* fix update when the cursor shape changed in
  double buffered mode
 
ViewLayer:
* since the top layer is never really deleted
  before its time has come, it is not necessary
  to set it to NULL in the ViewLayer destructor

ViewLayer/WindowLayer:
* added a function to collect the view tokens
  that are affected by an update session

EventDispatcher:
* use the importance of the message for the timeout
  in _SendMessage()
* drop mouse moved events in the server if we're
  lagging behind more than 5 ms (Axel, maybe review)

View:
* there were some problems with the locking
  of the BWindow looper in RemoveSelf(), since
  this is called from the window destructor,
  also of BWindows from BBitmaps, which have
  never been run (this might need review), at
  least I seem to have solved the crashing
  problems introduced by actually deleting the
  view hirarchy in the BWindow destructor
* fixed _Draw() for being used non-recursively,
  temporarily disabled DrawAfterChildren, which
  didn't work yet anyways (because views cannot
  draw over children in the server yet)

Window:
* small cleanup when deleting shortcuts
* sync with the server when having send
  AS_DELETE_WINDOW (see ServerWindow above)
* fixed locking in Begin/EndViewTransaction()
* removed folding of _UPDATE_ messages, since
  there is only one ever in the queue
* set the fInTransaction flag during an update,
  I plan to use this in BView later to
  flush the link when drawing outside of an
  update
* BView::_Draw() is now called by view token,
  this gives the next leap forward in speed,
  the overhead because of drawing clean views
  was considerable



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 22:04:52 +00:00
Axel Dörfler
5cd809aaab _kern_get_next_{sem|port}_info() had a wrong argument type for the
cookie (uint32* instead of int32*).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 15:34:09 +00:00
Ingo Weinhold
262e0a636b We use the same strategy for computing the system time as on x86 now.
The time base conversion factor is the 32 bit value
  2^32 * 1000000 / time base frequency,
so the system time can be computed by
  system time = time base * conversion factor / 2^32.
The expression in system_time() looks more complicated now, but is
actually much faster (factor 2.5 on my Mac mini). I'm positively
surprised, how good the assembly looks, that GCC 4 generates. There's
not that much potential for optimization by hand-coding the function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-07 23:05:56 +00:00
Ingo Weinhold
8baf8813c0 Added "shutdown" debugger command. Implemented arch_cpu_shutdown() for
PPC.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-07 22:49:43 +00:00
Ingo Weinhold
3b36b30fef * Made vm_alloc_virtual_from_kernel_args() available to other kernel
parts, too. Fixed a potential overflow.
* The generic physical page mapper reserves the virtual address range
  for the IO space now, so that noone can interfere until an area has
  been created. The location of the IO space is no longer fixed; it
  didn't look to me like it was necessary for x86, and we definitely
  need to be flexible for PPC.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-07 17:37:21 +00:00
Ingo Weinhold
4f7d12cf6a Made C++ save.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-07 03:14:02 +00:00
Stephan Aßmus
34a9556215 Made our glue code compatible to BeOS again. IOW executables compiled for Haiku will
now run under BeOS as well (as long as they don't use any functions that are not
available under R5).
The solution is a bit messy, but we have to live with it :-)
The runtime loader now patches the __gRuntimeLoader symbol in libroot.so to point
to its exported structure instead of passing it to the init functions as an
argument.
(Hax0red by axeld and bonefish on stippi's assimilated machine -- resistence is futile)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-06 03:48:11 +00:00
Stefano Ceccherini
8f3f25cf63 Merged the four AS_LAYER_DRAW_BITMAP handlers into just one handler
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-04 12:15:58 +00:00
Ingo Weinhold
e55e1a0e66 Implemented the PPC specific RTC support. We search for an "rtc"
device in the Open Firmware implementation of boot loader and
pass its path to the kernel, where it's opened and used for
getting/setting the real time. The expensive atomic_*64() on PPC
32-bit make things a bit more complicated. Moreover, missing
64 bit multiplication and division instructions won't really
allow system_time() to be anywhere near as fast as on x86. :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15837 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-04 04:55:04 +00:00
Ingo Weinhold
09bb4e9ac5 The real_time_data structure contains an architecture specific
substructure now (that's the only member actually). The system time
offset is therefore accessed via architecture specific accessor
functions.
Note, that this commit breaks the PPC build. Since I want to rename at
least one file I've already changed, I can't avoid that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-04 02:17:59 +00:00
Axel Dörfler
fc62f08d8a * Fixed BView::_SetShelf(), it did not remove a previous shelf.
* Fixed BShelf::_AddReplicant(), at least a bit. I managed to add the "ScreenChanger"
  icon to the tray, although the icon was not drawn, and it was on the wrong
  position.
* _AddReplicant() also did not reply to the waiting message source in case
  of failure.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 21:56:26 +00:00
Ingo Weinhold
d9a5e6050f Pulled the conversion between seconds since the epoche and the split up
(year, month,...) representation out of the x86 specific code and put
respective support functions into real_time_clock.c. We'll need those
for the PPC specific part too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 17:26:37 +00:00
Ingo Weinhold
7afa713acb Reorganized the boot platform dependencies in the kernel a bit.
Basically the architecture specific code is now responsible to
init and make use of the platform specific code, now. The reason
being that we have only one kernel per platform and thus cannot
decide at compile time, which platform to use (if any).
The PPC implementation features an abstract base class PPCPlatform
(implemented for all supported platforms) through which platform
support is provided.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 16:26:39 +00:00
Ingo Weinhold
716a16ce61 * Find out a few interesting information about the system (like CPU,
bus, and time base frequency) in the PPC boot loader, and propagate
  them to the kernel via kernel_args.
* Now we use the correct time base frequency for timer calculations.
* Implemented PPC specific system info stuff. Added a few PPC CPU
  types to <OS.h>.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 13:30:23 +00:00
Axel Dörfler
5edcfe9619 Cleanup!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 09:23:08 +00:00
Ingo Weinhold
c8cd524c67 * Refactored arch_vm_translation_map_init_post_area() a bit: Pulled out
remapping stuff into separate functions and made them available to
  others.
* Remap the exception handler space in arch_int_init_post_vm() into the
  kernel address space (same issue as with the page table).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-02 03:30:58 +00:00
Ingo Weinhold
835fb10b16 Added of_exit and of_enter KDL commands.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-02 02:30:31 +00:00
Ingo Weinhold
a1bcf2c880 * The OF memory management callback is now set in arch_mmu_init().
According to the spec we need to set it before taking over the MMU,
  but we can't call it before arch_mmu_init(), since we need the OF
  to allocate the page table. So we do it after we have allocated
  the new page table.
* Added PPC specific kernel_args: The virtual address ranges we want
  to keep in the kernel. We fill that in with the translations we
  find when initializing the MMU stuff. We remove the memory the
  boot loader occupies from those. Besides the stack for the boot
  loader only the OF stuff remains.
* arch_mmu_allocate() now starts to search at KERNEL_BASE for a free
  virtual address when no particular address is requested. This saves
  us further trouble in the kernel, since those allocations would
  need to be remapped otherwise.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-02 01:56:37 +00:00
Stephan Aßmus
e067fed541 Decorator::ResizeBy tells you the dirty region, DefaultDecorator::Draw() pays attention to the update rect, small clean ups along the way
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-02 01:03:31 +00:00
Alexander G.M. Smith
deb238df7d Tried to get MDR to compile under Zeta RC3 but to no avail, with lots of
brick wall collisions.  Along the way I found a few defines that no longer
exist in Haiku - changed B_BEOS_VERSION_DANO to use Haiku versions (anyone
rebuilding under Dano might want to undo it).  By the way, the BeOS version
number define system might be worth using, since it's a numerical compare
rather than #if defined(V1) || defined (V2) || defined (V3) and so on.

What sort of errors?  Besides needing libzeta.so for some things, the
networking compatibility compile doesn't work (libbind and all that).
Some examples among many:

In file included from /boot/home/Haiku/src/kits/mail/numailkit.cpp:14:
/boot/develop/headers/be/support/Autolock.h:3: using directive `BAutolock' introduced ambiguous type `BAutolock'

In file included from /boot/home/Haiku/src/kits/network/compat/libnet/netdebug.c:6:
/boot/home/Haiku/headers/private/net/netdebug.h:32: syntax error before `void'


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15775 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-01 23:59:24 +00:00
Ingo Weinhold
10a83ac31f * Added tlbia() and tlbie() macros. Replaced ptesync() by ppc_sync();
the fact that I couldn't find ptesync in an otherwise more complete
  documentation I downloaded yesterday made me suspicious.
* arch_cpu_global_TLB_invalidate() uses tlbia now. The instruction is
  optional, but so is tlbie (how I understood it is that both exist,
  when the architecture implementation has a TLB). And the former loop
  looked just scary.
* Implemented arch_cpu_user_TLB_invalidate(). It does just the same as
  arch_cpu_global_TLB_invalidate().
* Some changes with respect to synchronization required on page table
  and segment register updates.
* Some more minor renaming. Pulled a new function
  remove_page_table_entry() out of unmap_tmap().
* In arch_vm_translation_map_init_post_area() we do now remap the page
  table into the kernel address space, if it was without before. The
  page table might actually be a good application for BAT, though.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-01 21:40:27 +00:00
Ingo Weinhold
7c8af51f81 Added ptesync().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-01 14:44:29 +00:00
Ingo Weinhold
957a1b17eb * Introduced new build system variables
{HAIKU,HOST,TARGET}_KERNEL_PIC_{CC,LINK}FLAGS which define the
  compiler/linker flags specifying the kind of position independence
  the kernel shall have. For x86 we had and still have -fno-pic, but the
  PPC kernel has -fPIE (position independent executable) now, as we
  need to relocate it.
* The boot loader relocates the kernel now. Mostly copied the relocation
  code from the kernel ELF loader. Almost completely rewrote the PPC
  specific relocation code, though. It's more correct and more complete now
  (some things are still missing though).
* Added boot platform awareness to the kernel. Moved the generic
  Open Firmware code (openfirmware.c/h) from the boot loader to the kernel.
* The kernel PPC serial debug output is sent to the console for the time
  being.
* The PPC boot loader counts the CPUs now and allocates the kernel stacks
  (made OF device iteration a bit more flexible on the way -- the search
  can be restricted to subtree). Furthermore we really enter the kernel...
  (Yay! :-) ... and crash in the first dprintf() (in the atomic_set()
  called by acquire_spinlock()). kprintf() works, though.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15756 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-30 21:20:07 +00:00
Ingo Weinhold
8d99b63e92 Added missing PPC relocation type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-30 19:49:42 +00:00
Axel Dörfler
f17cfabc82 * Fixed BBox resizing when not attached.
* Less flickering when drawing the label: the area of the label is now
  clipped, so there is no need to fill the background again.
* Consumed the last reserved member for the bounding box of the label.
* More or less rewrote the header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15747 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-30 18:23:48 +00:00
Ingo Weinhold
be950af4df Removed unused kernel_args fields.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-30 17:56:52 +00:00
Axel Dörfler
4acb99b60f Implemented reference counting of ServerBitmaps, made constructor and destructor private,
as only the BitmapManager class is allowed to call them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15718 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 15:36:18 +00:00
Axel Dörfler
93052717b0 Renamed AS_LAYER_GET_{DRAW|BLEND}_MODE to *_{DRAWING|BLENDING}_MODE.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 15:06:24 +00:00
Axel Dörfler
e351ecb78d Renamed BView::_SetViewImage() to _SetViewBitmap(), and AS_LAYER_SET_VIEW_IMAGE
to AS_LAYER_SET_VIEW_BITMAP.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 14:52:43 +00:00
Ingo Weinhold
c83d9dad1c * platform_allocate_region() has a new boolean parameter "exactAddress"
specifying whether only the exact supplied address is acceptable. If
  false, the address is considered a hint only. It will be picked, if
  available, otherwise a greater address is tried to be acquired, and
  as last resort any address. This feature is only implemented for PPC.
  It is needed since the preferred kernel text base address 0x80000000
  might not be available (and actually isn't on my Mac mini).
* Fixed a bug in the PPC memory management code:
  is_{virtual,physical}_allocated() were checking whether the given
  range was completely contained by an existing range instead of
  checking for intersection. As a consequence we could (and did) allocate
  a range intersecting with already allocated ranges. The kernel segment
  thus overwrote OF memory for instance.
* The ELF loader makes sure that it got both text and data segment of
  the image to be loaded.

The PPC boot loader successfully loads kernel and modules now. Next
comes the hard part, I'm afraid.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 01:50:23 +00:00
Ingo Weinhold
8cfaf4b974 For PPC the read/write (==data) segment is actually executable
(it contains the PLT).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 01:19:45 +00:00
Ingo Weinhold
d561d0ad68 Added a mini networking stack to the boot loader. It speaks basic ARP,
IP, and UDP, as well as a home brewn UDP based protocol, "remote disk",
which provides random access to a single remote file/device. The Open
Firmware flavored boot loader automatically initializes the net stack,
searches for a remote disk, and tries to boot from it, if the boot
device is a network device (e.g. when loading the boot loader via
TFTP).

This is quite nice for developing with a two-machine setup, since one
doesn't even need to install Haiku on the test machine anymore, but can
serve it directly from the development machine. When the networking
support in the kernel is working, this method could even be used to
fully boot, not just for loading kernel and initial modules.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-27 22:01:33 +00:00
Ingo Weinhold
9897917b9c Added (more Be-ish) Add() methods.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-27 21:08:02 +00:00
Ingo Weinhold
d0714598fd Fixed PPC build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-27 01:51:43 +00:00
Stefano Ceccherini
2c6856d660 more cleanups. I'll probably end up rewriting the etire header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-26 10:16:22 +00:00
Stefano Ceccherini
66080bed4a Sorry for breaking the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15668 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-25 10:43:24 +00:00
Stefano Ceccherini
a66e501974 more cleanup. I can't seem to be able to clone the vesa accelerant so I'm a bit stuck at the moment
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-24 14:20:44 +00:00
Stefano Ceccherini
ed58e05e18 Partly converted the header to our coding style, added some debug output, started to clean up
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-24 13:06:05 +00:00
Axel Dörfler
db39fa281e Moved the headers of the different store implementations into the VM source
directory; they are not used outside the VM.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-21 20:08:49 +00:00
Axel Dörfler
ea2cd27e57 * Fixed the strange vm_cache_ref reference count mechanism: now, a fresh
vm_cache_ref starts with a reference count of 1. When acquiring a vm_cache,
  you no longer need to worry if that should go through the vm_store, or not;
  as it now always does.
* map_backing_store() no longer needs to play with the vm_cache_ref
  references.
* that simplified some code.
* vfs_get_vnode_cache() now grabs a reference to the cache, if successful.
* better balanced vnode ownership on vnode_store creation (vnode_store
  released the vnode before if its creation failed).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15641 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-21 17:00:03 +00:00
Axel Dörfler
79f73dbc56 * vm_page::offset is now called cache_offset and is now an uint32 instead of off_t;
this saves 4 bytes per page. To compensate the loss of bytes, the offset is now
  stored in page size units, that's enough to address 2^44 or 16 TB (which is now
  the maximal supported file size!).
* Renamed vm_page::ppn to physical_page_number.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-21 12:38:31 +00:00
Stephan Aßmus
1f0a4ee8c7 removed unused stuff from Painter and DrawingEngine, fixed the deadlock when trying to use the (20 times faster) DrawingEngine version of StringWidth, the font is now usually ignored when taking on a DrawState in Painter... should add a little speed overall
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 22:39:54 +00:00
Stefano Ceccherini
d69c048704 No longer needed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 22:13:31 +00:00
Axel Dörfler
35cf51550c Replaced arch/thread_struct.h with arch/thread_types.h, and renamed
arch/*/thread_struct.h to arch_thread_types.h, so that it can directly
be included without having to specify the architecure.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 16:07:27 +00:00
Axel Dörfler
d608540b67 Separated vm_address_space.h from vm.h.
Some more cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 15:54:45 +00:00
Stefano Ceccherini
700b38edc4 Started porting WindowScreen to haiku
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15612 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 14:31:26 +00:00
Axel Dörfler
96e01a27bf * Merged vm_virtual_map with vm_address_space - there was no reason to have
them apart (this even saves a pointer from vm_virtual_map to its address space)
* aspace -> address_space
* vm_create_address_space() did not check if creating the semaphore succeeded
* Removed team::kaspace - was not really needed (introduced a new vm_kernel_address_space()
  function that doesn't grab a reference to the address space)
* Removed vm_address_space::name - it was just a copy of the team name, anyway,
  and there is always only one address space per team
* Removed aspace_id - the address space is now using the team_id
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 13:29:11 +00:00
Waldemar Kornewald
ce823541ec Removed #ifdef __cplusplus from networking headers. The check is already done in cdefs.h (__BEGIN_DECLS) which I committed yesterday.
Committed libnetwork.so. I actually wanted to port BSD's libc/net resolver, but that one uses too many unsupported functions, so I basically merged libbind.so and libsocket.so into one library.

Moved the libbind.so sources to libnetwork/dns.

Cleaned up native part of libbind.so a little bit more. Though, the ugly hack remains. We nbetter pthread/mutex support. Added TODO that we also shousctl() into the kernel and libroot.so.

Improved DEVNOTES a little bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-20 10:54:58 +00:00
Axel Dörfler
9d845483cf Got rid of two ToDo-items: instead of clearing the PAGE_MODIFIED flag after having
written the page, we now do it before, so that it cannot lose any changed data
anymore; it doesn't matter if the page is written to while writing it back, the
worst thing that can happen is that we write the same page twice. Also, we don't
rely on the PAGE_MODIFIED bit anymore, we now check all mappings of that page
to find all modified pages, no matter how far the (currently disabled) page
daemon had come.
Also, destroying an area will now result in writing back changed pages - this
is only really important for memory mapped files, though, and should probably
be avoided for other vm_store types.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 23:01:11 +00:00
Jérôme Duval
37a84232bb fix build for echo drivers, added cs_timer.h from pcmcia-cs
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 18:57:29 +00:00
Waldemar Kornewald
8c85eedc66 Moved the needed headers from private to posix folder. This should hopefully fix the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 17:42:05 +00:00
Ingo Weinhold
4c62b0919f Pulled platform independent part of the BIOS boot menu out into
platform/generic/...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 13:35:01 +00:00
Waldemar Kornewald
f7a223fa1b Removed unneeded libbind files (were never compiled, anyway).
Moved some headers around and cleaned them up.

Fixed threading code in libbind.so. Don't know why I hadn't noticed this before. Now it is reliable, but uses an even uglier hack.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 13:26:54 +00:00
Axel Dörfler
39cc80346c * Implemented automatic font_directory creation for font_mappings.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 12:02:17 +00:00
Stefano Ceccherini
70da1fab92 Haiku doesn't have byteorder.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 10:52:48 +00:00
Axel Dörfler
1bd3bb1d58 * Added fallback mappings for the default fonts - since we don't save the
mappings yet, that's a good way to test this functionality.
* Turns out the directory of the mappings must be known already - they
  should be added automatically, but I've added them manually for now
  (which is okay for the default system directory).
* Having more than one style with the same family in the mappings didn't
  work as planned - it now does.
* On my current system, time spend in the font manager constructor went
  down from 1.5 secs to around 12000 usecs (and I have only a moderate
  number of fonts installed, or so I thought - looks like the mappings
  were a good idea :-)) - and that directly cuts down the boot time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 01:01:04 +00:00
Waldemar Kornewald
5352d6baaa Updated DEVNOTES. It's finally complete, now.
Fixed headers:
- added checks for C++
- removed _REENTRANT checks


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-17 11:58:39 +00:00
Waldemar Kornewald
c544064d35 Updated BIND resolver library (libbind.so) to version 9.3.1.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-16 22:38:13 +00:00
Jérôme Duval
f6486d9d01 added some more headers from pcmcia-cs
fixed the build for non haiku platforms


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-16 19:06:45 +00:00
Axel Dörfler
d0d37bdfd1 * vfs_init() is now called later in the startup sequence - since no core kernel
service depends on it, it doesn't make any sense to call it that early in the
  game.
* The VFS now has a low memory handler for vnodes as well. If there is enough
  memory left, it won't free any vnodes anymore.
* Potential crashing bug fix: some functions did not check if the FD passed
  in belonged to the right type; they just assumed it had a valid vnode, but
  it could have had a mount structure associated as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-16 16:11:36 +00:00
Axel Dörfler
7d7f4675bb * Added some cpuid eax == 1 feature definitions to arch_cpu.h
* Renamed IA32_MTR_WRITE_COMBINED to IA32_MTR_WRITE_COMBINING.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-16 12:25:49 +00:00
Axel Dörfler
348c7214f5 Improved processor identification for some VIA C3 models.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-16 11:55:01 +00:00
Axel Dörfler
1534aa236c Added new function vm_low_memory_state() that returns the current low
memory status.
Added new B_NO_LOW_MEMORY constant for the usual case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-15 21:30:28 +00:00
Jérôme Duval
4f9f2ee29d added a pcmcia bus raw driver compatible with R5
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-14 22:50:05 +00:00
Rudolf Cornelissen
42a631e9fa removed one more old nolonger used define for 3D.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-14 20:53:54 +00:00
Rudolf Cornelissen
3c8313fd87 two more command sub-defines needed for DMA scaled blit function. Also removed some old and nolonger used PIO mode command defines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-14 18:38:24 +00:00
Axel Dörfler
e0e9a3e69f * We now support the global page feature of x86 processors that prevents
kernel TLBs from being flushed on context switch.
* new arch_cpu_user_TLB_invalidate() that now does what arch_cpu_global_TLB_invalidate()
  did before.
* arch_cpu_global_TLB_invalidate() will now flush all TLBs, even those from the
  kernel.
* some cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-14 17:07:37 +00:00
Axel Dörfler
484c80abd0 * Added missing prototypes for get_eflags() and set_eflags() to arch_system_info.h
* The boot loader now checks the CPU for the cpuid and rdtsc features, which we
  currently both rely on.
* Removed old and no longer used stage2_priv.h header


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-14 10:43:28 +00:00
Stephan Aßmus
025e63b08a added functions to quickly tell if the pattern is the solid high or low pattern
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-14 08:01:49 +00:00
Axel Dörfler
51a3c450be The short story: we now have MTRR support on Intel and AMD CPUs (the latter
has not yet been tested, though - I'll do this after this commit):
* Removed the arch_memory_type stuff from vm_area; since there are only 8 memory
  ranges on x86, it's simply overkill. The MTRR code now remembers the area ID
  and finds the MTRR that way (it could also iterate over the existing MTRRs).
* Introduced some post_modules() init functions.
* If the other x86 CPUs out there don't differ a lot, MTRR functionality might
  be put back into the kernel.
* x86_write_msr() was broken, it wrote the 64 bit number with the 32 bit words
  switched - it took me some time (and lots of #GPs) to figure that one out.
* Removed the macro read_ebp() and introduced a function x86_read_ebp()
  (it's not really a time critical call).
* Followed the Intel docs on how to change MTRRs (symmetrically on all CPUs
  with caches turned off).
* Asking for memory types will automatically change the requested length to
  a power of two - note that BeOS seems to behave in the same, although that's
  not really very clean.
* fixed MTRRs are ignored for now - we should make sure at least, though,
  that they are identical on all CPUs (or turn them off, even though I'd
  prefer the BIOS stuff to be uncacheable, which we don't enforce yet, though).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-13 16:34:29 +00:00
Axel Dörfler
d49423aea3 Added a wbinvd() macro.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-13 01:49:44 +00:00
Axel Dörfler
2ed21b8525 Some work in progress of the MTRR support. Shouldn't do any harm yet :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-13 00:06:52 +00:00
Axel Dörfler
97ec781e94 Added (empty) memory type functions to the PPC port.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-12 17:13:15 +00:00
Axel Dörfler
7c0a93573b Preparation for MTRR support, code is completely untested, though.
The CPU specific MTRR code will be in modules.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-12 17:04:36 +00:00
Axel Dörfler
b53cc465d6 Moved declaration of gBootDevice into its own header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-12 16:06:33 +00:00
Axel Dörfler
1b974d07ee You can now test if there are more messages waiting in the link.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-12 13:45:09 +00:00
Waldemar Kornewald
a7c861ab5a Preparing for libnetwork.so.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 20:25:44 +00:00
Waldemar Kornewald
aa782b3ed6 Minor modification to net_stack_driver's header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 20:09:13 +00:00
Ingo Weinhold
cbe35e2031 GCC 4 fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 16:22:51 +00:00
Ingo Weinhold
2fee50849c GCC 4 fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-11 13:53:26 +00:00
Ingo Weinhold
ff29286ffd Ouch, those should have been gone since the activation of new build
system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 23:39:30 +00:00
Ingo Weinhold
fe14a904a8 * Implemented [sig]{set,long}jmp() for PPC. No idea, if it is any good,
but it compiles at least. :-)
* Pulled the architecture specific part out of <posix/setjmp.h> into
  <posix/arch/<arch>/arch_setjmp.h>.
* Moved setjmp_save_sigs.c from the x86 specific implementation into a
  "generic" sibling directory, since it is reusable (and actually used
  by the PPC implementation).
* Added generic/longjmp_return.c containing a function __longjmp_return,
  which is invoked at the end of siglongjmp(), resetting the signal mask
  and validating the return value. It is used by the PPC implementation,
  and should also be used by the x86 implementation, but I'll leave that
  to someone who's motivated enough to also test it. :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 22:56:52 +00:00
Axel Dörfler
71b550889e Moved dw_sync_data to a private header DirectWindowPrivate.h and renamed it to direct_window_sync_data.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 15:36:38 +00:00
Axel Dörfler
ab6a6bed3a * Renamed direct window commands
* Removed unused cruft from ServerProtocol.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 15:23:02 +00:00
Axel Dörfler
fc70d6db87 * Renamed AS_LAYER_INVAL_{REGION|RECT} to *_INVALIDATE_*.
* Removed unused AS_LAYER_INVALIDATE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 15:12:28 +00:00
Stephan Aßmus
7be34d3eb2 * removed CopyRegionList, as it made no sense
* finally nailed that much hated bug where the
  wrong background underneath the cursor was restored.
  I always looked for this in the wrong place -
  of course, you cannot blit regions on top
  of the cursor and expect the backup of the
  background to be magically valid still... ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-10 10:42:26 +00:00
Axel Dörfler
463e791c29 Added new window flag B_SAME_POSITION_IN_ALL_WORKSPACES.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-09 13:07:47 +00:00
Rudolf Cornelissen
224b9020ab added some defines for SCREEN_TO_SCREEN_SCALED_FILTERED_BLIT (in progress).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 20:03:36 +00:00