History log of /haiku-fatelf/src/system/kernel/elf.cpp
Revision Date Author Comments
# d1f280c8 01-Apr-2012 Hamish Morrison <hamishm53@gmail.com>

Add support for pthread_attr_get/setguardsize()

* Added the aforementioned functions.
* create_area_etc() now takes a guard size parameter.
* The thread_info::stack_base/end range now refers to the usable range
only.


# 39039a4b 26-Nov-2012 Landon Fuller <landonf@plausible.coop>

Minor cleanup; remove unnecessary duplicate call to verify_eheader()


# 60dcdd13 25-Nov-2012 Landon Fuller <landonf@plausible.coop>

Minor API cleanup for elf_find_* APIs.


# 785f1975 25-Nov-2012 Landon Fuller <landonf@plausible.coop>

Minor style fixes


# 798f97cb 25-Nov-2012 Landon Fuller <landonf@plausible.coop>

Use new arch_elf_arch_compat() API to find compatible runtime_loader.


# 416b2b7e 25-Nov-2012 Landon Fuller <landonf@plausible.coop>

Minor arch_elf API improvements

- Renamed arch_elf_score_abi_ident
- Added arch_elf_arch_compat for verifying architecture compatibility between two modules.


# abb1201d 25-Nov-2012 Landon Fuller <landonf@plausible.coop>

Remove the FATELF_MATCH_ defines from the public fatelf header.


# cbbca595 25-Nov-2012 Landon Fuller <landonf@plausible.coop>

Clean up the multiple methods of describing an ELF binary arch.


# f8616ecb 24-Nov-2012 Landon Fuller <landonf@plausible.coop>

Minor code cleanup.

Removed invalid #includes automatically added by NetBeans.


# 7313aafd 24-Nov-2012 Landon Fuller <landonf@plausible.coop>

Add support for loading FatELF kernel add-ons


# 5bb6f68d 24-Nov-2012 Landon Fuller <landonf@plausible.coop>

Fix fd position assumption in FatELF parsing.

This prevented execution of a fat runtime_loader, and was a
remnant of my confusion regarding the position statefulness of
_kern_read().

With this fix in place, a FatELF runtime_loader works as expected.


# bc59d500 23-Nov-2012 Landon Fuller <landonf@plausible.coop>

Fix incorrect assumptions regarding fd position.

I'd mistakenly assumed that the _kern*() APIs accepted an offset from
the current fd position, rather than an absolute position.


# 0e476e50 22-Nov-2012 Landon Fuller <landonf@plausible.coop>

Implement an experimental fix for cwd handling

This could use the eyes of someone more familiar with the kernel and
coding style.


# f30ea778 22-Nov-2012 Landon Fuller <landonf@plausible.coop>

Add kernel-level FatELF user image loading.

Additional work is required to correctly handle relative paths, symbol lookup
in userspace binaries, and kernel-level loading of FatELF kernel
add-ons.


# aa27d663 21-Nov-2012 Landon Fuller <landonf@plausible.coop>

Fix handling of non-fat files.

In the case where a file had no fat header, the implementation would not
return the non-fat ELF data as a match.


# c3338d91 21-Nov-2012 Landon Fuller <landonf@plausible.coop>

Implement elf_find_best_fat_arch()

Uses the scoring ABI to find the preferred ELF data.


# 8a190335 07-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Implemented user debugging support for x86_64.

Reused x86 arch_user_debugger.cpp, with a few minor changes to make
the code work for both 32 and 64 bit. Something isn't quite working
right, if a breakpoint is hit the kernel will hang. Other than that
everything appears to work correctly.


# f4294645 05-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

User symbol lookup works now on x86_64.


# 59ae45c1 21-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Fixed commpage for x86_64.

Since the commpage is at a kernel address, changed 64-bit paging code
to match x86's behaviour of allowing user-accessible mappings to be
created in the kernel portion of the address space. This is also
required by some drivers.


# 0cbce9aa 18-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

A few 64-bit fixes for ELF/module code.


# c3f0fd28 12-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Fixed formatting of output in some debugger commands.

Currently all debugger commands assume 32-bit pointers when formatting their
output. This means that on x86_64 the output is incorrectly formatted. Fixed
this by adding a B_PRINTF_POINTER_WIDTH definition (16 on 64-bit, 8 on
32-bit), and using this to correctly format the output. Not all commands have
been fixed yet, but all VM, slab, VFS, team, thread and image commands should
be correct.


# 3b802628 09-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Support ELF64 in the kernel.

This has been done by adding typedefs in elf_common.h to the correct ELF
structures for the architecture, and changing all Elf32_* uses to those
types. I don't know whether image loading works as I cannot test it yet,
there may be some 64-bit safety issues around. However, symbol lookup for
the kernel is working correctly.


# f1244978 22-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Added an ELF64 version of preloaded_image.

* There is now 2 structures, preloaded_elf32_image and preloaded_elf64_image,
which both inherit from preloaded_image.
* For now I've just hardcoded in use of preloaded_elf32_image, but the
bootloader ELF code will shortly be converted to use templates which use
the appropriate structure. The kernel will be changed later when I add
ELF64 support to it.
* All kernel_args data is now compatible between 32-bit and 64-bit kernels.


# 0e88a887 13-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

First round of 64-bit safety fixes in the kernel.

* Most of this is incorrect printf format strings. Changed all strings
causing errors to use the B_PRI* format string definitions, which
means the strings should be correct across all platforms.
* Some other fixes for errors, casts required, etc.


# d817520f 29-Oct-2011 Axel Dörfler <axeld@pinc-software.de>

