ARM with Qemu

Nicolas VARONA nvarona at pactenovation.fr
Mon Mar 16 10:41:21 CET 2015


Hi Adam,

>FPU support also needs to be enabled in Fiasco. I suppose it is?

I had already enabled FPU in Fiasco like this:
#
# Target configuration
#
[...]
CONFIG_FPU=y
# CONFIG_ARM_CPU_ERRATA is not set
[...]

>This looks ok. So it's something different.

I also checked if the VFP is enabled on the Zynq board and I added those instructions in the u-boot accordingly to the ARM datasheet:
MRC  p15,0,r0,c1,c0,2 
ORR  r0,r0,#(3<<20)
ORR  r0,r0,#(3<<22)   
BIC  r0, r0, #(3<<30)
MCR  p15,0,r0,c1,c0,2   
ISB  
MOV  r0,#(1<<30)
VMSR FPEXC,r0

MRC  p15,0,r0,c1,c0,2 

MOV r3, #0x300000
STR  r0, [r3]
I checked the CPACR register and the bits look ok. VFP is also enabled on the board. So you are right, it seems to be something else.

>Which ramdisk are you using?

I use the ramdisk given in the files in the l4re-snapshot-2014092821: "ramdisk-arm.rd"

>Do you have the 'log = L4.Env.log' statement in the script for launching L4Linux?
>Do not start anything else which uses 'log = L4.Env.log'.

I firstly tested adding this log without commenting the others. I don't have inputs on L4linux with Qemu. So I tried with only the 'log = L4.Env.log'. I have the same result with no input and I still can enter into the JDB.
This is the "l4lx.cfg" file I used:
-- vim:set ft=lua:

local lxname = "vmlinuz";
if L4.Info.arch() == "arm" then
  lxname = "vmlinuz.arm";
end

L4.default_loader:start(
  { caps = {
      --log = L4.Env.log:m("rws"),
    },
    l4re_dbg = L4.Dbg.Warn,
    --log = { "l4linux", "yellow" },
    log = L4.Env.log,
  },
  "rom/" .. lxname .. " mem=64M console=ttyLv0 l4x_rd=rom/ramdisk-" ..  L4.Info.arch() .. ".rd root=1:0 ramdisk_size=4000");

>What is Linux telling us about ttyLv0?

During the boot with the configuration file I gave you, I can see:
[...]
ttyLv0 at MMIO 0x1 (irq = 211, base_baud = 230400) is a L4
[...]

Thanks in advance for your help,

Nicolas


-----Message d'origine-----
De : l4-hackers [mailto:l4-hackers-bounces at os.inf.tu-dresden.de] De la part de Adam Lackorzynski
Envoyé : lundi 16 mars 2015 00:21
À : l4-hackers at os.inf.tu-dresden.de
Objet : Re: ARM with Qemu

Hi,

On Wed Mar 11, 2015 at 15:59:09 +0100, Nicolas VARONA wrote:
> >  It segfaults when executing init. One common reason is that VFP
> support is missing in Linux. Strike?
> 
> Sorry for answering so late, but I am still looking if it's a problem of
> the board's hardware configuration. Nonetheless, when I told you the
> panic, I had already enabled the VFP this way:
> [...]
> #
> # At least one emulation must be selected
> #
> CONFIG_FPE_NWFPE=y
> # CONFIG_FPE_NWFPE_XP is not set
> # CONFIG_FPE_FASTFPE is not set
> CONFIG_VFP=y
> CONFIG_VFPv3=y
> CONFIG_NEON=y
> # CONFIG_KERNEL_MODE_NEON is not set (no change even if it's set or not)
>  
> Is that correct or do I forget something? I am wondering something: Does

This looks ok. So it's something different.

> l4linux automatically enable FPU on the board's boot when it's enabled
> in the l4linux configuration? 

FPU support also needs to be enabled in Fiasco. I suppose it is?
Which ramdisk are you using?

> > I think I found it. A hacky fix/workaround is to add the following
> line to >the beginning of >out_char() in src/lib/uart/uart_cadence.cc:
> >     _regs->write<unsigned>(ISR, IXR_RXOVR);
> 
> Thanks for your help and great work! This was the problem. I have added
> the line and compiled the Fiasco: 
> Ned says: Hi World!
> Ned: loading file: 'rom/hello.cfg'
> Press some key: l
> Your input: l (108)
> Enter a number: 
> 4
> Your number is: 4
> 
> The l4 bare metal application works. Nonetheless I tried to compile the
> l4linux with the change in the fiasco and I have still no input in Qemu.
> Is it the same issue for l4linux?

Do you have the 'log = L4.Env.log' statement in the script for launching
L4Linux? What is Linux telling us about ttyLv0? Do not start anything
else which uses 'log = L4.Env.log'.



Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/

_______________________________________________
l4-hackers mailing list
l4-hackers at os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers



More information about the l4-hackers mailing list