Live data from Hacker News

PCI Express on the Raspberry Pi 4

mloduchowski.com

161–166 of 166 posts

Re: PCI Express on the Raspberry Pi 4

#161

Earlier quoted context omitted.

> On ARM we’d also run into alignment issues... Just don't use ARMv5 or older. ARMv6+ supports unaligned access.

At least on ARMv7, it's up to the MMU, not the CPU. I've worked with Cortex-A9s that trap the unaligned access. You can write a handler or crash.

Interesting. I've kept my accesses aligned, but noticed that unaligned ones worked. Didn't know about the exception mechanism behind, but yeah, should have err... expected it.

By the way, you can also opt to crash on x86. Just need to enable bit AM (Alignment Mask) bit 18) in CR0 (kernel stuff) and AC (Alignment Check, also bit 18) in EFLAGS.

After that point, unaligned accesses trap. I use this in my CPU JIT/dynamic compiler to trap target unaligned accesses.

https://en.wikipedia.org/wiki/Control_register#CR0

Re: PCI Express on the Raspberry Pi 4

#162

Earlier quoted context omitted.

I have no idea what I'd use this for but it sounds awesome.

Particle systems [1]. AR. VR [2][3][4][5]. Image processing, neural nets. But not in programming languages like C, Java or Linux. Only in massively parallel message passing languages[4]. I suggest a Smalltalk message passing scalable cluster VM like the RoarVM [6][7][]8]. [1] Shadama 3D. Yoshiki Oshima. https://www.youtube.com/watch?v=rka3w90Odo8 [2] OpenCobalt Alpha. https://www.youtube.com/watch?v=1s9ldlqhVkM&t=13s…

I said what I'd use it for ;)

Re: PCI Express on the Raspberry Pi 4

#163
post #13

Earlier quoted context omitted.

People have got at least some cards working on server-class arm setups. On the other hand I think they might be using the 'emulate x86 uefi rom in an arm uefi system' hack, so there might be more effort required on a non-uefi setup. Still, it should have shaken out most of the alignment and memory-cacheability-attibutes issues already, hopefully.

Yep, the "hack" (X86EmulatorPkg) allows running the card in the UEFI out of the box. AMD also provides native aarch64 builds of their UEFI GOP driver though. And none of this is necessary for running the GPU in the OS – amdgpu POSTs the GPU just fine. > memory-cacheability-attibutes issues Recently I've added aarch64 support to FreeBSD's port of the DRM/KMS drivers :) Took a couple hours to realize that our implement…

You wouldn't believe how much discussion it took to decide that that minor drm_cache.h change really was the right fix for that issue :-)

Re: PCI Express on the Raspberry Pi 4

#164

Fun. If you want PCIe on a SBC without the soldering, I highly recommend perusing Hackerboards. I'm very happy with my RockPi 4 (4GB RAM, PCIe, USB 3, 6 cores), which I discovered through their excellent database. https://www.hackerboards.com/search_boarddb.php

Not seeing a mention of PCIe as an option that can be searched?

Good catch. I search by checking M2 and NVMe then reading the product description on the SBC's website, but hackerboards should add a PCIe field.

Re: PCI Express on the Raspberry Pi 4

#165
post #157

Earlier quoted context omitted.

Isn't M.2 storage specific? eg not a useful PCIe slot for anything other than plugging in an SSD

M.2 has full four lanes PCIe, you can use M.2 to PCIe x4 adapter and use all the standard PCIe cards.

Thanks, hadn't heard of them before. This looks like the right kind of thing:

https://www.newegg.com/p/17Z-00AP-00018?Description=m.2%20ad...

Re: PCI Express on the Raspberry Pi 4

#166
post #157

Earlier quoted context omitted.

Isn't M.2 storage specific? eg not a useful PCIe slot for anything other than plugging in an SSD

M.2 has full four lanes PCIe, you can use M.2 to PCIe x4 adapter and use all the standard PCIe cards.

M.2 is a connector specification it has nothing to do with speed. M.2 supports applications such as WIFI, USB, SATA, and PCIe. M.2 SSDs are faster and store more data than most mSATA cards. M.2 SSDs support PCIe 3.0, SATA 3.0 and USB 3.0 interfaces, while mSATA only supports SATA. M.2 SATA SSDs have similar performance to mSATA cards, but M.2 PCIe cards are faster. SATA SSDs have a maximum speed of 600 MB per second, while M.2 PCIe cards can hit 4 GB per second.

PCIe support also allows M.2 cards to take advantage of the nonvolatile memory express (NVMe) protocol, which brings a large performance advantage over other types of interfaces due to reduced latency, increased IOPS and lower power consumption.

Post reply on HN