* Removed some dead code by applying a patch by lucian from ticket #6275,
thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42970 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 24df6592 11-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged signals-merge branch into trunk with the following changes:
* Reorganized the kernel locking related to threads and teams.
* We now discriminate correctly between process and thread signals. Signal
handlers have been moved to teams. Fixes #5679.
* Implemented real-time signal support, including signal queuing, SA_SIGINFO
support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition
of the real-time signal range. Closes #1935 and #2695.
* Gave SIGBUS a separate signal number. Fixes #6704.
* Implemented <time.h> clock and timer support, and fixed/completed alarm() and
[set]itimer(). Closes #5682.
* Implemented support for thread cancellation. Closes #5686.
* Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554.
* Lots over smaller more or less related changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4535495d 10-Jan-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged the signals branch into trunk, with these changes:
* The team and thread kernel structures have been renamed to Team and Thread
respectively and moved into the new BKernel namespace.
* Several (kernel add-on) sources have been converted from C to C++ since
private kernel headers are included that are no longer C compatible.

Changes after merging:
* Fixed gcc 2 build (warnings mainly in the scary firewire bus manager).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0068f3c8 03-Jan-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed uint32 underflow in backwards loop (CID 2601).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40095 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c07db2ec 26-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* elf_find_symbol(): Skip undefined symbols and symbols with the wrong binding.
* Implemented missing handling of symbolically linked images and of weak
symbols.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39646 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25dc253d 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 55748110 14-Aug-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

CID 1653. symbolTable could be leaked in certain error cases.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38116 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f75e014c 06-Jul-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Lucian Adrian Grijincu: Added support for loading kernel modules
with only a single readable/writable/executable text+data segment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37415 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4d7859f0 06-Jul-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

elf_resolve_symbol(): If a weak undefined symbol could not be resolved,
return 0 as its address.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37412 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 45bd7bb3 25-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed unnecessary inclusions of <boot/kernel_args.h> in private kernel
headers and respectively added includes in source files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37259 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a8ad734f 14-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced structures {virtual,physical}_address_restrictions, which specify
restrictions for virtual/physical addresses.
* vm_page_allocate_page_run():
- Fixed conversion of base/limit to array indexes. sPhysicalPageOffset was not
taken into account.
- Takes a physical_address_restrictions instead of base/limit and also
supports alignment and boundary restrictions, now.
* map_backing_store(), VM[User,Kernel]AddressSpace::InsertArea()/
ReserveAddressRange() take a virtual_address_restrictions parameter, now. They
also support an alignment independent from the range size.
* create_area_etc(), vm_create_anonymous_area(): Take
{virtual,physical}_address_restrictions parameters, now.
* Removed no longer needed B_PHYSICAL_BASE_ADDRESS.
* DMAResources:
- Fixed potential overflows of uint32 when initializing from device node
attributes.
- Fixed bounce buffer creation TODOs: By using create_area_etc() with the
new restrictions parameters we can directly support physical high address,
boundary, and alignment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37131 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c3676b54 13-Apr-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added vm_debug_copy_page_memory() which copies memory from a potentially not
mapped page.
* debug_{mem,strl}cpy():
- Added "team" parameter for specifying the address space the address are
to be interpreted in.
- When the standard memcpy() (with fault handler) fails, fall back to
vm_debug_copy_page_memory().
* Added debug_is_debugged_team(): Predicate returning true, if the supplied
team_id refers to the same team debug_get_debugged_thread() belongs to.
* Added DebuggedThreadSetter class for scope-based debug_set_debugged_thread().
Made use of it in several debugger functions.
* print_demangled_call() (x86): Fixed unsafe memory access.

Allows KDL stack traces to work correctly again, even if the page daemon has
already unmapped the concerned pages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36230 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cee04e80 08-Feb-2010 Artur Wyszynski <aljen-mlists@o2.pl>

Fixed various errors/warnings reported by cppcheck:
* memory leaks
* resource leaks
* added const's to getters
* removed a few reundant conditions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35433 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38a97b2c 04-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved all knowledge of reserved areas from vm.cpp to VMAddressSpace. It's a
pure address space feature, so it should be handled there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34491 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bbd97b4b 03-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Made the VMArea fields base and size private and added accessors instead.
This makes it more explicit where the fields are modified.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34464 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 35d94001 02-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Changed the address space area list to doubly linked. The reason is to
simplify migration of the area management, but as a side effect, it also
makes area deletion O(1) (instead of O(n), n == number of areas in the
address space).
* Moved more area management functionality from vm.cpp to VMAddressSpace and
VMArea structure creation to VMArea. Made the list and list link members
itself private.
* VMAddressSpace tracks its amount of free space, now. This also replaces
the previous mechanism to do that only for the kernel address space. It
was broken anyway, since delete_area() subtracted the area size instead of
adding it.
* vm_free_unused_boot_loader_range():
- lastEnd could be set to a value < start, which could cause memory
outside of the given range to be unmapped. Haven't checked whether this
could happen in practice -- if so, it would be seriously unhealthy.
- The range between the end of the last area in the range and the end of
the range would never be freed.
- Fixed potential integer overflows when computing addresses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34459 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f34a1dd5 02-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Created VMArea.{h,cpp} and moved VMArea and the global area hash table (new
class VMAreaHash) there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34450 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e50cf876 02-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved the VM headers into subdirectory vm/.
* Renamed vm_cache.h/vm_address_space.h to VMCache.h/VMAddressSpace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34449 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 90d870c1 02-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved VMAddressSpace definition to vm_address_space.h.
* "Classified" VMAddressSpace, i.e. turned the vm_address_space_*() functions
into methods, made all attributes (but "areas") private, and added
accessors.
* Also turned the vm.cpp functions vm_area_lookup() and
remove_area_from_address_space() into VMAddressSpace methods. The rest of
the area management functionality will follow soon.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34447 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a99eb6b5 01-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

vm_area -> VMArea


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34423 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e0aad96f 22-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Allow to use symbols as variables (prefixed with '@'). Now only tab completion
for variable names is missing B-}


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33723 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c51d6579 30-Sep-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed incorrect uses of user_{strl,mem}cpy() in the kernel debugger. This could
break stack traces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33381 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ea2abd11 02-Aug-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* 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


# d3b44ccb 29-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added explicit physical address parameter to vm_create_anonymous_area() and
create_area_etc(). 0 for the default behavior.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31941 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82db8a9e 19-Jun-2009 Axel Dörfler <axeld@pinc-software.de>

