bzt
Posts: 374
Joined: Sat Oct 14, 2017 9:57 pm

Raspberry Pi 4

Mon Jun 24, 2019 6:36 pm

Hi Guys,

This is so cool https://www.raspberrypi.org/blog/raspbe ... w-from-35/
It looks like almost all my wishes come true :-) ARMv8a (note the "a"), 4G RAM, super fast USB3, PCIe, and finally the legacy VC dropped, and Raspbian switched to Mesa! It is time for me to finally start playing with 3D on Rpi!

The page says that new RPi is not BCM283x any more, as it's built around the BCM2711 SoC. We even got a preliminary data sheet https://github.com/raspberrypi/document ... pi/bcm2711. This is awesome, but is there any news when can we put our hands on a full peripheral documentation? I'm really interested!!! Are there many differences? Or does BCM2711 affect mostly the production line with 28nm, and the API and MMIOs mostly remained the same as in BCM2837? What about the QA7 MMIO which was specific to the BCM2836-7? This is so exciting, like the fist day at school :-D

I think the RPi team well deserve a "well done, excellent work"!
bzt

okenido
Posts: 57
Joined: Thu Aug 02, 2018 11:47 am

Re: Raspberry Pi 4

Mon Jun 24, 2019 7:55 pm

I'm also interested into this... super excited by this new raspberry, but I have already my product developed in bare metal around the RPI 3, wondering how hard it would be to support the new SoC.
I guess the ARM core isn't that much different but I'm more worried about the peripherals.

timanu90
Posts: 65
Joined: Sat Dec 24, 2016 11:54 am

Re: Raspberry Pi 4

Mon Jun 24, 2019 9:33 pm

My hopes are very high. I didn't had a chance to look into linux code, but I saw a comment from a guy on internet stating that the main interrupt controller is now a standard gic-400 rather than their own thing.

This was my wish :D

StevoD
Posts: 28
Joined: Tue Aug 29, 2017 11:37 am

Re: Raspberry Pi 4

Tue Jun 25, 2019 12:51 am

bzt wrote:
Mon Jun 24, 2019 6:36 pm
and finally the legacy VC dropped, and Raspbian switched to Mesa! It is time for me to finally start playing with 3D on Rpi!
Why exactly would you wish for that, you just got locked in to Linux. It had already been shown that bare metal opengl using the VC4 was a reality and now the only way to do real hardware accellerated graphics (not just some stupid triangle example) will be by trying to make the huge Mesa3D thing and all of its DRM and so on compile and run in bare metal.

LdB
Posts: 1171
Joined: Wed Dec 07, 2016 2:29 pm

Re: Raspberry Pi 4

Tue Jun 25, 2019 10:05 am

Hey apparently I know nothing but I find it an interesting concept that you will be locked to Linux, on a board that full Windows 10 runs on and Microsoft will do a Direct3D driver and shaders. They tried doing it for the Videocore IV but it was to dorked for them to support. Personally all I will do is follow there code in it is unlikely I will even look at the linux code ... but hey I love doing it wrong.

gothicknight
Posts: 3
Joined: Fri Oct 07, 2011 9:29 am
Location: Portugal

Re: Raspberry Pi 4

Tue Jun 25, 2019 10:44 am

I'm expecting to receive my rpi4 today so I can start porting my baremetal RTOS into it. Its going to be fun :D

LdB
Posts: 1171
Joined: Wed Dec 07, 2016 2:29 pm

Re: Raspberry Pi 4

Tue Jun 25, 2019 12:12 pm

Hehe enjoy mines a day or 2 away .. good luck and post us trials and tribulations.

bzt
Posts: 374
Joined: Sat Oct 14, 2017 9:57 pm

Re: Raspberry Pi 4

Tue Jun 25, 2019 2:25 pm

Hi All,

@okenido: I'm very curious if A72 supports the atomic operations, like LDSET for example and the other extensions, like SHA, AES etc. I'm waiting for those so that my bootloader can boot encrypted initrds with decent speed.

@timanu90: really? I've missed that info. That sounds great, I can finally write interrupt controller code that would work on many ARM boards! One big plus and thank you for the RPi engineers!

