QEMU memory problem:
simulate 32 bit in 64 bit environment, we can use MAP_32BIT to force mmap to allocate memory address within 4G.
However, according to http://lxr.free-electrons.com/source/arch/x86/kernel/sys_x86_64.c, we can only get memory between 0x40000000 and 0x80000000,
2012年4月27日 星期五
atomic region
This project aims to efficiently handle guest instruction exception through atomic region (software approach).
Atomic region: blocked execution mode?
what is blocked execution mode
Atomic region: blocked execution mode?
what is blocked execution mode
Installing Debian ARM under QEMU
In this post I will explain how to install Debian Armel under QEMU.
Well, there are various reasons to you have a ARM Linux distro inside a Virtual Machine. One of them would be to have a test environment to you validate your programs before to release to an embedded linux (ARM).
Debian was choosed because is the most supported ARM distro and you will have an compatible environment with your embedded system (eglibc).
Hey! Ho! Let’s go:
Well, there are various reasons to you have a ARM Linux distro inside a Virtual Machine. One of them would be to have a test environment to you validate your programs before to release to an embedded linux (ARM).
Debian was choosed because is the most supported ARM distro and you will have an compatible environment with your embedded system (eglibc).
Hey! Ho! Let’s go:
- Download a ARM kernel and a vmlinuz image under debian.org FTP site (I choosed squeeze/testing flavor):
wget http://ftp.debian.org/debian/dists/testing/main/installer-armel/current/images/versatile/netboot/vmlinuz-2.6.32-5-versatile wget http://ftp.debian.org/debian/dists/testing/main/installer-armel/current/images/versatile/netboot/initrd.gz
- Create a disk image (please, create a raw disk! It will be useful future):
qemu-img create -f raw debian.img 10G
- Start Debian image using qemu:
qemu-system-arm -m 256 -M versatilepb -kernel vmlinuz-2.6.32-5-versatile -initrd initrd.gz -hda debian.img -append "root=/dev/ram"
- After install Debian in the disk image, we will mount the contents of disk image:
sudo kpartx -av debian.img sudo mount /dev/mapper/loop1p1 ./mnt/ -o loopPS: I installed Debian with one only partition (/dev/sda1 is my root filesystem). Kpartx is needed because my disk image has 2 partitions (root filesystem and swap)
- Copy the initrd image and the kernel to your system (outside of mountpoint). These two files will be used to start our Debian installation:
cp ./mnt/boot/initrd.img . cp ./mnt/boot/vmlinuz-2.6.32-5-versatile .
- Now, we can start Debian image installed in the disk image:
qemu-system-arm -m 256 -M versatilepb -kernel vmlinuz-2.6.32-5-versatile -initrd initrd.img -hda debian.img -append "root=/dev/sda1"In the next posts I will talk about ARM architecture, toolchains, cross compilers and embedded linux. ;)
Peter Maydell 在2010年11月29日有一个解释
http://comments.gmane.org/gmane.comp.emulators.qemu/86388
‘versatilepb’ also supports only 256MB of RAM, for the
same reason (system registers starting at 0×10000000).
You might try one of the realview models, which have a
special case for putting more RAM at a high memory address.
same reason (system registers starting at 0×10000000).
You might try one of the realview models, which have a
special case for putting more RAM at a high memory address.
versatilepb 开发版也只支持256M 内存, 因为同样的原因(系统寄存器开始于 0×10000000), 你可以试试 realview模型,它可以将 更多的内存放置于高端地址
PARSEC
NOT RUN Benchmark:
ferret: can build, can run
raytrace: cannot build, need 32bit libXmu libX11 libGL libGLU
vips: cannot build, python2.6 cannot agree with LONG_BIT:
use a list to
ferret: can build, can run
raytrace: cannot build, need 32bit libXmu libX11 libGL libGLU
vips: cannot build, python2.6 cannot agree with LONG_BIT:
In file included from /usr/include/python2.6/Python.h:58,
from /local/tk/research/llvm-qemu/benchmarks/parsec-2.1/pkgs/libs/libxml2/src/python/libxml_wrap.h:2,
from /local/tk/research/llvm-qemu/benchmarks/parsec-2.1/pkgs/libs/libxml2/src/python/types.c:9:
/usr/include/python2.6/pyport.h:685:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
========================================================
All 13 benchmarks except vips, all can build successfully
we have run 8 benchmarks, still have 4 benchmarks to try
ferret, raytrace, x264, dedup,
raytrace, x264, OK
ferret and dedup cannot run
raytrace, x264, OK
ferret and dedup cannot run
use a list to
2012年4月23日 星期一
2012年4月19日 星期四
helper functions
8 $adc_cc
1991 $add_cc
71 $clz
885 $cpsr_read
1547 $cpsr_write
773 $exception
21 $get_cp15
8 $get_user_reg
36 $sar
44 $sbc_cc
122 $set_cp15
29 $set_user_reg
479 $shl
62 $shl_cc
191 $shr
8 $shr_cc
32183 $sub_cc
1 $wfi
訂閱:
文章 (Atom)