* Added an "unmapAddressRange" argument to the file mapping syscall. This is
the first part of making the runtime loader behave itself; it should already
make Clockwerk run okay with any number of translators (even if not all of
them will work yet).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31113 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f2d4d6f6 24-May-2009 Michael Lotz <mmlr@mlotz.ch>

Invalidate the elfHeader variable when the image struct is deleted on error, as
they share the same pointer. Should fix bug #3955.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30848 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9bf61a0e 21-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added GNU style ELF symbol versioning support in the kernel, too.
* Fixed memory leak in insert_preloaded_image() in error case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30820 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6a1e04b1 13-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Symbol resolution functions in the kernel: Removed the unused parameter
allowing optional prepending of a string to the symbol names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30750 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 593ee7bb 12-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Extended image_info by fields for the Haiku version and ABI. The runtime loader
and the kernel read those values from the shared object (if available). In the
runtime loader this should eventually replace the gcc version guessing method
currently used (at least for shared objects built for Haiku). The optional
packages need to be rebuilt first, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30729 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b36c8ba2 08-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added elf_get_kernel_image() returning the image for the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30036 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4acbaafd 25-Mar-2009 Jérôme Duval <korli@users.berlios.de>

* added help for image KDL command


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29710 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c33667d4 01-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Fixing warnings under GCC4 in preparation to enable -Werror there as well:
* Replaced the use of offsetof() for structs that aren't PODs. Add a
offset_of_member() macro to util/khash.h because that's what it's used for
in our cases.
* Change the signature of add_debugger_command()/remove_debugger_command() on
GCC > 2 to avoid the depricated conversion from string constants to char *.
* Adding some "suggested" parenthesis. I know that not everyone likes that, but
it pointed out at least one bug that is fixed here as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29113 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e6e76e14 11-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* elf_find_symbol() now checks if the hashtable section is greater than 0.
* Whatever is the cause of #2733, this should at least not make it crash.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28615 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b50e6202 02-Oct-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed various warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27841 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 99409ebb 28-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Generate a debug event for a loaded user image. When a debugged team
exec*()ed, the debugger never got notified that a runtime loader image
was created.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27773 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fec47a57 24-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added functions elf_create_memory_image() and
elf_add_memory_image_symbol(). The former creates and registers a new
image that has not been loaded from a file. The latter adds a symbol to
its symbol table. This is mainly a debug feature, allowing to name code
or data in memory regions that aren't associated with loaded ELF
objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27721 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 52d0d5e5 23-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

elf_load_user_image() does now register the loaded image. That is every
team does have a runtime loader image. The "profile" tool can thus
translate addresses in the runtime loader correctly.
Note that this change will break code that assumes that the application
image is the first image returned by get_next_image_info().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27715 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8839d592 22-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added syscall _kern_read_kernel_image_symbols() for reading a kernel
image's symbol and string tables.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27687 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dd1c278d 03-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added elf_get_image_info_for_address() to get an image info for a kernel
image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27300 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 98241371 22-Aug-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Improved the "ls" command:
* It can now also lookup userland symbols.
* By respecting the currently debugged thread it smoothly cooperates
with the "in_context" command. IOW it can lookup symbols in any team.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27167 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1e906305 21-Aug-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added a "flags" parameter to vm_create_anonymous_area() and
create_area_etc().
* When the new flag CREATE_AREA_DONT_WAIT is specified, the functions
don't wait for memory or pages to become available. They fail
immediately instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27117 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4a40451d 20-Aug-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

The "symbol" command does now set its return value to the symbol
address, so it can be used in expressions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27098 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 70ce6a9a 02-Aug-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Don't allow the kernel team to be passed to
elf_debug_lookup_user_symbol_address().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26747 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c99d639 22-Jul-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged branch haiku/branches/developer/bonefish/vm into trunk. This
introduces the following relevant changes:
* VMCache:
- Renamed vm_cache to VMCache, merged it with vm_store and made it a
C++ class with virtual methods (replacing the store operations).
Turned the different store implementations into subclasses.
- Introduced MergeStore() callback, changed semantics of Commit().
- Changed locking and referencing semantics. A reference can only be
acquired/released with the cache locked. An unreferenced cache is
deleted and a mergeable cache merged when it is unlocked. This
removes the "busy" state of a cache and simplifies the page fault
code.
* Added VMAnonymousCache, which will implement swap support (work by
Zhao Shuai). It is not integrated and used yet, though.
* Enabled the mutex/recursive lock holder asserts.
* Fixed DoublyLinkedList::Swap().
* Generalized the low memory handler to a low resource handler. And made
semaphores and reserved memory handled resources. Made
vm_try_resource_memory() optionally wait (with timeout), and used that
feature to reserve memory for areas.
...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26572 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 467acc16 22-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Cleanup, no functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26568 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 736352dc 16-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Added [un]lock_memory_etc() versions that accept a team_id as first argument.
This allows drivers to lock the memory outside of the original team context.
* create_area_etc() got a struct team as first argument, but that should have
been a team_id.
* Removed delete_area_etc() - there is already vm_delete_area() doing the same
thing.
* Renamed vm_get_address_space_by_id() to vm_get_address_space(), as there is
no other method of getting an address space.
* Removed erroneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26455 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fa0a5cd0 09-Jul-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

insert_preloaded_image() now copies the debug symbols and string table
over to the kernel heap. This allows us to simply free them in
unload_elf_image(). Now we no longer leak the memory for non-preloaded
images. On my T61 this amounted to more than 10 MB of kernel heap after
booting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26343 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1d7044e 08-Jul-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added TODO regarding memory leak. Too tired ATM to solve it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26335 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f5b3a6a7 05-Jun-2008 Michael Lotz <mmlr@mlotz.ch>