@StevoD: but Mesa is much more Open Source, is a much more widespread standard, and I can port the VC VI Linux driver instead of messing around with RPi specific code and proprietary binary blobs (I know we haven't get rid of those entirely). It was always my plan to port Mesa to my bare metal app, but I didn't wanted to implement special code for the RPi as I did with the interrupt controller. But you're right, if portability is not an issue, then Mesa just complicates things.

@LdB: :-D

I admit I'm jealous of you guys... Here in my country you can't buy it yet. There are many ads of course, but when you click on them and go to the official reseller's webshop, RPi3B+ is the newest model to choose. :-( Hopefully in a week I can order too!

Cheers,
bzt

User avatar
Ultibo
Posts: 158
Joined: Wed Sep 30, 2015 10:29 am
Location: Australia
Contact: Website

Re: Raspberry Pi 4

Wed Jun 26, 2019 12:04 am

bzt wrote:
Tue Jun 25, 2019 2:25 pm
Here in my country you can't buy it yet. There are many ads of course, but when you click on them and go to the official reseller's webshop, RPi3B+ is the newest model to choose. :-( Hopefully in a week I can order too!
There seems to be a fairly long delay in Australia too, major suppliers are quoting September for availability of the 2GB and 4GB models.

We're waiting on a 1GB version that we ordered from one of the few suppliers who had them "in stock" on release day but there is no indication of when it will ship as yet.
Ultibo.org | Make something amazing
https://ultibo.org

Threads, multi-core, OpenGL, Camera, FAT, NTFS, TCP/IP, USB and more in 3MB with 2 second boot!

lpoulain
Posts: 24
Joined: Mon May 20, 2019 12:35 am

Re: Raspberry Pi 4

Wed Jun 26, 2019 1:44 am

@bzt, @LdB,

If that is OK with you, I would like to buy a RPi 4 for each of you. Not only both of you have great Rapsberry Pi tutorials on GitHub, but you seem to be two of the most prolific contributors on this forum.

If you have a PayPal account I can send you the money (if you promise to use it to buy a RPi 4 ;-) )

User avatar
Gavinmc42
Posts: 3431
Joined: Wed Aug 28, 2013 3:31 am

Re: Raspberry Pi 4

Wed Jun 26, 2019 2:25 am

For the Ozzies, these guys have not let me down, still some in stock?
Mine has shipped and should show up tomorrow :D
https://core-electronics.com.au/raspber ... b-1gb.html
I am not connected to them except as a happy customer.

4B1 is good enough for learning baremetal?
Hopefully by the time the next(first) batch of the 4B4's gets downunder, we can have some results.

Eben made a comment of two screens, two mice, two keyboards.
Trying to get my head around doing that in baremetal.
A 4B4 as development box with two of everything should speed up coding.

Edit - wow just made it cheaper for schools, two kids, one Pi :o
Will there be fights over the GPIO pins :lol:

Edit 2- it showed up today, so leaving early, it is calling me. :D
Last edited by Gavinmc42 on Wed Jun 26, 2019 8:23 am, edited 1 time in total.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

LdB
Posts: 1171
Joined: Wed Dec 07, 2016 2:29 pm

Re: Raspberry Pi 4

Wed Jun 26, 2019 4:44 am

lpoulain wrote:
Wed Jun 26, 2019 1:44 am
@bzt, @LdB,

If that is OK with you, I would like to buy a RPi 4 for each of you. Not only both of you have great Rapsberry Pi tutorials on GitHub, but you seem to be two of the most prolific contributors on this forum.

If you have a PayPal account I can send you the money (if you promise to use it to buy a RPi 4 ;-) )
Haha thanks for offer but I get mine for free anyhow ... work pays for my toys.

I am time poor at the moment I am playing around with a NanoPi Fire3 getting it blinking etc
The only plus from that is from what has been said the Pi4 loader sounds similar

okenido
Posts: 57
Joined: Thu Aug 02, 2018 11:47 am

Re: Raspberry Pi 4

Wed Jun 26, 2019 8:40 am

Dunno why in 2019 GPU drivers/programming is still such a pain in the ass.
Libraries are huge. APIs are overcomplicated.
Drawing a simple 2D line is ridiculously hard if you want proper hardware acceleration... or rely on libraries like OpenVG but it seems quite slow from my experiments.

I dream of some easy to use, accelerated 2D renderer. Batched rectangles/shapes/bitmap drawing and that's it...

User avatar
Gavinmc42
Posts: 3431
Joined: Wed Aug 28, 2013 3:31 am

Re: Raspberry Pi 4

Wed Jun 26, 2019 9:43 am

Dunno why in 2019 GPU drivers/programming is still such a pain in the ass.
Libraries are huge. APIs are overcomplicated.
Drawing a simple 2D line is ridiculously hard if you want proper hardware acceleration... or rely on libraries like OpenVG but it seems quite slow from my experiments.

I dream of some easy to use, accelerated 2D renderer. Batched rectangles/shapes/bitmap drawing and that's it...
Kind of have to agree with you about the bloat, but there are other ways sneaking through.
Looking forward to trying this on the Pi4
https://ultibo.org/forum/viewtopic.php?f=9&t=1269
Have a look at AJ Starks OpenVG github, I got this to work with his GO code too..

With the faster Pi4 I will probably get sloppy and use some slow library that is now fast enough?
Will be interesting with the Pi4 and two screens, developing on one, running on the other.
That should speed up the process.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

bzt
Posts: 374
Joined: Sat Oct 14, 2017 9:57 pm

Re: Raspberry Pi 4

Wed Jun 26, 2019 10:02 am

lpoulain wrote:
Wed Jun 26, 2019 1:44 am
@bzt, @LdB,

If that is OK with you, I would like to buy a RPi 4 for each of you. Not only both of you have great Rapsberry Pi tutorials on GitHub, but you seem to be two of the most prolific contributors on this forum.

