barrelfish
7 years agoAdded a harness test for spanning programs. release2013-03-01
Stefan Kaestle [Thu, 28 Feb 2013 12:52:23 +0000]
Added a harness test for spanning programs.

7 years agochangeset: 1270:aa365ea1f4c0
Stefan Kaestle [Thu, 28 Feb 2013 09:46:46 +0000]
changeset: 1270:aa365ea1f4c0
user: Stefan Kaestle <stefan.kaestle@inf.ethz.ch>
date: Thu Feb 28 10:37:59 2013 +0100
summary: Added a harness test for spawning programs.

7 years agolibbarrelfish: Simplified logic and fixed infinite loop on cap_destroy error in span_...
Zaheer Chothia [Tue, 26 Feb 2013 09:17:21 +0000]
libbarrelfish: Simplified logic and fixed infinite loop on cap_destroy error in span_domain_reply().

7 years agoarmv5: fixed calculation of src_lpaddr in caps_map_l2().
Simon Gerber [Mon, 25 Feb 2013 17:15:05 +0000]
armv5: fixed calculation of src_lpaddr in caps_map_l2().

7 years agolibbarrelfish: Moved cap_destroy() into error case in span_domain_reply.
Simon Gerber [Mon, 25 Feb 2013 16:55:52 +0000]
libbarrelfish: Moved cap_destroy() into error case in span_domain_reply.

7 years agohake: Removed unused config option from Config.hs.template.
Simon Gerber [Mon, 25 Feb 2013 12:46:43 +0000]
hake: Removed unused config option from Config.hs.template.

7 years agoarm: fixed wrong is_root_pt predicate.
Simon Gerber [Thu, 21 Feb 2013 11:02:17 +0000]
arm: fixed wrong is_root_pt predicate.

7 years agoUse get_address(cap) and get_size(cap) in various places in the kernel.
Simon Gerber [Thu, 21 Feb 2013 11:00:01 +0000]
Use get_address(cap) and get_size(cap) in various places in the kernel.

7 years agoxscale: Added code for new memory kernel interface.
Simon Gerber [Thu, 21 Feb 2013 10:58:52 +0000]
xscale: Added code for new memory kernel interface.

7 years agovmkitmon: added creating separate copy of caps that are mapped in host and guest.
Simon Gerber [Wed, 20 Feb 2013 14:24:22 +0000]
vmkitmon: added creating separate copy of caps that are mapped in host and guest.

7 years agox86: Fixed detection of whether a address region spans multiple leaf page tables.
Simon Gerber [Wed, 20 Feb 2013 13:17:48 +0000]
x86: Fixed detection of whether a address region spans multiple leaf page tables.

7 years agoMerged Simon's Master's thesis code.
Simon Gerber [Tue, 19 Feb 2013 12:49:21 +0000]
Merged Simon's Master's thesis code.

Changes include:
* new interface for manipulating hardware page tables
* Removal of mappings when underlying capability gets deleted
* Functionality to dump hardware page tables and state in libbarrelfish pmaps

For more details see http://www.barrelfish.org/gerber-master-vm.pdf

7 years agoWait longer for gem5 to come up and remove useless telnet debug option.
Stefan Kaestle [Tue, 19 Feb 2013 11:35:31 +0000]
Wait longer for gem5 to come up and remove useless telnet debug option.

7 years agoMore debug output
Stefan Kaestle [Tue, 19 Feb 2013 11:15:01 +0000]
More debug output

7 years agoMerge
Stefan Kaestle [Tue, 19 Feb 2013 10:51:31 +0000]
Merge

7 years agoAdditional output for telnet to debug armv7_gem5 build error
Stefan Kaestle [Tue, 19 Feb 2013 10:51:02 +0000]
Additional output for telnet to debug armv7_gem5 build error

7 years agoMissing separator in pathor molly_ld_script.in for Pandaboard build
Stefan Kaestle [Mon, 11 Feb 2013 14:13:06 +0000]
Missing separator in pathor molly_ld_script.in for Pandaboard build

