Commit Graph

1979 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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 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
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
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
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
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 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
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
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 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
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
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
Axel Dörfler e83820ed57 Merged app_server_new_clipping branch changes r15290 to 15418 back into trunk.
Also fixed Jamfile for the test environment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15419 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-08 12:41:19 +00:00
Ingo Weinhold c729b01278 The <arch_config.h> header is needed in <syscalls.h>, since we're using
the atomic functions related macros.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-07 23:11:02 +00:00
Stefano Ceccherini a410e190a4 Added rect_contains()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-03 14:12:10 +00:00
Axel Dörfler c072e9f1f5 * BWindow::AddToSubset()/RemoveFromSubset() no longer send their team ID; this
is known by the server, anyway.
* B_MODAL_SUBSET_WINDOW_FEEL now also works as expected.
* Renamed AS_REM_FROM_SUBSET to AS_REMOVE_FROM_SUBSET.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-02 16:07:02 +00:00
Axel Dörfler 85f8bb71c7 * You can now change the look of a window on the fly.
* renamed some Decorator functions like GetLook() to Look().
* renamed _look to fLook and _flags to fFlags.
* removed the feel from decorators - they don't need to know
  or care about the feel.
* the DefaultDecorator didn't allow resizing of modal windows.
* DefaultDecorator::SetTitle() no longer clears the passed
  in updateRegion, it just fills it (so that you can call
  more than one of these methods after the other, and still
  get a correct update region).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-01 14:56:01 +00:00