* Initialize all static mutexes in the kernel through a MUTEX_INITIALIZER()
and remove the then unneeded mutex_init() for them.
* Remove the workaround for allowing uninitialized mutexes on kernel startup.
As they are all initialized statically through the MUTEX_INITIALIZER() now
this is not needed anymore.
* An uninitialized mutex will now cause a panic when used to find possibly
remaining cases.
* Remove now unnecessary driver_settings_init_post_sem() function.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25812 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3cf7ecd1 13-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added <sys/mman.h> header. It declares only mmap() and munmap() yet
and defines the macros needed by them.
* Renamed syscall sys_vm_map_file() to _kern_map_file() and changed the
path to an FD parameter. Changed vm_map_file() accordingly and
adjusted the kernel ELF loader and the runtime loader.
* Added syscall _kern_unmap_memory().
* Added bool unmapAddressRange parameter to vm_create_anonymous_area()
and map_backing_store(). If true and the address specification is
B_EXACT_ADDRESS, all areas in the specified address range will be
deleted (unless an area is covered only partially).
* Introduced B_SHARED_AREA flag, which is set on areas that have been
created by {vm,_user}_map_file() with REGION_NO_PRIVATE_MAP. When
fork()ing those areas won't be copied CoW, but rather be cloned. This
is needed for mmap() MAP_SHARED.
* {vm,_user}_map_file() also accept an FD argument < 0, in which case an
anonymous area is created.
* Implemented mmap() and munmap(). Currently there's the restriction
that we can't partially unmap areas. Otherwise the functions should be
rather compliant. We also support the non-POSIX extension
MAP_ANONYMOUS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24964 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5dafcc2b 26-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Added new "symbol" command which is able to search for a symbol that
matches the specified pattern in all loaded kernel images.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24592 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 890c615a 03-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* unload_elf_image() never unloaded any image because the ref_count
check was wrong (never gets below zero if everything goes as
intended).
* Removed erroneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24232 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d4d25a55 18-Feb-2008 Michael Lotz <mmlr@mlotz.ch>

We should lock around register_elf_image() as we modify the image hash in there.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24010 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7bb85c7b 31-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Clarifying comment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23806 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2477bce5 19-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added support for userland symbol lookup in "sc" and "call". Having
used it for an hour or so, I really wonder how we could live without it.
:-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23640 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4063db92 06-Jan-2008 Axel Dörfler <axeld@pinc-software.de>

