msperl
Posts: 344
Joined: Thu Sep 20, 2012 3:40 pm

Complete VideoCore Register map extracted from GPU sources

Wed Mar 05, 2014 10:23 am

Hi!

Just want to let you know that I have converted the headers from the Broadcom GPU source code
into a (hopefully) more readable html page.

It should be mostly complete as it contains everything that is defined in the sources headers...

And it contains interesting register ranges called:
  • SD - for SDRAM
  • L1 - for Level 1 cache
  • L2 - for Level 2 cache
  • H264 - for the H264 encoder/devoder i assume
  • FPGA - this sounds interesting
Here the generated html page:
https://rawgithub.com/msperl/rpi-regist ... sters.html

and the full project including the scripts which were used to generate it:
https://github.com/msperl/rpi-registers

The intention is also to create a markdown version in addition to the html version, which then could get modified with additional information...

Not sure where the final destination of this information should go.
elinux wiki or stay on github,...

Enjoy, Martin

msperl
Posts: 344
Joined: Thu Sep 20, 2012 3:40 pm

Re: Complete VideoCore Register map extracted from GPU sourc

Wed Mar 05, 2014 12:13 pm

OK - the (github) markeddown version has also been created.

dwelch67
Posts: 955
Joined: Sat May 26, 2012 5:32 pm

Re: Complete VideoCore Register map extracted from GPU sourc

Thu Mar 06, 2014 1:02 am

how do we get this info into that tagged item at the top of the bare metal forum page?

msperl
Posts: 344
Joined: Thu Sep 20, 2012 3:40 pm

Re: Complete VideoCore Register map extracted from GPU sourc

Thu Mar 06, 2014 8:37 am

I tried to get the sticky thread updated to get the errata (http://elinux.org/BCM2835_datasheet_errata) also linked - that did not happen either...

I believe we should get it on a wiki for easier maintenance first.

Which wiki? elinux maybe?

Also what would be the ideal fields we should provide per register?
I guess it would help if we would add some table columns and other subsections for each register.
(also the alignment of columns)
I already tried to get it into a format that is already similar to the Periphery document - or at least as far as we go.

That way we would minimize the manual post-processing and have a framework ready where people would fill in the
essential data.

What are your thoughts?

msperl
Posts: 344
Joined: Thu Sep 20, 2012 3:40 pm

Re: Complete VideoCore Register map extracted from GPU sourc

Thu Mar 06, 2014 12:52 pm

OK, I have created a Media Wiki transform as well and added its output to elinux wiki.
Most specifically: http://elinux.org/BCM2835_registers

Please add comment on any register that you know about and which is not documented in the Broadcom document.

krom
Posts: 61
Joined: Wed Dec 05, 2012 9:12 am
Contact: Website

Re: Complete VideoCore Register map extracted from GPU sourc

Sun Mar 09, 2014 5:08 pm

Hi msperl,

Thanks so much for your work in providing a neat list of Raspberry Pi registers, this is helping me and others out loads, and is what I wanted on day 1 of getting my R-Pi =D

I also found something else in my quest of getting the V3D registers to work in bare metal, that might help other people trying to work there way thru the new sources...
I found a website that links up all the functions etc. from the Brcm Android ICS Graphics Stack source in a web based viewer: http://www.fangfufu.co.uk/~fangfufu/brc ... unc_v.html

Thought I would share with anyone else that wanted an easy way to traverse thru the sources to make use of your wonderful register list =D

User avatar
Arjan
Posts: 262
Joined: Sat Sep 08, 2012 1:59 pm

Re: Complete VideoCore Register map extracted from GPU sourc

Sat Mar 15, 2014 4:39 pm

Hi msperl,

Thanks, this is great! Thank you.

I would be great if we can generate a bcm2835.h file from the GPU sources with defines as given in the examples below.

Thanks, Arjan

Code: Select all

#ifdef __cplusplus
#define		__I		volatile		///< defines 'read only' permissions
#else
#define		__I		volatile const	///< defines 'read only' permissions
#endif
#define		__O		volatile		///< defines 'write only' permissions
#define		__IO	volatile		///< defines 'read / write' permissions

Code: Select all

typedef struct {
	__IO uint32_t CS;		///< 0x00	System Timer Control/Status 
	__IO uint32_t CLO;		///< 0x04	System Timer Counter Lower 32 bits
	__IO uint32_t CHI;		///< 0x08	System Timer Counter Higher 32 bits
	__I uint32_t  C0;		///< 0x0C	System Timer Compare 0.  DO NOT USE; is used by GPU.
	__IO uint32_t C1;		///< 0x10	System Timer Compare 1
	__I uint32_t  C2;		///< 0x14	System Timer Compare 2.  DO NOT USE; is used by GPU.
	__IO uint32_t C3;		///< 0x18	System Timer Compare 3
} BCM2835_ST_TypeDef;

Code: Select all

#define BCM2835_PERI_BASE			0x20000000
#define BCM2835_ST_BASE				(BCM2835_PERI_BASE + 0x3000)

Code: Select all

#define BCM2835_ST					((BCM2835_ST_TypeDef *)   BCM2835_ST_BASE)

Code: Select all

#define BCM2835_ST_CS_M0		((uint32_t)(1 << 0))	///<
#define BCM2835_ST_CS_M1		((uint32_t)(1 << 1))	///<
#define BCM2835_ST_CS_M2		((uint32_t)(1 << 2))	///<
#define BCM2835_ST_CS_M3		((uint32_t)(1 << 3))	///<
http://www.raspberrypi-dmx.org/
Open Source DMX/RDM/MIDI/OSC/Art-Net/sACN solutions

msperl
Posts: 344
Joined: Thu Sep 20, 2012 3:40 pm

Re: Complete VideoCore Register map extracted from GPU sourc

Sun Mar 16, 2014 5:20 pm

Take the source of the perl-script provided on git-hub and add the transform of your choice (besides the existing ones to html, wikimedia and markdown)

Martin

Return to “Bare metal, Assembly language”