7 years agoMove declaration of timegm to //include/time.h
Kornilios Kourtis [Sat, 9 Feb 2013 20:11:04 +0000]
Move declaration of timegm to //include/time.h

Fixes a build error when using oldc.

7 years agoinclude/libgen.h: remove sys/reent.h
Zaheer Chothia [Fri, 8 Feb 2013 18:15:57 +0000]
include/libgen.h: remove sys/reent.h

7 years agoposixcompat: add 'basename' and 'dirname'.
Zaheer Chothia [Mon, 4 Feb 2013 15:17:45 +0000]
posixcompat: add 'basename' and 'dirname'.

Taken from newlib/unix with minimal changes to follow Barrelfish style.

7 years agoClang: resolve several minor warnings.
Zaheer Chothia [Fri, 8 Feb 2013 17:35:31 +0000]
Clang: resolve several minor warnings.

7 years agokernel (x86_64): fix ambiguous operand size with 'cmp' and constant.
Zaheer Chothia [Fri, 8 Feb 2013 17:35:26 +0000]
kernel (x86_64): fix ambiguous operand size with 'cmp' and constant.

http://clang.llvm.org/compatibility.html#inline-asm

7 years agoFixed several bugs where 'sizeof' applied to pointer instead of underlying struct.
Zaheer Chothia [Fri, 8 Feb 2013 17:35:22 +0000]
Fixed several bugs where 'sizeof' applied to pointer instead of underlying struct.

Found with Clang - example warning:
  ../kernel/syscall.c:411:27: error: 'memset' call operates on objects of type 'struct cte' while the size is based on a different type 'struct cte *' [-Werror,-Wsizeof-pointer-memaccess]
     memset(cte, 0, sizeof(cte));
            ~~~            ^~~
  ../kernel/syscall.c:411:27: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
     memset(cte, 0, sizeof(cte));
                           ^~~

7 years agothread: fix condition for stack overflow warning.
Zaheer Chothia [Fri, 8 Feb 2013 17:35:19 +0000]
thread: fix condition for stack overflow warning.

thread_check_stack_bounds() has a very odd condition.  It will always return
true because bottom <= top.  This results in a warning regardless of whether
the stack pointer is valid or not, for instance:
    Error: stack bounds exceeded: sp = 0x880b00 but [bottom, top] = [0x873000, 0x883000]

We cannot simply patch the condition to instead read:
    return sp > (lvaddr_t)thread->stack &&
           sp <= (lvaddr_t)thread->stack_top;

because that results in failures during bootup:
    >> INFO: stack bounds exceeded: sp = 0x5c1a50 but [bottom, top] = [0x592000, 0x5a2000]
    Dispatcher warning in kernel 0: user trap #13 WHILE DISABLED in 'acpi': IP 477be8, error 0
    skb.0: waiting for: all_spawnds_up
    >> INFO: stack bounds exceeded: sp = 0x631a50 but [bottom, top] = [0x602000, 0x612000]
    Dispatcher warning in kernel 0: user trap #13 WHILE DISABLED in 'kaluga': IP 4a4368, error 0

7 years agothread: on unhandled exceptions warn if stack pointer is out-of-bounds.
Zaheer Chothia [Fri, 8 Feb 2013 17:35:13 +0000]
thread: on unhandled exceptions warn if stack pointer is out-of-bounds.

7 years agoregisters: add helper function to retrieve stack pointer.
Zaheer Chothia [Fri, 8 Feb 2013 17:35:09 +0000]
registers: add helper function to retrieve stack pointer.

7 years agonfs: include failure reason in error messages.
Zaheer Chothia [Fri, 8 Feb 2013 17:35:05 +0000]
nfs: include failure reason in error messages.

7 years agoposixcompat: add non-standard GNU function 'timegm' (inverse of 'gmtime').
Zaheer Chothia [Fri, 8 Feb 2013 17:34:56 +0000]
posixcompat: add non-standard GNU function 'timegm' (inverse of 'gmtime').