* elf_resolve_symbol() no longer copies the symbol name if symbolPrepend is
NULL (it's not used anywhere yet, anyway).
* Fixed warning when compiling with tracing turned on.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23267 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a0b6b9b9 04-Jan-2008 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23241 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 80f54692 06-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* struct vnode is an opaque type now, removed void* where it was used incorrectly.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22461 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c4ed86b 27-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

* Moved some definitions from vm_types.h that functions in vm.h need as
arguments into vm.h.
* This should fix the broken build from earlier - thanks Stefano for the note!
* That also allowed to clean some other includes a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22331 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e6dc7903 26-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

* vm.h no longer includes vm_types.h - only those that actually need access
to the private VM types are including vm_types.h now.
* Removed vm_page, vm_area, vm_cache, and vm_address_space typedefs; it's
cleaner this way, and the actual types are only used in C++ files now,
anyway.
* And that caused changes in many files...
* Made commpage.h self-containing.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22329 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e442c70 31-Mar-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Reversed locking order of sImageLoadMutex and sImageMutex in
unload_kernel_add_on(). The former one could lead to deadlocks with
load_kernel_add_on() (e.g. occasionally the boot process would hang).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20485 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0ad660a1 02-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

Remap all preloaded executables read-only and executable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19180 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7d2fafca 26-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Forgot even more debug output...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16882 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61106f7e 26-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Forgot to remove some debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16881 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c14a34a6 26-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Improved kernel ELF loader (and made it more similar to the one from the boot
loader): it now supports holes between segments, and accepts any segment order.
* Renamed elf.c to elf.cpp and fixed warnings.
* Renamed elf_image_info::dynamic_ptr and eheader to dynamic_section and elf_header.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 39039a4b8339bfca7e6dc263fa065c5878f62341 26-Nov-2012 Landon Fuller <landonf@plausible.coop>

Minor cleanup; remove unnecessary duplicate call to verify_eheader()


# 60dcdd1339759f12fb892dddda6db177bde891cc 25-Nov-2012 Landon Fuller <landonf@plausible.coop>

Minor API cleanup for elf_find_* APIs.


# 785f1975dfd4966f180c36a9c6a38efda9933a73 25-Nov-2012 Landon Fuller <landonf@plausible.coop>

Minor style fixes


# 798f97cb59bf9475f41c359992bc238872fa4427 25-Nov-2012 Landon Fuller <landonf@plausible.coop>

Use new arch_elf_arch_compat() API to find compatible runtime_loader.


# 416b2b7e7ba36e17a0c2841b0de5a52f6c17cf36 25-Nov-2012 Landon Fuller <landonf@plausible.coop>

Minor arch_elf API improvements

- Renamed arch_elf_score_abi_ident
- Added arch_elf_arch_compat for verifying architecture compatibility between two modules.


# abb1201d294cc5fdb0b29696d89100dc5f29a279 25-Nov-2012 Landon Fuller <landonf@plausible.coop>

Remove the FATELF_MATCH_ defines from the public fatelf header.


# cbbca595b2d6bc8aea824f072765880571637e51 25-Nov-2012 Landon Fuller <landonf@plausible.coop>

Clean up the multiple methods of describing an ELF binary arch.


# f8616ecb923c8f13a360152087432d9662fb1b4c 24-Nov-2012 Landon Fuller <landonf@plausible.coop>

Minor code cleanup.

Removed invalid #includes automatically added by NetBeans.


# 7313aafdde593582f96ebe5b304941fac47e1a77 24-Nov-2012 Landon Fuller <landonf@plausible.coop>

Add support for loading FatELF kernel add-ons


# 5bb6f68d0be3938623d4257591c2c6b25ac934f1 24-Nov-2012 Landon Fuller <landonf@plausible.coop>

Fix fd position assumption in FatELF parsing.

This prevented execution of a fat runtime_loader, and was a
remnant of my confusion regarding the position statefulness of
_kern_read().

With this fix in place, a FatELF runtime_loader works as expected.


# bc59d500bed076d2823c8ff48ab49e3db9d79d24 23-Nov-2012 Landon Fuller <landonf@plausible.coop>

Fix incorrect assumptions regarding fd position.

I'd mistakenly assumed that the _kern*() APIs accepted an offset from
the current fd position, rather than an absolute position.


# 0e476e50dde8bf8b34b45a4b5a9a0569f5daf371 22-Nov-2012 Landon Fuller <landonf@plausible.coop>

Implement an experimental fix for cwd handling

This could use the eyes of someone more familiar with the kernel and
coding style.


# f30ea778102367f17fb2df2b1b340242763719ff 22-Nov-2012 Landon Fuller <landonf@plausible.coop>

Add kernel-level FatELF user image loading.

Additional work is required to correctly handle relative paths, symbol lookup
in userspace binaries, and kernel-level loading of FatELF kernel
add-ons.


# aa27d66320a0279fb82ab593379a53bcdbb17d3f 21-Nov-2012 Landon Fuller <landonf@plausible.coop>

Fix handling of non-fat files.

In the case where a file had no fat header, the implementation would not
return the non-fat ELF data as a match.


# c3338d918c8e00f2871893930c9804ca174848c6 21-Nov-2012 Landon Fuller <landonf@plausible.coop>

Implement elf_find_best_fat_arch()

Uses the scoring ABI to find the preferred ELF data.


# 8a1903353eedd95266c7241aada3a314c5d35a55 07-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Implemented user debugging support for x86_64.

Reused x86 arch_user_debugger.cpp, with a few minor changes to make
the code work for both 32 and 64 bit. Something isn't quite working
right, if a breakpoint is hit the kernel will hang. Other than that
everything appears to work correctly.


# f4294645358d2eeec007d93493f092581e9bb504 05-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

User symbol lookup works now on x86_64.


# 59ae45c1ab32476f1fa428dae22989f8387a1f9e 21-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Fixed commpage for x86_64.

Since the commpage is at a kernel address, changed 64-bit paging code
to match x86's behaviour of allowing user-accessible mappings to be
created in the kernel portion of the address space. This is also
required by some drivers.


# 0cbce9aa4732e96acd9d593cb86ca0847a61d051 18-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

A few 64-bit fixes for ELF/module code.


# c3f0fd28cda13d70a8c092003609442e4e29cf78 12-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Fixed formatting of output in some debugger commands.

Currently all debugger commands assume 32-bit pointers when formatting their
output. This means that on x86_64 the output is incorrectly formatted. Fixed
this by adding a B_PRINTF_POINTER_WIDTH definition (16 on 64-bit, 8 on
32-bit), and using this to correctly format the output. Not all commands have
been fixed yet, but all VM, slab, VFS, team, thread and image commands should
be correct.


# 3b802628b8e2aa14eb4c674d0a8cf900f522baa1 09-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Support ELF64 in the kernel.

This has been done by adding typedefs in elf_common.h to the correct ELF
structures for the architecture, and changing all Elf32_* uses to those
types. I don't know whether image loading works as I cannot test it yet,
there may be some 64-bit safety issues around. However, symbol lookup for
the kernel is working correctly.


# f1244978152350f9cc010e766d09c2e9ad34dfce 22-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Added an ELF64 version of preloaded_image.

* There is now 2 structures, preloaded_elf32_image and preloaded_elf64_image,
which both inherit from preloaded_image.
* For now I've just hardcoded in use of preloaded_elf32_image, but the
bootloader ELF code will shortly be converted to use templates which use
the appropriate structure. The kernel will be changed later when I add
ELF64 support to it.
* All kernel_args data is now compatible between 32-bit and 64-bit kernels.


# 0e88a887b4a9ecaaf1062078d9ca9bfca78fcf3a 13-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

First round of 64-bit safety fixes in the kernel.

* Most of this is incorrect printf format strings. Changed all strings
causing errors to use the B_PRI* format string definitions, which
means the strings should be correct across all platforms.
* Some other fixes for errors, casts required, etc.


# d817520f9870f68166cbc49d0e629c681229a751 29-Oct-2011 Axel Dörfler <axeld@pinc-software.de>

* Removed some dead code by applying a patch by lucian from ticket #6275,
thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42970 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 24df65921befcd0ad0c5c7866118f922da61cb96 11-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged signals-merge branch into trunk with the following changes:
* Reorganized the kernel locking related to threads and teams.
* We now discriminate correctly between process and thread signals. Signal
handlers have been moved to teams. Fixes #5679.
* Implemented real-time signal support, including signal queuing, SA_SIGINFO
support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition
of the real-time signal range. Closes #1935 and #2695.
* Gave SIGBUS a separate signal number. Fixes #6704.
* Implemented <time.h> clock and timer support, and fixed/completed alarm() and
[set]itimer(). Closes #5682.
* Implemented support for thread cancellation. Closes #5686.
* Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554.
* Lots over smaller more or less related changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4535495d80c86e19e2610e7444a4fcefe3e0f8e6 10-Jan-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged the signals branch into trunk, with these changes:
* The team and thread kernel structures have been renamed to Team and Thread
respectively and moved into the new BKernel namespace.
* Several (kernel add-on) sources have been converted from C to C++ since
private kernel headers are included that are no longer C compatible.

Changes after merging:
* Fixed gcc 2 build (warnings mainly in the scary firewire bus manager).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0068f3c8104e65bea370767aad4b81d79b24822b 03-Jan-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed uint32 underflow in backwards loop (CID 2601).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40095 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c07db2ec3f246a20402116d8ac23a8d2f43039e6 26-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* elf_find_symbol(): Skip undefined symbols and symbols with the wrong binding.
* Implemented missing handling of symbolically linked images and of weak
symbols.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39646 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25dc253d6ab28ce204fa4de2d3e7a27d167fc817 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 557481100897b13934d01937a2262c8558507428 14-Aug-2010 Stefano Ceccherini <stefano.ceccherini@gmail.com>

CID 1653. symbolTable could be leaked in certain error cases.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38116 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f75e014cb8f1d8de3a86cd3d8db2a2816d0acd62 06-Jul-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Lucian Adrian Grijincu: Added support for loading kernel modules
with only a single readable/writable/executable text+data segment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37415 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4d7859f03165e18a791d65b15d3f4cbf7a08a79b 06-Jul-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

elf_resolve_symbol(): If a weak undefined symbol could not be resolved,
return 0 as its address.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37412 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 45bd7bb3db9d9e4dcb02b89a3e7c2bf382c0a88c 25-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed unnecessary inclusions of <boot/kernel_args.h> in private kernel
headers and respectively added includes in source files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37259 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a8ad734f1c698917badb15e1641e0f38b3e9a013 14-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced structures {virtual,physical}_address_restrictions, which specify
restrictions for virtual/physical addresses.
* vm_page_allocate_page_run():
- Fixed conversion of base/limit to array indexes. sPhysicalPageOffset was not
taken into account.
- Takes a physical_address_restrictions instead of base/limit and also
supports alignment and boundary restrictions, now.
* map_backing_store(), VM[User,Kernel]AddressSpace::InsertArea()/
ReserveAddressRange() take a virtual_address_restrictions parameter, now. They
also support an alignment independent from the range size.
* create_area_etc(), vm_create_anonymous_area(): Take
{virtual,physical}_address_restrictions parameters, now.
* Removed no longer needed B_PHYSICAL_BASE_ADDRESS.
* DMAResources:
- Fixed potential overflows of uint32 when initializing from device node
attributes.
- Fixed bounce buffer creation TODOs: By using create_area_etc() with the
new restrictions parameters we can directly support physical high address,
boundary, and alignment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37131 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c3676b54bfd2e06b73646d1846b2ab0272cb96e2 13-Apr-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added vm_debug_copy_page_memory() which copies memory from a potentially not
mapped page.
* debug_{mem,strl}cpy():
- Added "team" parameter for specifying the address space the address are
to be interpreted in.
- When the standard memcpy() (with fault handler) fails, fall back to
vm_debug_copy_page_memory().
* Added debug_is_debugged_team(): Predicate returning true, if the supplied
team_id refers to the same team debug_get_debugged_thread() belongs to.
* Added DebuggedThreadSetter class for scope-based debug_set_debugged_thread().
Made use of it in several debugger functions.
* print_demangled_call() (x86): Fixed unsafe memory access.

Allows KDL stack traces to work correctly again, even if the page daemon has
already unmapped the concerned pages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36230 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cee04e8074ec61fd8c6dac3539c5b821c3618888 08-Feb-2010 Artur Wyszynski <aljen-mlists@o2.pl>

Fixed various errors/warnings reported by cppcheck:
* memory leaks
* resource leaks
* added const's to getters
* removed a few reundant conditions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35433 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38a97b2c36a42758a143aef034e0a3fc70440934 04-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved all knowledge of reserved areas from vm.cpp to VMAddressSpace. It's a
pure address space feature, so it should be handled there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34491 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bbd97b4bb41cc03735528962ff53d89a2a2d7ff2 03-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Made the VMArea fields base and size private and added accessors instead.
This makes it more explicit where the fields are modified.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34464 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 35d940014e100b8ca09eaf294b86fb9ef905b1e0 02-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Changed the address space area list to doubly linked. The reason is to
simplify migration of the area management, but as a side effect, it also
makes area deletion O(1) (instead of O(n), n == number of areas in the
address space).
* Moved more area management functionality from vm.cpp to VMAddressSpace and
VMArea structure creation to VMArea. Made the list and list link members
itself private.
* VMAddressSpace tracks its amount of free space, now. This also replaces
the previous mechanism to do that only for the kernel address space. It
was broken anyway, since delete_area() subtracted the area size instead of
adding it.
* vm_free_unused_boot_loader_range():
- lastEnd could be set to a value < start, which could cause memory
outside of the given range to be unmapped. Haven't checked whether this
could happen in practice -- if so, it would be seriously unhealthy.
- The range between the end of the last area in the range and the end of
the range would never be freed.
- Fixed potential integer overflows when computing addresses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34459 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f34a1dd5d701373687b6f3f0e6e76bd2b1ae6007 02-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Created VMArea.{h,cpp} and moved VMArea and the global area hash table (new
class VMAreaHash) there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34450 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e50cf8765be50a7454c9488db38b638cf90805af 02-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved the VM headers into subdirectory vm/.
* Renamed vm_cache.h/vm_address_space.h to VMCache.h/VMAddressSpace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34449 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 90d870c1556bdc415c7f41de5474ebebb0ceebdd 02-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved VMAddressSpace definition to vm_address_space.h.
* "Classified" VMAddressSpace, i.e. turned the vm_address_space_*() functions
into methods, made all attributes (but "areas") private, and added
accessors.
* Also turned the vm.cpp functions vm_area_lookup() and
remove_area_from_address_space() into VMAddressSpace methods. The rest of
the area management functionality will follow soon.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34447 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a99eb6b56f61bd847d246e44885618fdeaa313a1 01-Dec-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

vm_area -> VMArea


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34423 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e0aad96f945323bdabadd6a91a2cddd5985bbe5f 22-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Allow to use symbols as variables (prefixed with '@'). Now only tab completion
for variable names is missing B-}


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33723 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c51d6579e4c15820d383b1f84247f9c2b2b3780c 30-Sep-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed incorrect uses of user_{strl,mem}cpy() in the kernel debugger. This could
break stack traces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33381 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ea2abd110bd6a4518a954477562e2dd94a5fef9d 02-Aug-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* 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


