barrelfish
7 years agohake: Increase the stack size of the Haskell Runtime System from 8MB (default)
Raphael Fuchs [Tue, 25 Jun 2013 20:47:50 +0000]
hake: Increase the stack size of the Haskell Runtime System from 8MB (default)
      to 32MB.

This patch fixes the following error.
stack overflow: use +RTS -K<size> to increase it

7 years agoterminal: Add flounder interfaces for new terminal interface as well as static
Raphael Fuchs [Tue, 25 Jun 2013 20:47:50 +0000]
terminal: Add flounder interfaces for new terminal interface as well as static
          slot for session id.

7 years agolibcollections: Extend the list implementation with a function to remove all
Raphael Fuchs [Tue, 25 Jun 2013 20:47:50 +0000]
libcollections: Extend the list implementation with a function to remove all
                items of the list that match a given predicate.

Moreover, convert file to use unix-style line ending instead of windows-style.

7 years agoSerial-driver: Adding debug facilities.
Raphael Fuchs [Tue, 25 Jun 2013 20:47:50 +0000]
Serial-driver: Adding debug facilities.

Adding the SERIAL_DEBUG macro and the serial_debug flag to Config.hs.

7 years agoOctopus: Add ability to set and get records by id capability.
Raphael Fuchs [Tue, 25 Jun 2013 20:47:50 +0000]
Octopus: Add ability to set and get records by id capability.

The intent with this patch is that only someone possesing a certain id cap
can retrieve records that were stored with this id cap.

To this end, two new functions were added to the client interface of octopus:

* oct_set_with_idcap(struct capref idcap, const char *attributes, ...)
  Sets a record using the id capability as the key/name of the record.

* oct_get_with_idcap(char **data, struct capref idcap)
  Retrieves a record using the id capability as the key/name.

Note that octopus and the SKB do not support dedicated namespaces atm.
Therefore a record saved with oct_set_with_idcap() could be retrieved by
oct_get().

Moreover, format octopus.if to 80 columns.

8 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.

8 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.

8 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

8 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.

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

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

8 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

8 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

8 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.

8 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

8 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.

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

8 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

8 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));
                           ^~~

8 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

8 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.

8 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.

8 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.

8 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).

8 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);

8 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

8 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.

8 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*\='

8 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]

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

8 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>).

8 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>.

8 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

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

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

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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"

8 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.

8 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.

8 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.

8 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.

8 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.

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

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

8 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.

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

8 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.

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

8 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

8 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.

8 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.

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

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

8 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.

8 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().

8 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.

8 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.

8 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.

8 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.

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

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

8 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.

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

8 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.

8 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.

8 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.

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

8 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.

8 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

8 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).

8 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().

8 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.

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

8 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.

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

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

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

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

8 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).

8 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.

8 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.

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

8 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().

8 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.

8 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.

8 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.

8 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.

8 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.

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

8 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.

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

8 years agoAdded vm_modify_mapping syscall on pmem capabilities. Also lots of debugging printfs.
Simon Gerber [Thu, 22 Nov 2012 14:53:14 +0000]
Added vm_modify_mapping syscall on pmem capabilities. Also lots of debugging printfs.

8 years agoFixed compile_vaddr(). Cleaned up new code.
Simon Gerber [Thu, 22 Nov 2012 14:52:19 +0000]
Fixed compile_vaddr(). Cleaned up new code.

8 years agoAdded hacky mapping tracking in x86_64 page_mappings_arch.c
Simon Gerber [Thu, 22 Nov 2012 14:51:09 +0000]
Added hacky mapping tracking in x86_64 page_mappings_arch.c

8 years agoExperimental mdb_find_range, added very verbose output.
Simon Gerber [Thu, 22 Nov 2012 14:51:09 +0000]
Experimental mdb_find_range, added very verbose output.