This implementation is borrowed from musl libc (MIT licensed).

7 years agoposixcompat (dlfcn): improve C++ compatibility and document how to use.
Zaheer Chothia [Fri, 8 Feb 2013 17:32:47 +0000]
posixcompat (dlfcn): improve C++ compatibility and document how to use.

Note: a minor API change was necessary to fix an incompatibility between C and
C++, which requires array sizes to be fixed:
    void bar(struct foo (*f)[], int size);

This results in the following error:
    error: parameter 'f' includes pointer to array of unknown bound 'foo []'
    error: cannot convert 'foo (*)[3]' to 'foo (*)[]' for argument '1' to 'void bar(foo (*)[], int)'

Instead we simply pass the array as a pointer to its first element:
    void bar(struct foo *f, int size);

7 years agoposixcompat: implement creat().
Zaheer Chothia [Fri, 8 Feb 2013 17:32:42 +0000]
posixcompat: implement creat().

http://pubs.opengroup.org/onlinepubs/009604599/functions/creat.html

7 years agoVMkit: replace old-style GNU field designator with C99 syntax.
Zaheer Chothia [Fri, 8 Feb 2013 17:32:38 +0000]
VMkit: replace old-style GNU field designator with C99 syntax.

7 years agoheaders: remove C99 designated initializers; not supported by C++.
Zaheer Chothia [Fri, 8 Feb 2013 17:32:33 +0000]
headers: remove C99 designated initializers; not supported by C++.

Only looked at header files in //include. Matches were found with:
    $ ack --hh '(?<!\w)\.\w+\s*\='

7 years ago<barrelfish/lmp_chan.h>: explicit cast back to enum type after bitwise operation.
Zaheer Chothia [Fri, 8 Feb 2013 17:32:29 +0000]
<barrelfish/lmp_chan.h>: explicit cast back to enum type after bitwise operation.

Resolves this error when compiling from C++:
    error: invalid conversion from 'int' to 'lmp_send_flags_t {aka lmp_send_flag}' [-fpermissive]

7 years agoheaders: add missing #includes.
Zaheer Chothia [Fri, 8 Feb 2013 17:32:24 +0000]
headers: add missing #includes.

7 years ago<netinet/in.h>: add missing declaration of in_port_t and in_addr_t.
Zaheer Chothia [Fri, 8 Feb 2013 17:32:20 +0000]
<netinet/in.h>: add missing declaration of in_port_t and in_addr_t.

lwip just uses u16_t/u32_t directly (see <ipv4/lwip/inet.h>).

7 years agoheaders: move definition of mkdir and chmod to <sys/stat.h>.
Zaheer Chothia [Fri, 8 Feb 2013 17:32:15 +0000]
headers: move definition of mkdir and chmod to <sys/stat.h>.

7 years agoheaders: wrap declarations in extern "C".
Zaheer Chothia [Fri, 8 Feb 2013 17:32:03 +0000]
headers: wrap declarations in extern "C".

Note: this change is not exhaustive and only touches some headers in //include

7 years agoarmv7: added new modify_flags invocation.
Simon Gerber [Wed, 30 Jan 2013 15:20:05 +0000]
armv7: added new modify_flags invocation.

7 years agoarmv5: implemented new modify_flags invocation.
Simon Gerber [Wed, 30 Jan 2013 12:28:54 +0000]
armv5: implemented new modify_flags invocation.

7 years agox86_64: removed duplicate return statement in page_mappings_modify_flags.
Simon Gerber [Wed, 30 Jan 2013 10:39:04 +0000]
x86_64: removed duplicate return statement in page_mappings_modify_flags.

7 years agox86_32: Implemented new modify_flags invocation and associated functionality.
Simon Gerber [Wed, 30 Jan 2013 09:49:39 +0000]
x86_32: Implemented new modify_flags invocation and associated functionality.

