VCOS

Anything and everything about programming graphics with Ultibo
Gavinmc42
Posts: 1053
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

VCOS

Postby Gavinmc42 » Wed Jul 19, 2017 11:22 am

Chapter ? into understanding the Pi's.
Without all the register information it is a bit hard to figure out how to use the VC4 stuff.
That would be the lowest baremetal layer but in Raspbain there are many layers above that.
Eventually they maybe reverse engineered or documented.

These are called abstraction layers or obstruction layers for those who want to know the hardware.

The Videocore 4 runs a ThreedX real time operating system called vcos.
https://www.raspberrypi.org/forums/view ... 3&t=113850


Just need to understand everything here?
https://github.com/raspberrypi/userland.

To access the media stuff on the VC4 the MMAL, multi media abstraction layer is used.

https://www.raspberrypi.org/forums/view ... 1&p=846239
The RTOS on the GPU changed at one point which as you can imagine was painful. vcos helped with that)
This would explain some early VC code that ran the Nucleus OS and now runs ThreedX.
But does this mean the VCOS stuff is just another abstraction layer?

https://www.raspberrypi.org/forums/view ... s#p1184836
VCOS was developed as an abstraction layer to abstract away OS type functionality to a stadnard API that we could use in ThreadX, Linux and Windows (and others). Stands for VideoCore OS.

MMAL was developed as an 'easier' to use OpenMAX IL layer, stands for Multimedia Abstraction Layer IIRC.

AFAIK, the JPEG blocks register set has never been released. I think there is an non-OpenMAX API to it, but that only runs on the Videocore. You should check the bottom levels of the MMAL/OpenMAX JPEG components to see how it works. When someone comes in who knows about it I'll ask.
Confirmed, another obstruction layer :?

Any way clues on where to check, if this abstraction layer can be used does it need, does it still need those library .so, ,dll type files?

I'm really starting to hate finding myself having been here before
https://www.raspberrypi.org/forums/view ... s#p1130317

LK, Little Kernel, get that running on the VC4, replace the closed source ThreedX VCOS?
Interesting is the VC5 does look like it has a MMU, lack of a MMU is a reason Linux does not get ported to chips, ucLinux was invented for them ;)
Even if LK was got running, could it do the secret sauce stuff based on those undocumented registers and hardwareblocks?

If LK used the same abstraction layer as the ThreedX VC4 then some of the hardware stuff like jpeg could be done in NEON on a Pi 3?
Or not? So much to learn.

Anyway a link to baremetal camera stuff, which i have found before to.
https://www.raspberrypi.org/forums/view ... a#p1130143

So a search on VCOS has led to some interesting things, LK on the VC4 and baremetal camera.
LK on bcm28xx, might be worth a play :P
https://github.com/littlekernel/lk/tree/master/platform
Another QEMU use case?

Could Ultibo do this?
https://github.com/littlekernel/lk/tree/master/kernel
Next platform for Ultibo is the VC4/5? Is there anything Ultibo cannot do one day?

Videocore compilers, who makes them? any open source versions?
Google time.
User avatar
Ultibo
Site Admin
Posts: 1549
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: VCOS

Postby Ultibo » Thu Jul 20, 2017 12:34 am

Gavinmc42 wrote:The Videocore 4 runs a ThreedX real time operating system called vcos.
https://www.raspberrypi.org/forums/view ... 3&t=113850

But does this mean the VCOS stuff is just another abstraction layer?

You have to be careful when talking about VCOS because elements of it apply to both the VC4 and to the ARM.

From the Userland perspective (the ARM side) then VCOS is simply a set of wrappers that allow portability between operating systems, there is no "VCOS" operating system or subsystem as such, just a few C files that make porting easier by defining a standard interface for OS functions.

Take the function vcos_thread_create which is in vcos_pthreads.c, on Linux (and any other similar platform) this calls pthread_create but on Windows 10 IoT it calls CreateThread. That is what a wrapper layer should do, it is not about obstruction or stopping anyone from understanding, it is just the way things are written in order to be portable.

On the VC4 side I suspect things look very similar, the VCOS wrapper just abstracts the code away from whatever OS (or RTOS) is being used to run the VC4 itself.

Gavinmc42 wrote:Could Ultibo do this?
https://github.com/littlekernel/lk/tree/master/kernel

I'm not sure exactly what you mean, the LK readme says:
An SMP-aware kernel designed for small systems

Which is pretty much what Ultibo already does.

Gavinmc42 wrote:Next platform for Ultibo is the VC4/5?

You can write anything you want if you have enough time, information and skill. We won't be bothering anytime soon with supporting a platform that is very much non standard and only accessible via reverse engineering, there are simply many more important things to do ;)
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1053
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: VCOS

Postby Gavinmc42 » Thu Jul 20, 2017 2:49 am

We could hope LK is in the roadmap of RPF to replace the ThreedX stuff and is open sourced.
That would open the way to running Ultibo on the VC, but as Darryl says "tell em they're dreaming" ;)
It would be a nice "surprise" if LK can out on the VC5 for next gen Pi's

Yep VCOS is a half and half layer.

LK and or Ultibo would need to have a compiler for the VC, so one day it could be done after that.
But you are right, there is much easier stuff to do right now.

Just putting this here so in 6 months or one year I will google it and find it when I know more :lol:
Cannot trust my memory any more :(
Plus there is just stuff spread all over the net.
Hope to put links here as a reference
User avatar
Ultibo
Site Admin
Posts: 1549
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: VCOS

Postby Ultibo » Thu Jul 20, 2017 10:05 am

Gavinmc42 wrote:But you are right, there is much easier stuff to do right now.

I didn't say easier, just much more important ;)
Ultibo.org | Make something amazing
https://ultibo.org

Return to “Graphics”

Who is online

Users browsing this forum: No registered users and 1 guest