Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jun 2015 16:59:09 +0300
From:      Mihai Carabas <mihai.carabas@gmail.com>
To:        freebsd-arm@freebsd.org
Subject:   porting freebsd-arm on FastModels - CortexA15
Message-ID:  <CANg1yUt%2BfaNUyJre66Q4DESPVTemviEPAG8eFCExw=avfdq-TQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello,

My name is Mihai Carabas and I am a GSoC student this year on porting bhyve
over ARM. Right now I'm working on booting FreeBSD ARM on an CortexA15
emulated platform running with FastModels.

I have two problems until now:

a) I used the DTS from sys/gnu/dts/arm/vexpress-v2p-ca15-tc1.dts and I
build the FDT directly in the kernel. I have a problem with the address
calculated for the serial0 console.

The DTB parser selects the first range from the bus:
228 >------->-------ranges = <0 0 0 0x08000000 0x04000000>,
229 >------->------->------- <1 0 0 0x14000000 0x04000000>,
230 >------->------->------- <2 0 0 0x18000000 0x04000000>,
231 >------->------->------- <3 0 0 0x1c000000 0x04000000>,
232 >------->------->------- <4 0 0 0x0c000000 0x04000000>,
233 >------->------->------- <5 0 0 0x10000000 0x04000000>;

The valid range for this platform is the entry starting with 3 (the console
is mapped at address 0x1c090000). But the parser ellects the first range.

The console is declared like this (as a child to iofpga root node):
 68 >------->-------iofpga@3,00000000 {
 69 >------->------->-------compatible = "arm,amba-bus", "simple-bus";
 70 >------->------->-------#address-cells = <1>;
 71 >------->------->-------#size-cells = <1>;
 72 >------->------->-------ranges = <0 3 0 0x200000>;
........
156 >------->------->-------v2m_serial0: uart@090000 {
157 >------->------->------->-------compatible = "arm,pl011",
"arm,primecell";
158 >------->------->------->-------reg = <0x090000 0x1000>;
159 >------->------->------->-------interrupts = <5>;
160 >------->------->------->-------clocks = <&v2m_oscclk2>, <&smbclk>;
161 >------->------->------->-------clock-names = "uartclk", "apb_pclk";
162 >------->------->-------};

As you can see the iofgpa selects the chip number 3, which is ok, but the
final address computed by the FreeBSD parser isn't. Any thoughts on this?

b) To force the things, I've delete the other ranges, and just let the
0x1c000000. Until now I've managed to get to message buffer initialization
in initarm. If I initialize the message buffers (in particular
set msgbufmapped = 1;), the next printf is being trashed: it prints only
the first letter and than the 's' char for a couple of times and than it
gets into a data abort exception. It seems that the message buffer gets
corrupted. I've checked the memory allocated and mapped for the message
buffer (msgbufp in initarm [pmap_new]) and is ok. Are there other parts of
the machine dependent code that could affect the message buffer?

If I don't initialize the message buffer it goes further without any
problems, ending up in the mi_startup and about the end.

Thank you,
Mihai



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANg1yUt%2BfaNUyJre66Q4DESPVTemviEPAG8eFCExw=avfdq-TQ>