7 years agox86_64: removed commented out unused code in pmap_target.
Simon Gerber [Wed, 30 Jan 2013 09:28:46 +0000]
x86_64: removed commented out unused code in pmap_target.

7 years agox86_64: Implemented modifying flags for parts of mapped regions.
Simon Gerber [Fri, 18 Jan 2013 16:07:38 +0000]
x86_64: Implemented modifying flags for parts of mapped regions.

7 years agoCleanup function names and converted printfs to debug() in kernel component of new...
Simon Gerber [Tue, 27 Nov 2012 16:48:09 +0000]
Cleanup function names and converted printfs to debug() in kernel component of new memory interface.

7 years agoarmv7: fixed merge errors and implemented new memory interface for omap44xx.
Simon Gerber [Mon, 26 Nov 2012 13:33:23 +0000]
armv7: fixed merge errors and implemented new memory interface for omap44xx.

7 years agoarmv7: removed unused generated dependency "romfs_size.h"
Simon Gerber [Mon, 26 Nov 2012 13:20:10 +0000]
armv7: removed unused generated dependency "romfs_size.h"

7 years agoarmv7: changed memory bits in kernel to new interface with kernel mappings.
Simon Gerber [Fri, 23 Nov 2012 10:42:25 +0000]
armv7: changed memory bits in kernel to new interface with kernel mappings.

7 years agoarm: pmap code cleanup and fixed new kernel memory interface.
Simon Gerber [Fri, 23 Nov 2012 10:32:17 +0000]
arm: pmap code cleanup and fixed new kernel memory interface.

7 years agoarm: Implemented kernel-side parts of dumping hw page tables.
Simon Gerber [Fri, 23 Nov 2012 10:29:48 +0000]
arm: Implemented kernel-side parts of dumping hw page tables.

7 years agoFixed unmap_capability to correctly calculate slot number.
Simon Gerber [Fri, 23 Nov 2012 10:28:40 +0000]
Fixed unmap_capability to correctly calculate slot number.

7 years agoFixed vspace_dump to have nop sorting function when not implemented specifically.
Simon Gerber [Fri, 23 Nov 2012 10:28:30 +0000]
Fixed vspace_dump to have nop sorting function when not implemented specifically.

7 years agoMore ARM code.
Simon Gerber [Fri, 23 Nov 2012 10:28:24 +0000]
More ARM code.

7 years agoIncomplete ARM implementation.
Simon Gerber [Fri, 23 Nov 2012 09:51:08 +0000]
Incomplete ARM implementation.

7 years agox86_32: Cleanup merge errors in pmap_target.c.
Simon Gerber [Fri, 23 Nov 2012 09:46:43 +0000]
x86_32: Cleanup merge errors in pmap_target.c.

7 years agoFixed missing comma in kernel Hakefile.
Simon Gerber [Fri, 23 Nov 2012 09:29:55 +0000]
Fixed missing comma in kernel Hakefile.

7 years agox86_64: Added missing error returns in pmap.
Simon Gerber [Thu, 22 Nov 2012 14:58:30 +0000]
x86_64: Added missing error returns in pmap.

7 years agoacpi: Added failure returns in AcpiOsMapMemory().
Simon Gerber [Thu, 22 Nov 2012 14:58:25 +0000]
acpi: Added failure returns in AcpiOsMapMemory().

7 years agox86_64: Added missing include in kernel page_mappings_arch.c
Simon Gerber [Thu, 22 Nov 2012 14:58:03 +0000]
x86_64: Added missing include in kernel page_mappings_arch.c

7 years agox86: Fixed modify_flags in pmap to properly use new kernel interface.
Simon Gerber [Thu, 22 Nov 2012 14:57:52 +0000]
x86: Fixed modify_flags in pmap to properly use new kernel interface.

7 years agox86_32: Useful debug printf in kernel map handler.
Simon Gerber [Thu, 22 Nov 2012 14:54:41 +0000]
x86_32: Useful debug printf in kernel map handler.

