lp:~sheosi/helenos/lua

Created by Sergio Tortosa on 2013-10-27 and last modified on 2014-01-04
Get this branch:
bzr branch lp:~sheosi/helenos/lua
Only Sergio Tortosa can upload to this branch. If you are Sergio Tortosa please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Sergio Tortosa
Project:
HelenOS branches
Status:
Development

Recent revisions

2039. By Sergio Tortosa on 2014-01-04

Linked math library, restored original lua.c file
Now lua works perfectly when using posix

2038. By Sergio Tortosa on 2013-12-22

Merged mainline

2037. By Sergio Tortosa on 2013-12-16

Fixed lua compilation, still does not funciton correctly

2036. By Sergio Tortosa 'sheosi' <email address hidden> on 2013-11-14

dded some needed math functions (but not implemeneted them)º

2035. By Sergio Tortosa 'sheosi' <email address hidden> on 2013-11-12

Fixed sources name in makefile

------------- This line and the following will be ignored --------------

modified:
  uspace/app/lua/Makefile

2034. By Sergio Tortosa 'sheosi' <email address hidden> on 2013-11-12

Makefile cleand and fixed

2033. By Sergio Tortosa 'sheosi' <email address hidden> on 2013-11-11

Added lua code

2032. By Martin Decky on 2013-10-18

fix kernel assertion (panic) on arm32 (BeagleBone and others) in frame_reference_add()

The macro PTE_GET_FRAME_ARCH() retrieves a physical frame number from the page table entry. Although the frame_base_addr member of the page table entry structure (pte_t) is declared as an unsigned bit field, due to the integer promotion rules the value is interpreted as a signed integer.

  C99-§6.3.1.1: Boolean, characters, and integers
    2: If an int can represent all values of the original type (as restricted by the width, for a bit-field), the value is converted to an int; otherwise, it is converted to an unsigned int. These are called the integer promotions. All other types are unchanged by the integer promotions.

Since the bitwise shift operations in PTE_GET_FRAME_ARCH() and especially in ADDR2PFN() (used by anon_share() in backend_anon.c) are applied on a signed integer, they create a false sign-extended (negative) physical frame number that is then passed to frame_reference_add(). This routine is obviously unable to find a valid physical memory zone for the malformed frame number and hits the assertion. The fix is to explicitly typecast the value in PTE_GET_FRAME_ARCH() as unsigned.

The original panic and stack trace for reference:

######> Kernel panic on cpu0 due to a failed assertion: <######
frame_reference_add() at generic/src/mm/frame.c:976:
znum != (size_t) -1

THE=0x802ca000: pe=1 thr=0x802c8000 task=0x802c1000 cpu=0x80292800
as=0x8000112c magic=0xfacefeed
0x802cbd2c: generic/src/debug/stacktrace.o:stack_trace()+0x0000001c
0x802cbd5c: generic/src/debug/panic.o:panic_common()+0x000001b4
0x802cbd94: generic/src/mm/frame.o:frame_reference_add()+0x000000a8
0x802cbdf4: generic/src/mm/backend_anon.o:anon_share()+0x00000168
0x802cbe44: generic/src/mm/as.o:as_area_share()+0x000001bc
0x802cbe7c: generic/src/ipc/ops/sharein.o:answer_preprocess()+0x0000007c
0x802cbeb4: generic/src/ipc/sysipc.o:answer_preprocess()+0x000000a4
0x802cbf04: generic/src/ipc/sysipc.o:sys_ipc_answer_fast()+0x0000007c
0x802cbf4c: generic/src/syscall/syscall.o:syscall_handler()+0x000000e0
0x802cbf74: arch/arm32/src/exception.o:swi_exception()+0x00000034
0x802cbfb4: generic/src/interrupt/interrupt.o:exc_dispatch()+0x00000144
cpu0: halted

2031. By Vojtech Horky on 2013-10-18

Merge GCC port updates

libposix changes
 * unimplemented methods do not abort, they warn instead
 * add pthread.h, no implementation yet
 * speed-up symbol redefinition (objcopy can work with static
   libraries as well)
 * add some functions already implemented in libc to libposix

toolchain changes
 * experimental support for HelenOS-specific toolchain
    * toolchain.sh --helenos-target
    * adds *-helenos*- target, e.g. we can have amd64-helenos-gcc
    * added as another choice to HelenOS.config, updated other scripts
      accordingly
 * added non-root compilation
   * install into PKG/ to be later copied to real root
     (package-like installation)

2030. By Jiri Svoboda <jiri@wiwaxia> on 2013-10-08

Adjust ATA polling strategy for 15x better performance.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:helenos
This branch contains Public information 
Everyone can see this information.

Subscribers