Go to advanced search

by LdB
Wed Nov 22, 2017 3:39 am
Forum: Bare metal
Topic: v3d Thread 1 won't execute... VCD is idle?
Replies: 13
Views: 383

Re: v3d Thread 1 won't execute... VCD is idle?

Again I only have limited knowledge of how the tiler works just like you. I just followed the code in Eric's drm driver and it has these comments. From what I gleen from it that buffer becomes tile state buffer per bin in the overflow https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/vc4...
by LdB
Tue Nov 21, 2017 7:42 pm
Forum: Bare metal
Topic: v3d Thread 1 won't execute... VCD is idle?
Replies: 13
Views: 383

Re: v3d Thread 1 won't execute... VCD is idle?

Dam thought I had it :-( Update: No that is the problem I am sure of it. Why you are getting 12 is you use this MAX_TILE_WIDTH*MAX_TILE_HEIGHT*TILE_BIN_BLOCK_SIZE I was thinking it was just bin width * height .. but you multiple x32 (TILE_BIN_BLOCK_SIZE) I am telling you it needs to be a lot bigger ...
by LdB
Tue Nov 21, 2017 7:34 pm
Forum: Bare metal
Topic: v3d Thread 1 won't execute... VCD is idle?
Replies: 13
Views: 383

Re: v3d Thread 1 won't execute... VCD is idle?

I found your problem in your code .. // Tile_Binning_Mode_Configuration addbyte(&p, 112); addword(&p, (uint32_t)TileBin ); addword(&p, sizeof(TileBin) ); /* No extra space ... needs extra space */ addword(&p, (uint32_t)TileState ); addbyte(&p, TileWidth); addbyte(&p, TileHeight); uint8_t Flags = AUT...
by LdB
Tue Nov 21, 2017 6:51 pm
Forum: Bare metal
Topic: v3d Thread 1 won't execute... VCD is idle?
Replies: 13
Views: 383

Re: v3d Thread 1 won't execute... VCD is idle?

You probably notice I carry two addresses for every buffer a GPU locked one and the ARM reduction of that value so I don't confuse myself. It's this gap that is the memory space I was talking about #define BUFFER_TILE_DATA 0x6000 #define BUFFER_RENDER_CONTROL 0x1e200 The size I used is 0x18200 and y...
by LdB
Tue Nov 21, 2017 1:59 pm
Forum: Bare metal
Topic: v3d Thread 1 won't execute... VCD is idle?
Replies: 13
Views: 383

Re: v3d Thread 1 won't execute... VCD is idle?

Perhaps the GPU thinks it's okay to just write relative to (ie, past) the bin allocations if nothing else has been allocating GPU memory, and assumes any address I give it is in the GPU side... then again, GPU memory is surely dictated by the PI, not by videocore? There is a memory control on the G...
by LdB
Tue Nov 21, 2017 5:27 am
Forum: Bare metal
Topic: v3d Thread 1 won't execute... VCD is idle?
Replies: 13
Views: 383

Re: v3d Thread 1 won't execute... VCD is idle?

Not sure your memory allocation worries me because you didn't lock it to the QPU from what you describe. I assume it's important because Eric Anholt does it in his samples so I just followed. In my sample when I started to rotate a large model (The default diskimg sample is a biplane with 12,000 fac...
by LdB
Mon Nov 13, 2017 6:57 am
Forum: Bare metal
Topic: Framebuffer ain't working on rpi zero :(
Replies: 7
Views: 396

Re: Framebuffer ain't working on rpi zero :(

I am guessing the optimizer is deciding nothing is used because you have the addr allocation inside the loop. The Printf is probably stopping it being optimized away Add a volatile to stop the optimizer and drag the allocation outside the for loop so its a lot quicker and you can use the a C array t...
by LdB
Sun Nov 05, 2017 3:39 pm
Forum: Bare metal
Topic: Eclipse or other dev env, for cm3 written in assembly
Replies: 4
Views: 387

Re: Eclipse or other dev env, for cm3 written in assembly

Lets start with the basics, you can't transfer any x86 assembly on any system on the arm it's a totally different opcode set. So that is a drop dead. You can compile code on Visual Studio 2017 and Eclipse via external compiler and debugger options on windows to the Pi. That includes both C/C++ and a...
by LdB
Wed Nov 01, 2017 2:21 pm
Forum: Bare metal
Topic: Using Registers on Ripi3 to load base GPIO Address
Replies: 2
Views: 389

Re: Using Registers on Ripi3 to load base GPIO Address

Can anyone provide me with an example of how to load GPIO18 and then turn it on, then off, and do this 3 times? I learn usually by example and if anyone can help me, I'd greatly appreciate it. If I need to use mmap to write to dev/mem that is fine. I am just not really sure how to go about doing th...
by LdB
Wed Oct 25, 2017 5:16 am
Forum: Bare metal
Topic: Bare-Metal Programming on RPi3
Replies: 11
Views: 2999

Re: Bare-Metal Programming on RPi3

So I downloaded the code for tutorial 6 from that site and I am not sure what is going with that tutorial, perhaps it is really old the structure is strange. Corrected the tutorial as best I can https://github.com/LdB-ECM/Exchange/tree/master/screen01 You should get this on screen the lines walk aro...
by LdB
Wed Oct 25, 2017 3:34 am
Forum: Bare metal
Topic: RPI2 - Booting from 0 with kernel_old=1
Replies: 4
Views: 532

Re: RPI2 - Booting from 0 with kernel_old=1

But for now, do I need the FPU in it when I even don’t use it ? As long as you stay in assembler it would be okay but if you call out to any C/C++ code the compiler will almost certainly use it the moment it gets a multiply of size or structures that it can't do as simple shifts or adds. Of that co...
by LdB
Tue Oct 24, 2017 3:27 pm
Forum: Bare metal
Topic: RPI2 - Booting from 0 with kernel_old=1
Replies: 4
Views: 532

Re: RPI2 - Booting from 0 with kernel_old=1

Couple of obvious things, you haven't set any stack pointer on any core or enabled the FPU from what I can work out.

You try to use anything like printf to output to UART it will go bang.
by LdB
Tue Oct 24, 2017 5:15 am
Forum: C/C++
Topic: Cross compile and add another library
Replies: 6
Views: 560

Re: Cross compile and add another library

What problem are you having on Windows it's pretty straight forward 1) install the windows cross compiler (Can be official 4.8 or newer 6.x or 7.1x) 2) install the make system you want to use (I use GNU Make 3.81 from http://gnuwin32.sourceforge.net/packages/make.htm) 3) Edit the enviroment variable...
by LdB
Tue Oct 24, 2017 2:26 am
Forum: Bare metal
Topic: Bare-Metal Programming on RPi3
Replies: 11
Views: 2999

Re: Bare-Metal Programming on RPi3

His code is correct, your address is correct I suspect what you need to know is the GPU address is different. On the Pi1 the alias offset to turn an ARM address to GPU is 0x40000000, On the Pi3 it is 0xC0000000. So this line is incorrect on a Pi3 1. Write the address of FrameBufferInfo + 0x40000000 ...
by LdB
Sun Oct 22, 2017 3:36 pm
Forum: Bare metal
Topic: My doubts in understanding baremetal
Replies: 21
Views: 2043

Re: My doubts in understanding baremetal

But regulatory data may change and you may be responsible to keep it up-to-date. There could also be programming errors which may cause the regulations to be injured. Nope the module has a special mode where it throws out the maxium it can possibly do no matter code you send at it. If you doubt my ...
by LdB
Sun Oct 22, 2017 2:09 pm
Forum: Bare metal
Topic: My doubts in understanding baremetal
Replies: 21
Views: 2043

Re: My doubts in understanding baremetal

"sev" call[/url] included, which is required for recent firmwares. So this is not old stuff. The sev only wakes the core up it isn't related to using or not using the hardware register, so you sort of confused me there. I was talking about the mailbox hardware use in linux. You mean, because the lo...
by LdB
Sun Oct 22, 2017 7:20 am
Forum: Bare metal
Topic: My doubts in understanding baremetal
Replies: 21
Views: 2043

Re: My doubts in understanding baremetal

Local Mailbox 0 can be used in Linux to send an Inter-Processor-Interrupt (IPI) from one core to another. You can use this, if one core wants another core to do something else. This is implemented here , but I don't know if it is actively used in the kernel. I'm using this in Circle to halt all cor...
by LdB
Sat Oct 21, 2017 4:20 pm
Forum: Bare metal
Topic: My doubts in understanding baremetal
Replies: 21
Views: 2043

Re: My doubts in understanding baremetal

SteveD if you have feel we are missing something then explain away, I have simply shown you what I have learned about the ARM hyperthread behaviour. David has already stated the cores have a WFI instruction, which can be used to hook the cores up in interrupt mode. It is easy to setup that sample to...
by LdB
Fri Oct 20, 2017 3:59 am
Forum: Bare metal
Topic: SD /WIFI question
Replies: 0
Views: 486

SD /WIFI question

Okay just trying to get the WIFI working on baremetal and looking at the new SD driver and reading the comments https://github.com/torvalds/linux/blob/master/drivers/mmc/host/bcm2835.c Now I knew there were 2 SD controllers but I thought the ARM had one the GPU the other for it's initial loading. I ...
by LdB
Thu Oct 19, 2017 5:30 pm
Forum: Bare metal
Topic: My doubts in understanding baremetal
Replies: 21
Views: 2043

Re: My doubts in understanding baremetal

To make the last point blunt https://github.com/LdB-ECM/Exchange/tree/master/Multicore One hyperthreading sample using some random data memory address as the spinlock mailbox 0000d1c4 d Core0Spin 0000d1c8 d Core1Spin 0000d1cc d Core2Spin 0000d1d0 d Core3Spin I didn't even choose the address I just p...
by LdB
Thu Oct 19, 2017 3:33 pm
Forum: Bare metal
Topic: My doubts in understanding baremetal
Replies: 21
Views: 2043

Re: My doubts in understanding baremetal

So you know for your future learning @LdB, there is no GPU on other side of mailbox at 0x40000000, take care when reading documents. I understand what you are saying but you are splitting hairs it controls things like the IRQ's to the GPU. Are signal lines like the IRQ part of the GPU or part of pe...
by LdB
Wed Oct 18, 2017 12:54 pm
Forum: Bare metal
Topic: My doubts in understanding baremetal
Replies: 21
Views: 2043

Re: My doubts in understanding baremetal

Most start with single core programming ... multicore is an advanced topic :-) I would also say we give you working samples to follow. You still have a couple of big issues to go you haven't got the FPU online at the moment a problem that will quickly bite if you try to do any maths ... big warning ...
by LdB
Wed Oct 18, 2017 12:39 pm
Forum: Bare metal
Topic: My doubts in understanding baremetal
Replies: 21
Views: 2043

Re: My doubts in understanding baremetal

In talking to sanasrikar there is something I don't specifically know so lets throw it out there because some of you guys have done a lot more with the core IPC. https://www.raspberrypi.org/documentati ... rev3.4.pdf Page 7 and 8 0x4000_008C Core 0 Mailbox 3 write - set (WO) 0x4000_00CC Core 0 Mailb...
by LdB
Wed Oct 18, 2017 12:10 pm
Forum: Bare metal
Topic: My doubts in understanding baremetal
Replies: 21
Views: 2043

Re: My doubts in understanding baremetal

You have been told this multiple times except item 4 which probably has never been discussed because it's not often used. 1.) The ARM processor by default would start at 0x0000 go and look at the ARM processor datasheets 2.) So if the CPU is being given to you at 0x8000 (or 0x80000 on AARCH64) it ha...
by LdB
Tue Oct 17, 2017 6:42 pm
Forum: Bare metal
Topic: my act ok led is not blinking i dont where the error is
Replies: 3
Views: 526

Re: my act ok led is not blinking i dont where the error is

I think this is what you are trying to do ... I had to setup the Pi message mailbox ... you can work thru the changes https://github.com/LdB-ECM/Exchange/tree/master/led_blink You had a major foulup in this loop .. look at your current one and compare to what I did .. you killed register R2 loop_in_...

Go to advanced search