7 years agoFixed & unified vnode_entry_bits.
Simon Gerber [Thu, 22 Nov 2012 14:54:33 +0000]
Fixed & unified vnode_entry_bits.

7 years agox86_64: Fixed comment.
Simon Gerber [Thu, 22 Nov 2012 14:53:30 +0000]
x86_64: Fixed comment.

7 years agox86: Changed TLB flushing to simple hybrid scheme.
Simon Gerber [Thu, 22 Nov 2012 14:53:30 +0000]
x86: Changed TLB flushing to simple hybrid scheme.

7 years agox86: Fixed invlpg instruction and added do_one_tlb_flush().
Simon Gerber [Thu, 22 Nov 2012 14:53:29 +0000]
x86: Fixed invlpg instruction and added do_one_tlb_flush().

7 years agox86: Fixed kernel to use invlpg for TLB flushing.
Simon Gerber [Thu, 22 Nov 2012 14:53:29 +0000]
x86: Fixed kernel to use invlpg for TLB flushing.

7 years agox86: Added mapped capability in unmap syscall arguments.
Simon Gerber [Thu, 22 Nov 2012 14:53:29 +0000]
x86: Added mapped capability in unmap syscall arguments.

7 years agoFixed find_next_ptable to use range query wrapper.
Simon Gerber [Thu, 22 Nov 2012 14:53:28 +0000]
Fixed find_next_ptable to use range query wrapper.

7 years agoFixed read_pt_entry in page_mappings_arch.
Simon Gerber [Thu, 22 Nov 2012 14:53:28 +0000]
Fixed read_pt_entry in page_mappings_arch.

7 years agoMoved debug printfs.
Simon Gerber [Thu, 22 Nov 2012 14:53:27 +0000]
Moved debug printfs.

7 years agoAdded VM KPI benchmark.
Simon Gerber [Thu, 22 Nov 2012 14:53:27 +0000]
Added VM KPI benchmark.

7 years agoFixed missing mapping_info.pte zero check in compile_vaddr.
Simon Gerber [Thu, 22 Nov 2012 14:53:27 +0000]
Fixed missing mapping_info.pte zero check in compile_vaddr.

7 years agoRemoved dead code.
Simon Gerber [Thu, 22 Nov 2012 14:53:26 +0000]
Removed dead code.

7 years agox86_32: Decreased verbosity of page mapping code.
Simon Gerber [Thu, 22 Nov 2012 14:53:26 +0000]
x86_32: Decreased verbosity of page mapping code.

7 years agoFixed double add in x86_32_ptable handler and minor cleanup.
Simon Gerber [Thu, 22 Nov 2012 14:53:25 +0000]
Fixed double add in x86_32_ptable handler and minor cleanup.

7 years agox86_32: Implemented missing parts of new kernel memory system.
Simon Gerber [Thu, 22 Nov 2012 14:53:25 +0000]
x86_32: Implemented missing parts of new kernel memory system.

7 years agoRemoved old syscall vm_modify_mapping.
Simon Gerber [Thu, 22 Nov 2012 14:53:24 +0000]
Removed old syscall vm_modify_mapping.

7 years agox86_64: Cleanup kernel page mapping code.
Simon Gerber [Thu, 22 Nov 2012 14:53:24 +0000]
x86_64: Cleanup kernel page mapping code.

7 years agoRemoved old code in kernel/page_mappings_arch.c
Simon Gerber [Thu, 22 Nov 2012 14:53:23 +0000]
Removed old code in kernel/page_mappings_arch.c

7 years agoFixed unmap loop (multiple leaf ptables for mapping).
Simon Gerber [Thu, 22 Nov 2012 14:53:23 +0000]
Fixed unmap loop (multiple leaf ptables for mapping).

7 years agoFixed missing vregion_destroy in pci main().
Simon Gerber [Thu, 22 Nov 2012 14:53:23 +0000]
Fixed missing vregion_destroy in pci main().

