Page MenuHomeFreeBSD

PowerPCUmbrella
ActivePublic

Recent Activity

Yesterday

ali_mashtizadeh.com added a member for PowerPC: ali_mashtizadeh.com.
Thu, Mar 12, 9:03 PM

Sun, Feb 22

adrian closed D54936: powerpc64: initial conversion of oea64 to rwlocks.
Sun, Feb 22, 2:26 AM · PowerPC

Sat, Feb 21

adrian added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

ok, this one boots fine in p8 pseries and p9 pseries, but p8 powernv it .. just hangs during boot and eventually ends up at OPAL.

Sat, Feb 21, 4:07 AM · PowerPC
adrian added a comment to D55315: powerpc: add in some busdma domain setup.

Seeing the same problem with just D54745, D55313, and D55314. I suppose it's possible D54745 could shift things around enough to make the problem appear, but I'm not comfortable merging code into the DMA system when I already know we're violating platform constraints (without D54745 I know for a fact we're allocating bounce buffer in an illegal region and Bad Things via undefined behavior are likely -- just because we get away with it long enough to boot doesn't mean we're not going to get data corruption and lockups later on).

Sat, Feb 21, 2:32 AM · PowerPC

Wed, Feb 18

tpearson_raptorengineering.com added a comment to D55315: powerpc: add in some busdma domain setup.

Seeing the same problem with just D54745, D55313, and D55314. I suppose it's possible D54745 could shift things around enough to make the problem appear, but I'm not comfortable merging code into the DMA system when I already know we're violating platform constraints (without D54745 I know for a fact we're allocating bounce buffer in an illegal region and Bad Things via undefined behavior are likely -- just because we get away with it long enough to boot doesn't mean we're not going to get data corruption and lockups later on).

Wed, Feb 18, 4:16 PM · PowerPC
tpearson_raptorengineering.com added a comment to D55315: powerpc: add in some busdma domain setup.

That actually does make sense -- physmem is different on PowerNV vs. pSeries, especially because use of the IOMMU is effectively mandatory on pSeries. I'm not sure you're going to be able to reproduce easily on qemu short of setting up a PowerNV system to test with, which in turn requires a current skiboot build, etc. Additionally, the mpr driver is unique in the entire tree as far as I can tell, I'm not sure the DMA over-allocation issue will be reproducible without an LSI card attached.

Wed, Feb 18, 4:01 PM · PowerPC
adrian added a comment to D55315: powerpc: add in some busdma domain setup.

ok, does this happen without this domain change? can you just try D55312, D55313, D55314?

Wed, Feb 18, 3:54 PM · PowerPC
tpearson_raptorengineering.com added a comment to D55315: powerpc: add in some busdma domain setup.

All that said, I bet if the mpr DMA issue was fixed the problem introduced in the port would at least be masked. I'm unclear what the "correct" behavior should be when we run out of bounce buffers; with the stock kernel, it looks like ahci and usb are simply denied more buffers so they fall back to a DMA-free mode, whereas with the patch series applied they're allocated too small of a bounce region and just lock up.

Wed, Feb 18, 3:49 PM · PowerPC
tpearson_raptorengineering.com added a comment to D55315: powerpc: add in some busdma domain setup.

This is why I was saying we should probably find the fault in my patchset, and fix that, along with whatever is going wrong with the DMA tag setup where the mpr driver is allocating too much bounce memory. There's something different in the DMA core vs. what the old powerpc DMA code is trying to do, and whatever it is is quite subtle.

Wed, Feb 18, 3:40 PM · PowerPC
tpearson_raptorengineering.com added a comment to D55315: powerpc: add in some busdma domain setup.

Yeah, here's the boot from a stock kernel:

Wed, Feb 18, 3:39 PM · PowerPC
adrian added a comment to D55315: powerpc: add in some busdma domain setup.

oh interesting. is this different from straight -head? If it is then i need to fix it. If it isn't then it's expected behaviour!

Wed, Feb 18, 3:31 PM · PowerPC
tpearson_raptorengineering.com added a comment to D55315: powerpc: add in some busdma domain setup.

Unfortunately this fails to boot on POWER9/PowerNV with the following patch series:

Wed, Feb 18, 2:39 PM · PowerPC
adrian added reviewers for D55340: powerpc: refactor common busdma tag setup: jhibbits, PowerPC.
Wed, Feb 18, 6:53 AM · PowerPC
adrian updated the diff for D55315: powerpc: add in some busdma domain setup.

refactor

Wed, Feb 18, 6:43 AM · PowerPC
adrian updated the diff for D55315: powerpc: add in some busdma domain setup.

refactor

Wed, Feb 18, 6:41 AM · PowerPC
adrian updated the diff for D55314: powerpc: create a tag with the parents implementation if supplied.

refactor

Wed, Feb 18, 6:38 AM · PowerPC
adrian updated the diff for D55313: powerpc: initial straight port of busdma_machdep.c -> busdma_bounce.c.

refactor

Wed, Feb 18, 6:28 AM · PowerPC

Tue, Feb 17

adrian added reviewers for D55315: powerpc: add in some busdma domain setup: jhibbits, tpearson_raptorengineering.com.
Tue, Feb 17, 4:12 PM · PowerPC
adrian added reviewers for D55314: powerpc: create a tag with the parents implementation if supplied: jhibbits, tpearson_raptorengineering.com.
Tue, Feb 17, 4:12 PM · PowerPC
adrian added reviewers for D55313: powerpc: initial straight port of busdma_machdep.c -> busdma_bounce.c: jhibbits, tpearson_raptorengineering.com.
Tue, Feb 17, 4:11 PM · PowerPC
adrian added a reviewer for D55312: powerpc: implement lock iteration for mmu_oea64 pmap: jhibbits.
Tue, Feb 17, 4:11 PM · PowerPC

