FPGA Source / Project Repository

Any technical questions about the Epiphany chip and Parallella HW Platform.

Moderator: aolofsson

Re: FPGA Source / Project Repository

Postby shodruk » Tue Jun 10, 2014 5:14 pm

That's great! Sorry, maybe I made a mistake. I'll try again.
Shodruky
shodruk
 
Posts: 464
Joined: Mon Apr 08, 2013 7:03 pm

Re: FPGA Source / Project Repository

Postby greytery » Tue Jun 10, 2014 6:09 pm

FHuettig wrote:Attached are the devicetrees I use currently for both headless and hdmi versions.



Fred,
I noticed that the device tree in the attached zip file sets the memory device at 512MB:-
Code: Select all
   memory {
      device_type = "memory";
      reg = <0x0 0x20000000>;
   };


Am I right (or wrong) in thinking that the top 512MB of DRAM is unavailable to the OS, and so reserved {edit, I mean} available for shared memory, (i.e. more than the current top 32MB).

tery
tery
User avatar
greytery
 
Posts: 205
Joined: Sat Dec 07, 2013 12:19 pm
Location: ^Wycombe, UK

Re: FPGA Source / Project Repository

Postby FHuettig » Wed Jun 11, 2014 3:50 pm

greytery wrote:I noticed that the device tree in the attached zip file sets the memory device at 512MB:-


Hi Tery,

That's interesting, I had not noticed that. I confess I've inherited those files and do not pretend to be an expert about their meanings, though you'd think that one was fairly obvious. However if I run "top" on my Parallela:

Code: Select all
op - 15:28:13 up 2 min,  2 users,  load average: 0.34, 0.24, 0.10
Tasks:  91 total,   1 running,  90 sleeping,   0 stopped,   0 zombie
%Cpu(s): 11.4 us,  5.9 sy,  0.0 ni, 82.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:    992452 total,   174204 used,   818248 free,    16072 buffers
KiB Swap:        0 total,        0 used,        0 free.    66844 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND     
 1820 root      20   0   46844  28076   4448 S  25.6  2.8   0:03.85 Xorg       
 2094 linaro    20   0  128556   9792   7156 S   2.0  1.0   0:01.64 pcmanfm     
 2162 linaro    20   0  104544  10636   7808 S   1.3  1.1   0:00.78 lxterminal 
 2170 linaro    20   0    4244   1192    864 R   1.3  0.1   0:00.39 top


It looks like the OS has discovered and is using the full 1GB (less some small reserved amount which I thought would be the frame buffer, but it's there on the headless versions too).

So I'm not sure what that devicetree entry is used for. :?: I'm sure someone can tell us.
-- Fred -- Hardware Guy --
FHuettig
 
Posts: 142
Joined: Wed Jan 29, 2014 8:30 pm
Location: Lexington, MA, USA

Re: FPGA Source / Project Repository

Postby greytery » Wed Jun 11, 2014 4:22 pm

My guess is that the 512MB is a left-over from the Zedboard time.

The 32MB of shared memory is at the top of the 1GB, but that leaves another 20+ MB unaccounted for.
I'm looking at increasing the amount of shared memory - I thought I understood the device tree mechanism. So the idea that the dts file already supported 512MB 'free' memory got me very excited there.

Note that shodruck's headless nano build @ http://elinux.org/Parallella_Linaro_Nano also shows the same amount of memory.

tery
tery
User avatar
greytery
 
Posts: 205
Joined: Sat Dec 07, 2013 12:19 pm
Location: ^Wycombe, UK

Re: FPGA Source / Project Repository

Postby tnt » Wed Jun 11, 2014 4:49 pm

AFAIR the memory layout is given by u-boot to the kernel directly with the device tree node being ignored.
tnt
 
Posts: 408
Joined: Mon Dec 17, 2012 3:21 am

Re: FPGA Source / Project Repository

Postby greytery » Wed Jun 11, 2014 6:07 pm

Ah ha! Thanks:

Found this at https://github.com/parallella/parallella-uboot/tree/parallella-gen1/include/configs/parallella.h

Code: Select all
ln 26: #define CONFIG_SYS_MEM_TOP_HIDE 0x2000000
tery
User avatar
greytery
 
Posts: 205
Joined: Sat Dec 07, 2013 12:19 pm
Location: ^Wycombe, UK

Re: FPGA Source / Project Repository

Postby greytery » Thu Jun 12, 2014 9:21 am

There seems to be an overlap between using the device tree and U-Boot, as far as defining how the board config information is fed to Linux.

Upstreaming U-Boot is being discussed at http://forums.parallella.org/viewtopic.php?f=48&t=932#p5995 and there is 'pressure' on Adapteva to sign off and include Parallella U-Boot in the mainstream. Before that's done can we look at what should be in there??
What should be in the Device Tree and what should be in the U-Boot config?

A recompilation of the U-Boot is not something to be taken lightly because that involves the official U-Boot Git repositories and we could soon end up with different boot builds. (Looking at what the U-Boot files includes, it seems it's on the road to World Domination :D )
OTOH, Device tree configs are meant to be flexible, and the purpose is to avoid having multiple kernel or boot builds. Any changes are local to Parallella/Adapteva - or the developer/customer/me. The more that can be moved to the Device Tree the better!

Some board parameters are 'Hard' / fixed while others are more 'Soft', e.g. Total physical memory (1 GB) is 'Hard' but the amount that is made available to the OS (32MB) is 'Soft'. There may be other parameters - but that's the one I'm currently interested in. (So why is that 'memory' device ignored/not effective??)

This is relevant to FPGA Source reorganisation: the capability to reconfigure FPGA means that there may be other 'Hard' config parameters that may be impacted. So I really do believe it's worth having a good look at this - before the U-Boot upstreaming takes place.

tery
tery
User avatar
greytery
 
Posts: 205
Joined: Sat Dec 07, 2013 12:19 pm
Location: ^Wycombe, UK

Re: FPGA Source / Project Repository

Postby tnt » Thu Jun 12, 2014 9:30 am

What other parameters are taken from u-boot beside the memory ? AFAIK it's the only one.
tnt
 
Posts: 408
Joined: Mon Dec 17, 2012 3:21 am

Re: FPGA Source / Project Repository

Postby greytery » Thu Jun 12, 2014 11:08 am

Back in the mists of time .... http://forums.parallella.org/viewtopic.php?f=9&t=396#p2358

It seems that the memory reservation was originally intended to be via the device tree, but it hit a snag. Seems a bug - or inconsistency - if the devicetree information is being ignored by bootm like this. Perhaps that's a penalty for using the universal boot loader. More RTFM'ing to do. Every day I'm jumping down yet another rabbit hole into Wonderland.

What other parameters ...? The parallella.h file defines various devices, such as ethernet. Maybe that's fine - I'm not knowledgeable enough. Nor do I know what the FPGA reprogramming is capable of. It just needs looking at by someone who actually knows what they're doing.

tery
tery
User avatar
greytery
 
Posts: 205
Joined: Sat Dec 07, 2013 12:19 pm
Location: ^Wycombe, UK

Re: FPGA Source / Project Repository

Postby tnt » Thu Jun 12, 2014 12:08 pm

greytery wrote:What other parameters ...? The parallella.h file defines various devices, such as ethernet.


Those are just options for u-boot to know what driver to enable for itself, like it needs its own ethernet / sdcard driver and stuff like that.
tnt
 
Posts: 408
Joined: Mon Dec 17, 2012 3:21 am

PreviousNext

Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 3 guests