7 years agoFixed overzealous cap_destroy in pmap_unmap.
Simon Gerber [Thu, 22 Nov 2012 14:53:22 +0000]
Fixed overzealous cap_destroy in pmap_unmap.

7 years agoNew KPI for unmap.
Simon Gerber [Thu, 22 Nov 2012 14:53:22 +0000]
New KPI for unmap.

7 years agoNew KPI bits for map on kernel side.
Simon Gerber [Thu, 22 Nov 2012 14:53:21 +0000]
New KPI bits for map on kernel side.

7 years agoImplemented new map KPI (libbarrelfish end).
Simon Gerber [Thu, 22 Nov 2012 14:53:21 +0000]
Implemented new map KPI (libbarrelfish end).

7 years agoImplemented new VNode_Map syscall.
Simon Gerber [Thu, 22 Nov 2012 14:53:21 +0000]
Implemented new VNode_Map syscall.

7 years agoFixed early cap_destroy in libahci.
Simon Gerber [Thu, 22 Nov 2012 14:53:20 +0000]
Fixed early cap_destroy in libahci.

7 years agoImplemented memobj_destroy_anon().
Simon Gerber [Thu, 22 Nov 2012 14:53:20 +0000]
Implemented memobj_destroy_anon().

7 years agoMore debug output in page_mappings_arch (disabled).
Simon Gerber [Thu, 22 Nov 2012 14:53:19 +0000]
More debug output in page_mappings_arch (disabled).

7 years agoAdded test code for new page table mainpulation API.
Simon Gerber [Thu, 22 Nov 2012 14:53:19 +0000]
Added test code for new page table mainpulation API.

7 years agoAdded code to dump hardware page tables from user space.
Simon Gerber [Thu, 22 Nov 2012 14:53:18 +0000]
Added code to dump hardware page tables from user space.

7 years agoFixed slot calculation in unmap_capability().
Simon Gerber [Thu, 22 Nov 2012 14:53:18 +0000]
Fixed slot calculation in unmap_capability().

7 years agoFixed missing error check in unmap_capability().
Simon Gerber [Thu, 22 Nov 2012 14:53:17 +0000]
Fixed missing error check in unmap_capability().

7 years agoAdded unmap on cap_delete for pmem capabilities.
Simon Gerber [Thu, 22 Nov 2012 14:53:17 +0000]
Added unmap on cap_delete for pmem capabilities.

7 years agoImplemented unmap with checks. Fixed unmap_region to unmap each frame individually.
Simon Gerber [Thu, 22 Nov 2012 14:53:17 +0000]
Implemented unmap with checks. Fixed unmap_region to unmap each frame individually.

7 years agox86_64: Added debug output in page table manipulation code.
Simon Gerber [Thu, 22 Nov 2012 14:53:16 +0000]
x86_64: Added debug output in page table manipulation code.

7 years agoImplemented mapping tracking when unmapping. Breaks for mappings that span more than...
Simon Gerber [Thu, 22 Nov 2012 14:53:16 +0000]
Implemented mapping tracking when unmapping. Breaks for mappings that span more than 2 leaf ptables.

7 years agoAdded metadata for mappings spanning 2 leaf ptables.
Simon Gerber [Thu, 22 Nov 2012 14:53:15 +0000]
Added metadata for mappings spanning 2 leaf ptables.

7 years agolibbarrelfish does unmap in reverse order.
Simon Gerber [Thu, 22 Nov 2012 14:53:15 +0000]
libbarrelfish does unmap in reverse order.

7 years agoBarrelfish (standard config) boots with 1 mapping per cap copy.
Simon Gerber [Thu, 22 Nov 2012 14:53:15 +0000]
Barrelfish (standard config) boots with 1 mapping per cap copy.

7 years agoRemoved unnecessary call to compile_vaddr().
Simon Gerber [Thu, 22 Nov 2012 14:53:14 +0000]
Removed unnecessary call to compile_vaddr().