Commit Graph

15273 Commits

Author SHA1 Message Date
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
Axel Dörfler
5143d99bb0 Removed timeout in the EventDispatcher, clarified TODO about the message queue
of messages that failed to be sent.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 20:47:16 +00:00
Rudolf Cornelissen
face6fcd0a overlay code now respects the B_OVERLAY_COLOR_KEY cmd flag.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 20:24:46 +00:00
Rudolf Cornelissen
86ca91abfb overlay code now respects the B_OVERLAY_COLOR_KEY cmd flag.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 20:23:57 +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
4c0f752c68 added 'accelerant_device_info struct to shared_info, now containing more detailed info about the card in use. This info is returned via hook GET_ACCELERANT_DEVICE_INFO in case someone uses that :).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 20:06:52 +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
Rudolf Cornelissen
bd3f19ae33 added 'accelerant_device_info struct to shared_info, now containing much more detailed info about the card in use. This info is returned via hook GET_ACCELERANT_DEVICE_INFO in case someone uses that :).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15893 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 19:42:14 +00:00
Stefano Ceccherini
797d1a66fa menufields should default to B_ITEMS_IN_COLUMN. This fixes the workspaces menu (in Screen) opened at the wrong position. As a consequence of this, I had to change the drawing code a bit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 16:00:07 +00:00
Stefano Ceccherini
b120bcd665 Don't quit tracking the menu even if OverSuper() returns true, if HitTestItems() doesn't return NULL. This should fix (at least in part) bug #85
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 09:40:28 +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
1777154c14 * Fixed tracing build.
* In reserve_boot_loader_ranges() we skip ranges that lie without
  the kernel address space (we failed and panic()ed before). The
  architecture specific code has to deal with those, if they are
  of any importance.
* sAvailableMemoryLock.sem was not set to -1 in vm_init() so code
  executed after semaphores were available but before the semaphore
  was created caused semaphore 0 to be acquired.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 02:22:24 +00:00
Ingo Weinhold
1cf0c3b3f2 Clear the back pointer in the root kernel stack frame, so stack traces
will end there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 00:49:31 +00:00
Stephan Aßmus
93d1b9f406 * quick fix for when fBitmap has been recomposed
partly, fDisplayBitmap is not correctly re-established...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-09 11:24:08 +00:00
Stephan Aßmus
37a3ed9263 * quick hack to hide the cursor in fullscreen
(TODO: do this after a time out)
* quick hack to display bitmaps containing an
  alpha channel with a checker background
  (TODO: rework filters to be alpha channel
  aware and compose the checker background
  independently of the filter)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-09 11:18:01 +00:00
Stephan Aßmus
c9a5153a00 fix building for BeOS
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-09 11:14:37 +00:00
Ingo Weinhold
42e94eb9b8 Give a bit more info, if a symbol could not be found.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-09 05:23:50 +00:00
Ingo Weinhold
e2f7a6d61f Missed that one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-09 03:42:39 +00:00
Ingo Weinhold
48fe700d70 arch_debug.c -> arch_debug.cpp
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-09 03:38:09 +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
Ingo Weinhold
e525ca0a4d Fixed relocation of negative 14, 16, or 24 bit values. In case of 14
and 24 bits the set upper bits were overwriting the upper bits of
the word at the target location (usually something like a branch
instruction).
This is the kind of bug that easily take six hours to find, especially
when working with interrupt code and being convinced that the problem
must be related.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-09 02:47:18 +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
Stephan Aßmus
f15ba33751 synced with version 1.59 of the OpenTracker rep
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 18:00:25 +00:00
Ingo Weinhold
a06cbf3fc2 arch_int.c -> arch_int.cpp.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15876 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 17:14:26 +00:00
Jérôme Duval
5543f13539 our elf resolver has a problem with previous way of linking with FSUtils
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 16:25:28 +00:00
Jérôme Duval
06ac7d759d added FSUtils.cpp from libtracker, fitted for our use
fixed some visual glitches (and gone around a bug in our menu implementation)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 16:02:44 +00:00
Jérôme Duval
e2491d6b8a reverted to previous version
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 16:01:05 +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
Axel Dörfler
1397187532 Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 13:59:37 +00:00
Axel Dörfler
5ce1a7a509 Fixed (superfluous) GCC4 warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 13:59:19 +00:00
Axel Dörfler
8a74d5f103 Imported r15693 to the R5 version of BFS: fixed endian issues.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 13:55:56 +00:00
Axel Dörfler
1956c146ea bfs_shell now also builds under Linux/PPC, not tested yet, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 13:19:12 +00:00
Axel Dörfler
f7ba8efac9 Fixed GCC4 warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 13:09:31 +00:00
Axel Dörfler
ea34f0f03b If there was a BMenuItem view with shortcut, it tried to delete the shortcut twice
(as the shortcut list wasn't emptied), courtesy of Stippi.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 13:05:33 +00:00
Axel Dörfler
8c7229ddbe Fixed some GCC4 only warnings
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 12:39:06 +00:00
Ingo Weinhold
15af38b288 Removed pointless comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 04:54:47 +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
85af525e59 * Added missing call to __ppc_setup_system_time(). system_time()
and real_time_clock[_usecs]() finally seem to work (at least in
  the kernel).
* Removed accidentially committed debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-07 20:35:13 +00:00
Ingo Weinhold
67ea83c566 We use the generic physical page mapper for PPC now. I realized that it
is actually not that nice for PPC since we don't have large pages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-07 20:32:32 +00:00
Ingo Weinhold
250995598d Tagged things that don't build for PPC, so that they are added
to the x86 image only.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-07 20:29:50 +00:00
Ingo Weinhold
b264ddab5d Corrected copyright. :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-07 20:27:13 +00:00
Ingo Weinhold
1005ea4b5d Fixed PPC build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-07 19:35:18 +00:00
Ingo Weinhold
9e483db6ef Missing include.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-07 19:30:34 +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
Ingo Weinhold
a71974c1f8 Pulled the algorithm for dynamically mapping physical pages into an
"IO space" out of the x86 specific source into arch/generic. We'll use
it for PPC as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-07 03:13:42 +00:00
Stephan Aßmus
1e1b86ef54 * make sure that fTopLayer is NULL when the top layer is deleted
* make sure layers are removed from the token space when the
  WindowLayer is deleted


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-06 17:17:54 +00:00
Stephan Aßmus
fb82d189d0 * BWindow deletes its view hirachry
* BViews set fOwner to NULL recursively when detached
* updated a comment


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-06 17:14:58 +00:00