lp:~bengal/helenos/openrisc

Created by Beniamino Galvani and last modified
Get this branch:
bzr branch lp:~bengal/helenos/openrisc
Only Beniamino Galvani can upload to this branch. If you are Beniamino Galvani please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Beniamino Galvani
Project:
HelenOS branches
Status:
Development

Recent revisions

2040. By Beniamino Galvani

Add support for OpenRISC

2039. By Jiri Svoboda <jiri@wiwaxia>

Add signal for position events to canvas.

2038. By Jiri Svoboda <jiri@wiwaxia>

Reverse list iteration - list_foreach_rev() and link_used().

2037. By Jiri Svoboda <jiri@wiwaxia>

Winreg argument should be const.

2036. By Jiri Svoboda <jiri@wiwaxia>

Add remove() function from C standard.

2035. By Jakub Jermar

No need to force locfs to link statically.
(Thanks to Fan Jinfei)

2034. By Jakub Jermar

Fix build when dynamic linking is enabled.

2033. By Jakub Jermar

Link ext4fs statically so that it can serve as a root FS when dynamic linking is enabled.

2032. By Martin Decky

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

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)

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.