Mon, Feb 16

jhibbits accepted D54936: powerpc64: initial conversion of oea64 to rwlocks.
Mon, Feb 16, 6:15 PM · PowerPC
adrian updated the summary of D54936: powerpc64: initial conversion of oea64 to rwlocks.
Mon, Feb 16, 5:57 PM · PowerPC
adrian updated the diff for D54936: powerpc64: initial conversion of oea64 to rwlocks.

migrate this to /just/ do rwlock migration, not the iteration stuff.

Mon, Feb 16, 5:54 PM · PowerPC
adrian closed D55093: powerpc: document the magic constants for 16MB page size.
Mon, Feb 16, 5:51 PM · PowerPC
adrian closed D55071: powerpc: enable HPT superpages by default.
Mon, Feb 16, 5:50 PM · PowerPC

Sun, Feb 15

adrian updated the diff for D54936: powerpc64: initial conversion of oea64 to rwlocks.

compile tested

Sun, Feb 15, 4:40 AM · PowerPC
adrian updated the diff for D54936: powerpc64: initial conversion of oea64 to rwlocks.

rw_init_flags() -> rw_init()

Sun, Feb 15, 3:30 AM · PowerPC
adrian added inline comments to D54936: powerpc64: initial conversion of oea64 to rwlocks.
Sun, Feb 15, 3:27 AM · PowerPC

Sat, Feb 14

tpearson_raptorengineering.com added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

OK, looks like adding the "-usb -usbdevice mouse" option to qemu causes the panic Adrian saw.

Sat, Feb 14, 7:50 PM · PowerPC
tpearson_raptorengineering.com added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

FWIW on my POWER9 qemu box, I get a good boot even with the USB controller turned on:

Sat, Feb 14, 7:35 PM · PowerPC
tpearson_raptorengineering.com added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

Sigh. Can you share your qemu command line so we're testing using the same peripherals / CPU setup?

Sat, Feb 14, 7:26 PM · PowerPC
adrian added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

nope, still no dice

Sat, Feb 14, 7:21 PM · PowerPC
adrian added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

ok, lemme try this latest one in qemu real quick, hold.

Sat, Feb 14, 7:19 PM · PowerPC
tpearson_raptorengineering.com updated the diff for D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

Fourth time's the charm? Tested to work on both pSeries/POWER9 and PowerNV/POWER9 -- hopefully POWER8 is similarly functional.

Sat, Feb 14, 6:47 PM · PowerPC
tpearson_raptorengineering.com added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

Thanks for the check. I'm able to reproduce and am working on it. On initial glance, it looks like we're calling bounce_bus_dmamap_complete() on a tag that was never created with bounce_bus_dmamap_create(), and I need to find out if that's expected or something we need to trap / ignore.

Sat, Feb 14, 5:43 PM · PowerPC
adrian added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

Just tried the latest diff on power9/pseries qemu, it panics differently now

Sat, Feb 14, 12:58 AM · PowerPC

Fri, Feb 13

tpearson_raptorengineering.com updated the diff for D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

Fix failure on PowerNV platforms introduced in last update

Fri, Feb 13, 9:54 PM · PowerPC
tpearson_raptorengineering.com updated the diff for D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

Now with 100% less pSeries IOMMU errors!

Fri, Feb 13, 8:42 PM · PowerPC
tpearson_raptorengineering.com added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

OK, so we're probably dealing with a pSeries specific issue here then. IIRC the pSeries functionality requires some kind of pSeries-specific IOMMU setup calls to the hyypervisor to bring PCIe online, so it's possible that those were inadvertently bypassed or damaged somehow.

Fri, Feb 13, 7:53 PM · PowerPC
adrian added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

ok i thought this was OK on power9 but it seems not:

Fri, Feb 13, 7:30 PM · PowerPC
tpearson_raptorengineering.com added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

I can't imagine why this would matter offhand, but a key difference is POWER8 is HPT, POWER9 is Radix. You've already ruled out the pSeries/PowerNV question by checking on POWER9/pSeries, and both platforms are supposed to be IODA2 compliant, so the MMU mode is about all I can think of as a major difference.

Fri, Feb 13, 5:46 PM · PowerPC
jhibbits added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

pvo->pvo_pte.slot is initialized to a hash mod moea64_pteg_count, then updated by the return of the H_ENTER hypercall. There are two possibilities here:

  • Some kind of weird buffer overflow that scribbled onto the PVO
  • A bug in Qemu
Fri, Feb 13, 4:17 PM · PowerPC
adrian added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

ok, tried with 8g in the VM instead of 2g, same issue.

Fri, Feb 13, 4:02 PM · PowerPC
adrian added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

and from justin on irc

Fri, Feb 13, 4:00 PM · PowerPC
adrian added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

This boots fine in qemu-system-ppc64 pseries9 + power9, but in qemu-system-ppc64 pseries-8.0 + power8, it immediately panics on boot with

Fri, Feb 13, 3:29 PM · PowerPC

Feb 10 2026

markj added inline comments to D54936: powerpc64: initial conversion of oea64 to rwlocks.
Feb 10 2026, 4:52 PM · PowerPC

Feb 8 2026

adrian added a reviewer for D55084: powerpc64/busdma: Migrate bounce DMA to common framework: adrian.
Feb 8 2026, 7:53 PM · PowerPC
adrian added a comment to D55084: powerpc64/busdma: Migrate bounce DMA to common framework.

oh crap i missed testing this; lemme test this on -HEAD today on the G5 and POWER8.

Feb 8 2026, 7:50 PM · PowerPC
jhibbits accepted D54936: powerpc64: initial conversion of oea64 to rwlocks.
Feb 8 2026, 7:06 PM · PowerPC