Difference between revisions of "Unit VC4"

From Ultibo.org
Jump to: navigation, search
(Created page with "Return to Unit Reference === Description === ---- ''To be documented'' === Constants === ---- ''To be documented'' === Type definitions === ---- ''To...")
 
Line 5: Line 5:
 
----
 
----
  
''To be documented''
+
'''Ultibo Broadcom VideoCoreIV interface unit'''
 +
 
 +
The VideoCore IV (VC4) is the graphics processor (GPU) contained in the Broadcom BCM2835, 2836 and 2837 SoC used in all models of the Raspberry Pi.
 +
 
 +
The VC4 is made up of many subsystems that perform functions ranging from 2D and 3D graphics acceleration to hardware audio, video and image encoding and decoding as well as display and camera interfaces.
 +
 
 +
This unit provides common definitions, imports and support routines needed to enable all of the VC4 functionality for use in Ultibo. In addition to the functionality provided by this unit there are a number of drivers that implement specific parts of the control and communication such as VCHIQ, VCSM and VCCMA.
 +
 
 +
The majority of the interface between the ARM CPU and the VC4 GPU is contained with the userland libraries which are maintained by both Broadcom and Raspberry Pi. These have been ported to Ultibo and are provided
 +
as a series of static libraries that are included as required in order to expose the appropriate parts of the interface.
 +
 
 +
There is currently no intention to directly port these libraries to Pascal as they represent a vast and actively changing codebase, a direct port would offer no advantages and would require more maintenance
 +
than the current form.
 +
 
 +
For the available documentation of the functions supported by this unit please see:
 +
 
 +
* VideoCore APIs - http://elinux.org/Raspberry_Pi_VideoCore_APIs
 +
 
 +
* Raspberry Pi Userland - https://github.com/raspberrypi/userland
 +
 +
* VideoCore IV Documentation - https://docs.broadcom.com/docs/12358545
 +
 
 +
=== Building the Userland libraries ===
 +
----
 +
 
 +
'''Flags:'''
 +
 
 +
<code>__DYNAMIC_REENT__</code>
 +
 
 +
   
 +
'''Options:'''
 +
 
 +
''Raspberry Pi''
 +
 
 +
-mabi=aapcs
 +
-march=armv6
 +
-mcpu=arm1176jzf-s
 +
-mfpu=vfp
 +
-mfloat-abi=hard
 +
 
 +
''Raspberry Pi2/3 and QEMU VersatilePB (32-bit)''
 +
 
 +
-mabi=aapcs
 +
-marm
 +
-march=armv7-a
 +
-mfpu=vfpv3-d16
 +
-mfloat-abi=hard
 +
 
 +
''Raspberry Pi3 and QEMU VersatilePB (64-bit)''
 +
 
 +
-mabi=lp64 (Note: Supported only by later versions of GCC)
 +
-march=armv8-a
 +
   
 +
'''Build:'''
 +
 
 +
Download Userland from https://github.com/ultibohub/userland
 +
 
 +
Unpack to folder <code>$HOME/userland</code>
 +
 
 +
