Commit Graph

30620 Commits

Author SHA1 Message Date
Ingo Weinhold
af31cb589c Added comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-05 02:31:00 +00:00
Michael Lotz
ee280b59e9 Prevent the user TLB invalidation function from being preempted by turning off
interrupts when invoking it. The user TLB invalidation function essentially only
reads and writes back control register 3 (cr3) which holds the physical address
of the current page directory. Still a preemption between the read and the write
can cause problems when the last thread of a team dies and therefore the team
is deleted. The context switch on preemption would decrement the refcount of the
object that holds the page directory. Then the team address space is deleted
causing the context switch returning to that thread to not re-acquire a
reference to the object. At that point the page directory as set in cr3 is the
one of the previously run thread (which is fine, as all share the kernel space
mappings we need). Now when the preempted thread continues though, it would
overwrite cr3 with the physical page directory address from before the context
switch still stored in eax, therefore setting the page directory to the one of
the dying thread that now doesn't have the corresponding reference. Further
progressing the thread would release the last reference causing the deletion
of the object and freeing of the, now active again, page directory. The memory
getting overwritten (by deadbeef) now completely corrupts the page directory
causing basically any memory access to fault, in the end resulting in a
triplefault. This should fix bug #3399.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-04 23:15:05 +00:00
Rene Gollent
c771baca29 Re-enable Vision gcc4 package (update has been posted to haiku-files).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-04 22:54:54 +00:00
François Revol
f676f30b36 Remove those antique misleading leftovers, the good ones are at headers/private/kernel/boot/images.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-04 18:50:08 +00:00
Axel Dörfler
50d73c508f * driverinstall now also depends on "default"
* Added install target using INSTALL_DIR variable.
* Made "clean" and "rmapp" targets whitespace friendly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-04 16:49:06 +00:00
Axel Dörfler
1bfa269951 * Made the default tool tip color a bit easier on the eye.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-04 16:43:37 +00:00
Axel Dörfler
1ef6dcaceb * Added support for TARGET_DIR.
* Now uses g++ instead of gcc for C++ files.
* Removed mwcc support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-04 16:34:30 +00:00
Stephan Aßmus
9be5fa8055 * Added small description to all OptionalPackages at the top.
* Replaced Pe GCC4 package with one that works again after the BToolTip
  addition.
* Disabled Firefox and Vision GCC4 packages for the time being, so that one
  at least gets a working hybrid installation.
* Added Clockwerk GCC2 and GCC4 packages. I also added it to the alpha
  release build profile, so that people testing the pre-alpha images have
  more easy access to it. I am not sure if it should stay there, since it may
  not be polished enough. Feedback welcome! :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32112 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-04 16:25:24 +00:00
Axel Dörfler
1e4b23dae2 * Added more vendor entries, thanks to Brecht again for digging up another
resource.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-04 14:35:10 +00:00
François Revol
f335531bbc Remove file map disk support by default, it's not used anyway, and we'll use layers for CD anyway. Doesn't spare that many bytes though...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32110 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-04 09:00:10 +00:00
Stephan Aßmus
def0e1edf6 Don't leak the MediaWriter instance.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-04 07:58:32 +00:00
Stephan Aßmus
037d052235 I have no idea how that ended up there... set the decoded audio format correctly
again. Should fix playback of any file where the ffmpeg plugin was responsible
for sound. (The symptoms were a crash into the debugger because of an unspecified
audio format...)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-04 07:21:22 +00:00
Stephan Aßmus
b785870101 Free the AVFifoBuffer data in the destructor...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 22:59:23 +00:00
Stephan Aßmus
6e567425c6 Now supports encoded audio. Added Dolby Digital (AC-3) encoding to test this.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 22:53:52 +00:00
Bruno G. Albuquerque
6ca5e0f9fa - Fix small typo.
Is it intentional that Horizontal Frequency is reported as being KHz while
Vertical Frequency is reported as being Hz?



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32104 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 21:54:14 +00:00
Stephan Aßmus
0c72a8aed4 * AVWriter::StreamCookie::~StreamCookie() incorrectly freed packet data that it
didn't own.
* We are supposed to open the AVCodecContext in the writer, even though we never
  use it. According to libav-users mailing list, this is necessary, since that
  will allocate and initialize some structures that are later needed in
  av_write_header(). How this is supposed to work for encoders that libavcodec
  does not support, or which we don't know how to map, I do not yet know. For
  now it doesn't matter and resolves the problem that audio tracks report the
  wrong stream duration.
* Some more improvements with regards to what information we need to fill out
  and which we don't.