# d3b44ccb1470db823a443d0f9b32e09bfa0d0a9c 29-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added explicit physical address parameter to vm_create_anonymous_area() and
create_area_etc(). 0 for the default behavior.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31941 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82db8a9e159b60e775b4cab31d54ac40fe95de53 19-Jun-2009 Axel Dörfler <axeld@pinc-software.de>

* Added an "unmapAddressRange" argument to the file mapping syscall. This is
the first part of making the runtime loader behave itself; it should already
make Clockwerk run okay with any number of translators (even if not all of
them will work yet).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31113 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f2d4d6f6765e3a6dd63f28876f6fb4254b53b555 24-May-2009 Michael Lotz <mmlr@mlotz.ch>

Invalidate the elfHeader variable when the image struct is deleted on error, as
they share the same pointer. Should fix bug #3955.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30848 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9bf61a0eccc21ebe33d90186064ee70c195abab9 21-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added GNU style ELF symbol versioning support in the kernel, too.
* Fixed memory leak in insert_preloaded_image() in error case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30820 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6a1e04b121921344eec3e7314fafa8796e14cfaf 13-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Symbol resolution functions in the kernel: Removed the unused parameter
allowing optional prepending of a string to the symbol names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30750 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 593ee7bbc334e3ca6ecf6553543ad8037bd7b58a 12-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Extended image_info by fields for the Haiku version and ABI. The runtime loader
and the kernel read those values from the shared object (if available). In the
runtime loader this should eventually replace the gcc version guessing method
currently used (at least for shared objects built for Haiku). The optional
packages need to be rebuilt first, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30729 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b36c8ba26ad642c712987f68e7b8ca9bccaa19bb 08-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added elf_get_kernel_image() returning the image for the kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30036 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4acbaafd89a8a61f4e26043d396c71f0449e0e2d 25-Mar-2009 Jérôme Duval <korli@users.berlios.de>