If you have a PayPal account I can send you the money (if you promise to use it to buy a RPi 4 ;-) )
Thanks, that's very kind of you! Unfortunately my PP account has been hacked as part of the scientologiest's "fair game", and I asked PP to block it for good. But thanks anyway, I appreciate your offer!

Cheers,
bzt

lpoulain
Posts: 24
Joined: Mon May 20, 2019 12:35 am

Re: Raspberry Pi 4

Wed Jun 26, 2019 11:48 am

bzt wrote:
Wed Jun 26, 2019 10:02 am
Thanks, that's very kind of you! Unfortunately my PP account has been hacked as part of the scientologiest's "fair game", and I asked PP to block it for good. But thanks anyway, I appreciate your offer!

Cheers,
bzt
That's too bad. If you can think of any other way let me know. And if it wasn't obvious, thank you for your help on this forum.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Raspberry Pi 4

Wed Jun 26, 2019 3:18 pm

I am looking forward to the peripheral documentation as well. Even if many things are the same, there is going to be some difference in the base address for the peripheral registers, just to allow for the added RAM (and also curious how they map the peripheral registers into a 4GB config running in AARCH32 [as Raspbian does], are we going to have to use the MMU to map them in and out as needed).
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

gothicknight
Posts: 3
Joined: Fri Oct 07, 2011 9:29 am
Location: Portugal

Re: Raspberry Pi 4

Wed Jun 26, 2019 5:59 pm

CPU and peripherals base addresses can already be obtained from the Linux source files:
> https://github.com/raspberrypi/linux/bl ... pi-4-b.dts
> https://github.com/raspberrypi/linux/bl ... m2838.dtsi

I already have mine with me so so far there are a few changes:
1) Peripheral base address is now moved to 0x7E000000
2) There's a mention of ARM's GIC400 @ 0x40041000 but probably is only the distributor since the old CPU interface is still there @ 0x40000000

Next step, make the bootloader to... well, boot.

LdB
Posts: 1171
Joined: Wed Dec 07, 2016 2:29 pm

Re: Raspberry Pi 4

Thu Jun 27, 2019 2:05 am

Our next problem is we are going to run out of GPIO pins did you see the peripherals 5 uarts, 6 SPI's, 4 I2C :-)

User avatar
rpdom
Posts: 14722
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Raspberry Pi 4

Thu Jun 27, 2019 4:29 am

LdB wrote:
Thu Jun 27, 2019 2:05 am
Our next problem is we are going to run out of GPIO pins did you see the peripherals 5 uarts, 6 SPI's, 4 I2C :-)
More SPIs and I2Cs mean more port expanders can be connected. We're not going to run out any time soon :)

gothicknight
Posts: 3
Joined: Fri Oct 07, 2011 9:29 am
Location: Portugal

Re: Raspberry Pi 4

Thu Jun 27, 2019 8:49 am

LdB wrote:
Thu Jun 27, 2019 2:05 am
Our next problem is we are going to run out of GPIO pins did you see the peripherals 5 uarts, 6 SPI's, 4 I2C :-)
This is quite common in embedded devices where the exposed pins serve multiple purposes.

The reason is that chip manufacturers want to provide the maximum number of features the end user may want to have but without all the necessary physical connections (aka. pads) for each so it won't get too big/expensive. So there's a module, usually called IOMUX, where the manufacture attaches each PAD to a multitude of modules ALTernatives (UART, SPI, I2C,... and GPIO) that the user can then select the ALT mode they desire.

hippy
Posts: 5588
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Raspberry Pi 4

Thu Jun 27, 2019 1:25 pm

LdB wrote:
Thu Jun 27, 2019 2:05 am
Our next problem is we are going to run out of GPIO pins did you see the peripherals 5 uarts, 6 SPI's, 4 I2C :-)
The real problem comes when wanting to use things in combinations which just aren't allowed; one can have this or that but not both.

There is perhaps nothing more frustrating than when something would be possible but is not achievable. Some microcontrollers therefore offer the ability to map any pin to any peripheral signal.

bzt
Posts: 374
Joined: Sat Oct 14, 2017 9:57 pm

Re: Raspberry Pi 4

Thu Jun 27, 2019 3:09 pm

gothicknight wrote:
Wed Jun 26, 2019 5:59 pm
I already have mine with me so so far there are a few changes:
1) Peripheral base address is now moved to 0x7E000000
2) There's a mention of ARM's GIC400 @ 0x40041000 but probably is only the distributor since the old CPU interface is still there @ 0x40000000
Thanks for sharing, these are very useful info!

Cheers,
bzt

User avatar
Cacodemon
Posts: 20
Joined: Mon Jul 09, 2018 4:32 pm

Re: Raspberry Pi 4

Thu Jun 27, 2019 8:21 pm

Excited as well. Just waiting til the new 4 is gonna be available in my country. :mrgreen:

lpoulain
Posts: 24
Joined: Mon May 20, 2019 12:35 am

Re: Raspberry Pi 4

Fri Jun 28, 2019 2:25 am

I heard that the Pi 4 generates much more heat than the Pi 3. I am curious to hear what people who have used both are saying.

Return to “Bare metal, Assembly language”