* Use more sensible defaults for the stream bitrate, so that we get better
  quality video by default. This and other parameters can be calculated when
  we implement setting the quality.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 21:32:03 +00:00
François Revol
98977abc9b Fix m68k build, still unimplemented.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 21:17:03 +00:00
François Revol
af9475fd3d Initialize args.arguments on ARM too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 19:53:17 +00:00
Oliver Tappe
44145c7405 Fixed two more peculiarities in ListView:
* when items are removed, the anchor may need adjustment (fixes the problem
  in Beam reported by Stippi)
* the check for needed adjustment of fLastSelected in _Select(from, to, extend)
  was broken, as it needs to be independent of fFirstSelected - this fixes
  broken navigation after doing a select-all

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 19:46:00 +00:00
Ingo Weinhold
6a0a77e2fa Patch by Bryce Groff with small change by myself:
* Don't leak the driver settings handle.
* No need to get the "active" parameter in ValidateCreateChild() -- either
  way is fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32098 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 19:11:14 +00:00
Ingo Weinhold
5c5d43953c Patch by Bryce Groff: don't leak the driver settings handle.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32097 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 19:06:21 +00:00
Ingo Weinhold
fe05e6c359 Patch by Bryce Groff: Allow the disk system add-ons to return a NULL parameter
editor, when they don't have any additional parameters to edit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 19:05:38 +00:00
Ingo Weinhold
4199b36807 Patch by Bryce Groff: Correctly notify the user when committing the
modifications for deleting a partition failed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 19:02:51 +00:00
Ingo Weinhold
1d099cad03 Patch by Bryce Groff: Allow passing an ID of any partition contained in the
disk device to the locking functions, not only the ID of the disk device
itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32094 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 19:01:20 +00:00
Ingo Weinhold
5e243bb30e Patch by Bryce Groff: Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32093 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 18:58:21 +00:00
Jonas Sundström
2680698b6d Have the application do a single BAlert on a BApplication::QuitRequested()-event in multi-window situations. Move reading/writing of settings from window to application. Cascade-offset the most recent window when they collide.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32092 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 18:17:14 +00:00
François Revol
358e3e4e8b C89, should fix gcc2 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 18:10:45 +00:00
Oliver Tappe
9fe394010b small cleanup in ListView:
* avoid setting fAnchorIndex multiple times in certain situations

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 17:59:04 +00:00
François Revol
17a815e0ad Add pc_serial to the build. No, it's not yet usable in Haiku.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32089 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 17:30:18 +00:00
Stefano Ceccherini
36325c7fe5 Gcc4 fixes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32088 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 16:53:04 +00:00
Stefano Ceccherini
3bd4966700 Now also hide/show the cursor when BDirectWindow::SetFullScreen() is called.
in the handler, instead of checking if the window is an offscreen one,
check if fDirectWindowData is NULL, and do nothing if it's the case.
When setting a clip region in ServerPicture, also invalidate the clipping.
To do so, I added a public ServerWindoow::UpdateCurrentDrawingRegion()
which just calls the private function. Please review and see if it can
be done better. This fixes the problem with BPicture and the 
ConstrainClippingRegion() op (see ticket #1389)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 16:50:01 +00:00
François Revol
d594d16e24 Allow getting other safe mode settings than the default one, from command line.
Added a -s option to get the string value of the setting directly instead of interpreting it as bool.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 16:25:41 +00:00
François Revol
d25503d3db Fix Haiku build. WTF rename those anyway ???
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32085 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 16:16:45 +00:00
Axel Dörfler
0bd0875d59 * Build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32084 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 16:08:36 +00:00
François Revol
9f981a889b Fix a warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 16:03:03 +00:00
Axel Dörfler
af8f9c3135 * Added a tool tip for the monitor's capabilities.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 15:21:24 +00:00
François Revol
696e647c0f Implemented getting bootargs from OF. Untested.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 15:12:24 +00:00
Axel Dörfler
b9ee6b3700 * Changed text so that it's obvious those are supposed to be sticky.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32079 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 14:54:22 +00:00
Axel Dörfler
8318af01b9 * Added a basic tool tip API, and implementation.
* The BView API can probably be regarded as good enough; the implementation
  might need to be improved over time (also, some things as archivability
  aren't fully implemented yet). The ToolTip.h header should get public once
  finalized.
* Added new B_MOUSE_IDLE message that is sent to a BView after a certain
  time has passed (BToolTipManager::ShowDelay()).
* Added small test app (ToolTipTest) that shows what is already working.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 14:47:41 +00:00
Axel Dörfler
360495a3bf * Only use the new preferred computation method if word wrap is disabled, or
else this won't work as is (this is something that could be done, better,
  though).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 14:41:27 +00:00
François Revol
56c6c0fefb - introduced an "argumetns" field in stage2_args to hold command line args from chaining loader,
- added some multiboot support code:
	- dump some of the passed info,
	- parse command line (skip the 'kernel' name and pass the rest to stage2_args.arguments),
- added an add_stage2_driver_settings() function which takes stage2_args.arguments and translates it into safe mode driver settings, a bit dumb for now.
This allows using qemu -kernel haiku_loader -append 'debug_screen true' and get debug output without having to enter the menu (once multiboot info is used to determine the boot device too).
The idea is to allow passing driver settings and using them to pass extra stuff (like 'force_keymap fr' and other stuff for demo), and to help automate tests ('run_test /bin/sometest').
This should answer Axel's question :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 14:39:41 +00:00
Axel Dörfler
0b1db200df * The preferred size is now actually the preferred size - the size that is
needed to show all of the text view's contents. No idea what the previous
  solution was about.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 14:35:27 +00:00
Michael Lotz
255c9104e5 * Rework the heap locking strategy. Use a read-write lock for the area lock to
allow for more parallelism. Also introduce seperate locks for the bins and
  for page allocation. This greatly reduces lock contention and reduces the
  duration the locks are held due to them overall protecting less code. Now only
  allocations of the same size hitting the same allocator or allocating larger
  chunks of memory should block. Previously, basically any allocation and also
  free would be mutually exclusive, making it scale pretty badely.
* Added memalign_nogrow(). As it uses heap_memalign() anyway, there's no real
  reason not to allow for an alignment.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 13:59:45 +00:00
Ingo Weinhold
ea2abd110b * Renamed the ROUNDOWN macro to ROUNDDOWN. Also changed the implementation of
ROUNDUP to use '*' and '/' -- the compiler will optimize that for powers of
  two anyway and this implementation works for other numbers as well.
* The thread::fault_handler use in C[++] code was broken with gcc 4. At least
  when other functions were invoked. Trying to trick the compiler wasn't a
  particularly good idea anyway, since the next compiler version could break
  the trick again. So the general policy is to use the fault handlers only in
  assembly code where we have full control. Changed that for x86 (save for the
  vm86 mode, which has a similar mechanism), but not for the other
  architectures.
* Introduced fault_handler, fault_handler_stack_pointer, and fault_jump_buffer
  fields in the cpu_ent structure, which must be used instead of
  thread::fault_handler in the kernel debugger. Consequently user_memcpy() must
  not be used in the kernel debugger either. Introduced a debug_memcpy()
  instead.
* Introduced debug_call_with_fault_handler() function which calls a function
  in a setjmp() and fault handler context. The architecture specific backend
  arch_debug_call_with_fault_handler() has only been implemented for x86 yet.
* Introduced debug_is_kernel_memory_accessible() for use in the kernel
  debugger. It determines whether a range of memory can be accessed in the
  way specified. The architecture specific back end
  arch_vm_translation_map_is_kernel_page_accessible() has only been implemented
  for x86 yet.
* Added arch_debug_unset_current_thread() (only implemented for x86) to unset
  the current thread pointer in the kernel debugger. When entering the kernel
  debugger we do some basic sanity checks of the currently set thread structure
  and unset it, if they fail. This allows certain commands (most importantly
  the stack trace command) to avoid accessing the thread structure.
* x86: When handling a double fault, we do now install a special handler for
  page faults. This allows us to gracefully catch faulting commands, even if
  e.g. the thread structure is toast.

We are now in much better shape to deal with double faults. Hopefully avoiding
the triple faults that some people have been experiencing on their hardware
and ideally even allowing to use the kernel debugger normally.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 12:39:56 +00:00
Ingo Weinhold
16357dea6b Don't lock when the debugger is running.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 11:54:25 +00:00
Ingo Weinhold
885b7b4a85 Removed unsupported architectures.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 11:32:08 +00:00
Alexandre Deckner
3d65021d98 * Style fixes
* Moved the wait_for_thread in _StopRenderThread()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 10:55:13 +00:00
Stephan Aßmus
1c992a5285 Fixed GCC4 build and added handling of allocation failures in
some places.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 10:33:52 +00:00
François Revol
4b8d0e6856 Some ppc fixes for #4115, patch by kallisti5 (without the #ifdef _BOOT_MODE):
- stubbed out arch_cpu_init_percpu(),
- make atomic ops declarations extern "C",
- move calls to [i]sync inside the asm code that needs it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 10:10:22 +00:00
Axel Dörfler
b25988572f * Fixed style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 10:04:43 +00:00