(or git clone https://github.com/ultibohub/userland.git)
 +
 +
 
 +
''Build ARMv6:''
 +
 
 +
cd
 +
 
 +
cd userland
 +
 
 +
export PATH=$HOME/gcc-arm-none-eabi-5_4-2016q2/bin:$PATH
 +
 
 +
./buildme.armv6-ultibo
 +
 
 +
 
 +
''Build ARMv7: ''
 +
 
 +
cd
 +
 
 +
cd userland
 +
 
 +
export PATH=$HOME/gcc-arm-none-eabi-5_4-2016q2/bin:$PATH
 +
 
 +
./buildme.armv7-ultibo
 +
 
 +
 +
''Build ARMv8:''
 +
     
 +
cd
 +
 
 +
cd userland
 +
 
 +
export PATH=$HOME/gcc-linaro-aarch64-none-elf-4.8-2014.04_linux/bin:$PATH
 +
 
 +
./buildme.armv8-ultibo
 +
 
 +
 +
'''Notes:'''
 +
 +
Building for 64-bit is not currently fully implemented and is not expected to work.
 +
 
 +
This is not an Ultibo limitation but applies to the original Linux version of the libraries as well.
  
 
=== Constants ===
 
=== Constants ===
 
----
 
----
  
''To be documented''
+
''Refer to the available documentation links above''
  
 
=== Type definitions ===
 
=== Type definitions ===
 
----
 
----
  
''To be documented''
+
''Refer to the available documentation links above''
  
 
=== Public variables ===
 
=== Public variables ===
 
----
 
----
  
''To be documented''
+
''Refer to the available documentation links above''
  
 
=== Function declarations ===
 
=== Function declarations ===
 
----
 
----
  
''To be documented''
+
''Refer to the available documentation links above''
  
  
 
Return to [[Unit_Reference|Unit Reference]]
 
Return to [[Unit_Reference|Unit Reference]]

Revision as of 06:16, 26 September 2017

Return to Unit Reference


Description


Ultibo Broadcom VideoCoreIV interface unit

The VideoCore IV (VC4) is the graphics processor (GPU) contained in the Broadcom BCM2835, 2836 and 2837 SoC used in all models of the Raspberry Pi.

The VC4 is made up of many subsystems that perform functions ranging from 2D and 3D graphics acceleration to hardware audio, video and image encoding and decoding as well as display and camera interfaces.

This unit provides common definitions, imports and support routines needed to enable all of the VC4 functionality for use in Ultibo. In addition to the functionality provided by this unit there are a number of drivers that implement specific parts of the control and communication such as VCHIQ, VCSM and VCCMA.

The majority of the interface between the ARM CPU and the VC4 GPU is contained with the userland libraries which are maintained by both Broadcom and Raspberry Pi. These have been ported to Ultibo and are provided as a series of static libraries that are included as required in order to expose the appropriate parts of the interface.

There is currently no intention to directly port these libraries to Pascal as they represent a vast and actively changing codebase, a direct port would offer no advantages and would require more maintenance than the current form.

For the available documentation of the functions supported by this unit please see:

Building the Userland libraries


Flags:

__DYNAMIC_REENT__


Options:

Raspberry Pi

-mabi=aapcs
-march=armv6
-mcpu=arm1176jzf-s
-mfpu=vfp
-mfloat-abi=hard
  

Raspberry Pi2/3 and QEMU VersatilePB (32-bit)

-mabi=aapcs
-marm
-march=armv7-a
-mfpu=vfpv3-d16
-mfloat-abi=hard
 

Raspberry Pi3 and QEMU VersatilePB (64-bit)

-mabi=lp64 (Note: Supported only by later versions of GCC)
-march=armv8-a
   

Build:

Download Userland from https://github.com/ultibohub/userland

Unpack to folder $HOME/userland

(or git clone https://github.com/ultibohub/userland.git)


Build ARMv6:

cd
  
cd userland
  
export PATH=$HOME/gcc-arm-none-eabi-5_4-2016q2/bin:$PATH
  
./buildme.armv6-ultibo
 
 

Build ARMv7:

cd
  
cd userland
  
export PATH=$HOME/gcc-arm-none-eabi-5_4-2016q2/bin:$PATH
  
./buildme.armv7-ultibo
  

Build ARMv8:

cd
  
cd userland
  
export PATH=$HOME/gcc-linaro-aarch64-none-elf-4.8-2014.04_linux/bin:$PATH
  
./buildme.armv8-ultibo


Notes:

Building for 64-bit is not currently fully implemented and is not expected to work.

This is not an Ultibo limitation but applies to the original Linux version of the libraries as well.

Constants


Refer to the available documentation links above

Type definitions


Refer to the available documentation links above

Public variables


Refer to the available documentation links above

Function declarations


Refer to the available documentation links above


Return to Unit Reference