5 ms·
A probably naieve question. If the VPU can be used as the bootstrap loader for the CPU, much as a PDP11 on the door of the Vax 11/780 acted as bootstrap loader
by ggm 4y ago
A probably naieve question. If the VPU can be used as the bootstrap loader for the CPU, much as a PDP11 on the door of the Vax 11/780 acted as bootstrap loader for the Vax, can we not simply replace all the complex VPU resident functions with 'just run on the CPU' and then resolve the external device bindings in normal CPU code?
Maybe I misread it, but it read like the VPU does more than the tiny necessary bootstrap to find an image, and chain load it. It reads like it has to do some timing critical initialisations of subsystems, but I cannot but think a CPU should be able to do this for itself, once it has some run state with a kernel in memory.
It's as if the VPU has to make the other bits of blobby hardware be alive, for the CPU to be able to see them. Most odd.
Oftentimes there are magic bits of this to do with ring states, and priviledge to alter ring at runtime. Maybe this is part of the story: the VPU initialises a specific ring state and some outer higher trust ring MUST be pre-initialised for the CPU ring state to be allowed to talk to it: it would violate the ring model, if the CPU did it.
- mburee 4y agohttps://github.com/librerpi/rpi-open-firmware https://github.com/librerpi/rpi-open-firmware The paragraph 'Does it boot Linux' should answer your questions
- ggm 4y agoWell no. It says: Yes, with some conditions. You can boot a very minimal version of Linux without the firmware and get it to work with UART and eMMC. Support for USB, DMA, and Ethernet are in the works, which will be sufficient for certain headless systems. Still, many other peripherals require bringup, such as video. Additionally, drivers for power management need to written. So it isn't clear if this is code in the kernel, or code blobs still to be run in the VPU, and why. "drivers" could refer to linux kernel, or the drivers as blob downloads, or VPU initialization.
- pabs3 4y agoThis is separate code (a fork of the Little Kernel project) that runs on the VPU and loads later stages of the boot process, including initialising the ARM core and running the Linux kernel on it. https://github.com/librerpi/lk-overlay https://github.com/librerpi/lk-overlay Edit: The rpi-firmware repo has been replaced by the lk-overlay repo, which is much more flexible.
- pjc50 4y agoI'm not aware of the specific details, but one of the usual critical things is clock and PLL configuration. It looks like the PLLs that generate all the internal clock frequencies, including the 48MHz for USB, are connected to the VPU. It may be the case that relevant hardware simply isn't connected to the ARM. (From Broadcom's point of view, the VPU is the "real" computer with all the processing power, and the ARM is tacked on the side)
- ggm 4y agoThis is so true, and so amusing. It almost makes me wonder if the microinstructions of the VPU could be where we run.. and use this ARM chip to do things like AES offload! Thanks for a very useful observation. Clocking is fundamental to a lot of things, buses like the clock to be done right so I can believe booting requires good clocking and some bus initialisation.
- pjc50 4y agoTurns out there is some pretty good architecture documentation: https://docs.broadcom.com/doc/12358545 https://docs.broadcom.com/doc/12358545 .. but that only describes the 3D capabilities, not the whole register map.
- q-big 4y ago> Turns out there is some pretty good architecture documentation: https://docs.broadcom.com/doc/12358545 https://docs.broadcom.com/doc/12358545 .. but that only describes the 3D capabilities, not the whole register map. This documentation is for the VideoCore IV. The BCM2711 SOC that is used in the Raspberry Pi 4 has a VideoCore VI.
- monocasa 4y agoThat doesn't really cover the processor under discussion here, only the shader cores called the QPUs. This work and the processor under discussion is another core called the VPU that unfortunately gets confused because with the default firmware it runs the majority of the OpenGL driver stack, controlling the QPUs.
- nerdponx 4y agoFun fact, the "ï" in "naïve" is not an umlaut, but a totally different use of the same notation called a diaresis! It's meant to inform the reader that the "a" and "i" are pronounced separately, rather than being combined into a single vowel sound. It's a bit old-fashioned in English, but you sometimes will see it in older texts on words like "coöperation". So "naieve" is not a valid spelling of "naïve" (but that's okay because English spelling has historically been a mess and everyone knew what you meant). https://en.m.wikipedia.org/wiki/Diaeresis_(diacritic) https://en.m.wikipedia.org/wiki/Diaeresis_(diacritic)
- tomcam 4y agoI just had diaresis. Painful at my age.
- boredemployee 4y agoYou should check your vitamin D levels
- tomcam 4y agoUsername checks out gloriously for assisting with my drastic medical condition
- boredemployee 4y agolol we should unite
- Inhibit 4y agoMore fiber and less umlauts for breakfast 'll fix that.
- benj111 4y agoAn Oxford comma a day keeps the diaresis at bay.
- cleverca22 4y agosome peripherals like the dram controller are rigged up so the arm can never control them others like the 2d core default to the same mode, but can be re-configured to allow the arm to control it there may be more peripherals that behave the same way, and require code on the VPU to help out and like others said, changing the arm freq, from the arm core, could be dangerous, it may just lock up, because it turned its own clock off
- xani_ 4y agoIIRC it was just architecture quirk of those chips as initally they were designed as basically fancy accelerators to be used with already existing systems > VideoCore chips can run complete applications - they are not simply video DSP chips that require a separate processor to supply and collect data. In practice though, they are often used like simple accelerators, as companies usually prefer to cautiously assimilate new technology rather than take a big risk in porting a large amount of application code from an existing ARM-based design. For example one of earlier ones was used as GPU for Nokia N8