* added help for image KDL command


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29710 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c33667d400856680a8e0122300861eda77d1847a 01-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Fixing warnings under GCC4 in preparation to enable -Werror there as well:
* Replaced the use of offsetof() for structs that aren't PODs. Add a
offset_of_member() macro to util/khash.h because that's what it's used for
in our cases.
* Change the signature of add_debugger_command()/remove_debugger_command() on
GCC > 2 to avoid the depricated conversion from string constants to char *.
* Adding some "suggested" parenthesis. I know that not everyone likes that, but
it pointed out at least one bug that is fixed here as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29113 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e6e76e14dd6dc1c59ff2018bf5ce7b4b98300881 11-Nov-2008 Axel Dörfler <axeld@pinc-software.de>

* elf_find_symbol() now checks if the hashtable section is greater than 0.
* Whatever is the cause of #2733, this should at least not make it crash.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28615 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b50e620202c4faf76869721957973c0f72e83155 02-Oct-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed various warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27841 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 99409ebb19488238a93624df727b537aba89c93d 28-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Generate a debug event for a loaded user image. When a debugged team
exec*()ed, the debugger never got notified that a runtime loader image
was created.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27773 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fec47a570239d9505c56b680fb3c2564c9988c14 24-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added functions elf_create_memory_image() and
elf_add_memory_image_symbol(). The former creates and registers a new
image that has not been loaded from a file. The latter adds a symbol to
its symbol table. This is mainly a debug feature, allowing to name code
or data in memory regions that aren't associated with loaded ELF
objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27721 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 52d0d5e53e69a54f4138b0301d574591307a5292 23-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

elf_load_user_image() does now register the loaded image. That is every
team does have a runtime loader image. The "profile" tool can thus
translate addresses in the runtime loader correctly.
Note that this change will break code that assumes that the application
image is the first image returned by get_next_image_info().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27715 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8839d592bce4b8ffebdb440ed50085fbf397975b 22-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added syscall _kern_read_kernel_image_symbols() for reading a kernel
image's symbol and string tables.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27687 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dd1c278d4b64ef9c143903384a85d4c5aabc2770 03-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added elf_get_image_info_for_address() to get an image info for a kernel
image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27300 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 982413718d43f9a992698d4cb9f3e2181addd1d0 22-Aug-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Improved the "ls" command:
* It can now also lookup userland symbols.
* By respecting the currently debugged thread it smoothly cooperates
with the "in_context" command. IOW it can lookup symbols in any team.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27167 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1e90630527225143d9321738152bba9194f5ef3f 21-Aug-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added a "flags" parameter to vm_create_anonymous_area() and
create_area_etc().
* When the new flag CREATE_AREA_DONT_WAIT is specified, the functions
don't wait for memory or pages to become available. They fail
immediately instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27117 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4a40451dd9991da4bb053ca25329968af51865ba 20-Aug-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

The "symbol" command does now set its return value to the symbol
address, so it can be used in expressions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27098 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 70ce6a9ade79bd43b0cccab87da21e2f00979d28 02-Aug-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Don't allow the kernel team to be passed to
elf_debug_lookup_user_symbol_address().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26747 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c99d639708df9b4e2cc847b38d510149d19ec78 22-Jul-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged branch haiku/branches/developer/bonefish/vm into trunk. This
introduces the following relevant changes:
* VMCache:
- Renamed vm_cache to VMCache, merged it with vm_store and made it a
C++ class with virtual methods (replacing the store operations).
Turned the different store implementations into subclasses.
- Introduced MergeStore() callback, changed semantics of Commit().
- Changed locking and referencing semantics. A reference can only be
acquired/released with the cache locked. An unreferenced cache is
deleted and a mergeable cache merged when it is unlocked. This
removes the "busy" state of a cache and simplifies the page fault
code.
* Added VMAnonymousCache, which will implement swap support (work by
Zhao Shuai). It is not integrated and used yet, though.
* Enabled the mutex/recursive lock holder asserts.
* Fixed DoublyLinkedList::Swap().
* Generalized the low memory handler to a low resource handler. And made
semaphores and reserved memory handled resources. Made
vm_try_resource_memory() optionally wait (with timeout), and used that
feature to reserve memory for areas.
...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26572 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 467acc16f5abd2ecfe4e512b4accba5377b410c6 22-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Cleanup, no functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26568 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 736352dcf58f1855db8dc09c456d420ca91596ef 16-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Added [un]lock_memory_etc() versions that accept a team_id as first argument.
This allows drivers to lock the memory outside of the original team context.
* create_area_etc() got a struct team as first argument, but that should have
been a team_id.
* Removed delete_area_etc() - there is already vm_delete_area() doing the same
thing.
* Renamed vm_get_address_space_by_id() to vm_get_address_space(), as there is
no other method of getting an address space.
* Removed erroneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26455 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fa0a5cd0e867824fdc375da59860db7423d2e054 09-Jul-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

