too -- introduced a function ppc_kernel_thread_root() which calls the
three functions (entry, start, exit) in sequence. This brings us well
into the second part of the kernel initialization.
* Replaced stmw/lmw in ppc_context_switch() by individual stwu/lwzu
sequences. The former ones are documented to perform suboptimal on
some architecture implementations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15904 a95241bf-73f2-0310-859d-f6bbb57e9c96
the previous implementation of arch_cpu_global_TLB_invalidate() back in
place (as fallback).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15902 a95241bf-73f2-0310-859d-f6bbb57e9c96
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
* 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
* 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
partly, fDisplayBitmap is not correctly re-established...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15887 a95241bf-73f2-0310-859d-f6bbb57e9c96
(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
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
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
* 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
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
(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
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
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
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