Thanks very much :-) I did not know about the eprom -p and it's actually very nice to have it.
The info you gave me are mostly about the address of those peripherals in physical memory. What I was after was the virtual address at which peripherals get mapped inside the kernel. This is specific to OpenBSD. In my understanding, which could be wrong by the way, the arm 64 kernel is not allowed to access memory below 0xFFFF000000000000, which is at the end of the 64 bit space, so in order to drive the hardware it must map the physical addresses ( which live either in a 32 or 35 bit address space ) to a much higher memory location. Best, Alessandro On Tue, Apr 20, 2021 at 8:22 AM Stuart Henderson <s...@spacehopper.org> wrote: > On 2021/04/20 00:46, Alessandro Pistocchi wrote: > > Hi, > > > > I am playing around with openbsd kernel source code on a raspberry pi 4. > > > > I have a couple of questions: > > Does openbsd use low or high peripheral mode? > > At what virtual address does openbsd map the peripheral base address ? > > > > I had a look at the source code but that part is still a bit cryptic for > me. > > > > Thank you, > > Alessandro > > I can give you some pointers that will give you some places to start > digging, but not answer everything: > > https://github.com/raspberrypi/firmware/issues/1374#issuecomment-617628570 > suggests that this must be set by the video controller (which is used to > boot the main CPU), and that it's done automatically on newer firmware > depending on the device tree used. > > You can display the device tree used with "eeprom -p". > > If you're using U-Boot (included for rpi4 on recent snapshots/images) > then the device trees are provided by OpenBSD and currently come from > Linux 5.11 (via the sysutils/dtb port) where it looks like they're low. > > If you're using the UEFI firmware then the device trees are supplied > with it, I haven't checked but I guess those are probably low too. > > >