insert_preloaded_image() now copies the debug symbols and string table
over to the kernel heap. This allows us to simply free them in
unload_elf_image(). Now we no longer leak the memory for non-preloaded
images. On my T61 this amounted to more than 10 MB of kernel heap after
booting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26343 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1d7044ed199d0a1698b4fce89092a9dcd41cea0 08-Jul-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added TODO regarding memory leak. Too tired ATM to solve it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26335 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f5b3a6a7968b849c8cb3d06ffe6d19acccf910a8 05-Jun-2008 Michael Lotz <mmlr@mlotz.ch>

* Initialize all static mutexes in the kernel through a MUTEX_INITIALIZER()
and remove the then unneeded mutex_init() for them.
* Remove the workaround for allowing uninitialized mutexes on kernel startup.
As they are all initialized statically through the MUTEX_INITIALIZER() now
this is not needed anymore.
* An uninitialized mutex will now cause a panic when used to find possibly
remaining cases.
* Remove now unnecessary driver_settings_init_post_sem() function.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25812 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3cf7ecd1e49db0ad531a6d81ad1945c4a6235010 13-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added <sys/mman.h> header. It declares only mmap() and munmap() yet
and defines the macros needed by them.
* Renamed syscall sys_vm_map_file() to _kern_map_file() and changed the
path to an FD parameter. Changed vm_map_file() accordingly and
adjusted the kernel ELF loader and the runtime loader.
* Added syscall _kern_unmap_memory().
* Added bool unmapAddressRange parameter to vm_create_anonymous_area()
and map_backing_store(). If true and the address specification is
B_EXACT_ADDRESS, all areas in the specified address range will be
deleted (unless an area is covered only partially).
* Introduced B_SHARED_AREA flag, which is set on areas that have been
created by {vm,_user}_map_file() with REGION_NO_PRIVATE_MAP. When
fork()ing those areas won't be copied CoW, but rather be cloned. This
is needed for mmap() MAP_SHARED.
* {vm,_user}_map_file() also accept an FD argument < 0, in which case an
anonymous area is created.
* Implemented mmap() and munmap(). Currently there's the restriction
that we can't partially unmap areas. Otherwise the functions should be
rather compliant. We also support the non-POSIX extension
MAP_ANONYMOUS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24964 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5dafcc2b1b258a02efb4636e99b03e09316a8dd7 26-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Added new "symbol" command which is able to search for a symbol that
matches the specified pattern in all loaded kernel images.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24592 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 890c615aee357f4123a597faef098291f0a73288 03-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* unload_elf_image() never unloaded any image because the ref_count
check was wrong (never gets below zero if everything goes as
intended).
* Removed erroneous white space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24232 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d4d25a55bd390c6ede98b168c98d0ac231a0759f 18-Feb-2008 Michael Lotz <mmlr@mlotz.ch>

We should lock around register_elf_image() as we modify the image hash in there.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24010 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7bb85c7b5502a2b6662b4b521a5e70af6c32b01c 31-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Clarifying comment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23806 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2477bce5046dba76204a8c8b75ea773be4ae9748 19-Jan-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Added support for userland symbol lookup in "sc" and "call". Having
used it for an hour or so, I really wonder how we could live without it.
:-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23640 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4063db92d046d7a878f659e13b07be5f732ee0e5 06-Jan-2008 Axel Dörfler <axeld@pinc-software.de>

* elf_resolve_symbol() no longer copies the symbol name if symbolPrepend is
NULL (it's not used anywhere yet, anyway).
* Fixed warning when compiling with tracing turned on.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23267 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a0b6b9b9e62fbdf91fd1e432a31cc745275a846d 04-Jan-2008 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23241 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 80f54692912d728f5780e9d78d7643828edaaa2a 06-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* struct vnode is an opaque type now, removed void* where it was used incorrectly.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22461 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c4ed86b56868e2584298c05792a6e65d4d3fa78 27-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

* Moved some definitions from vm_types.h that functions in vm.h need as
arguments into vm.h.
* This should fix the broken build from earlier - thanks Stefano for the note!
* That also allowed to clean some other includes a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22331 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e6dc7903e4277bf6e22527ed611df619c7e645f1 26-Sep-2007 Axel Dörfler <axeld@pinc-software.de>

* vm.h no longer includes vm_types.h - only those that actually need access
to the private VM types are including vm_types.h now.
* Removed vm_page, vm_area, vm_cache, and vm_address_space typedefs; it's
cleaner this way, and the actual types are only used in C++ files now,
anyway.
* And that caused changes in many files...
* Made commpage.h self-containing.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22329 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e442c70cbeb658dc0dd446c72c5e817dfe16b9b 31-Mar-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Reversed locking order of sImageLoadMutex and sImageMutex in
unload_kernel_add_on(). The former one could lead to deadlocks with
load_kernel_add_on() (e.g. occasionally the boot process would hang).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20485 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0ad660a168b87946b2bfed03603790119f53dc39 02-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

Remap all preloaded executables read-only and executable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19180 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7d2fafcac538f09519b02c3d0021e31480060a5d 26-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Forgot even more debug output...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16882 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61106f7e86d5c5256de9fae2ca23d022fecc4452 26-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Forgot to remove some debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16881 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c14a34a65f69bbccfca75a0c9cd44bab21ab25d5 26-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Improved kernel ELF loader (and made it more similar to the one from the boot
loader): it now supports holes between segments, and accepts any segment order.
* Renamed elf.c to elf.cpp and fixed warnings.
* Renamed elf_image_info::dynamic_ptr and eheader to dynamic_section and elf_header.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16878 a95241bf-73f2-0310-859d-f6bbb57e9c96