Page MenuHomeFreeBSD

nwhitehorn (Nathan Whitehorn)
User

Projects

User Details

User Since
Sep 10 2014, 9:01 PM (210 w, 1 d)

Recent Activity

Wed, Sep 19

nwhitehorn accepted D17183: Fix random DMA failure on powernv.
Wed, Sep 19, 8:24 PM · PowerPC

Mon, Sep 17

nwhitehorn added a comment to D17183: Fix random DMA failure on powernv.

Can we make the check the presence of a PHB4 node in the device tree rather than an #ifdef? It might also be best to do this in platform_powernv.c, but that's a bit larger of a project.

Mon, Sep 17, 6:25 PM · PowerPC

Thu, Aug 30

nwhitehorn added a comment to D16794: Update PPC loader relocations to match the kernel..
In D16794#361563, @jhb wrote:

On closer examination, the loader doesn't actually modify the kernel or modules in place at all. Instead, this routine is used to apply relocations on copies of data. So for example, the code to parse module metadata copies individual records out of the kernel into a local variable on the stack, then asks the relocation to be applied to that local copy. This is a really good reason to honor the the 'data' and 'len' bounds as otherwise it allows writing to random crap on the stack. Also, we do explicitly ignore all relocations for the kernel itself, so it must be some relocation in tcp_rack.ko that wasn't handled before that is being handled now perhaps. I would have expected that to trigger a warning if so in the existing code though for an "unhandled relocation type".

Thu, Aug 30, 12:07 AM

Wed, Aug 29

nwhitehorn added a comment to D16794: Update PPC loader relocations to match the kernel..
In D16794#361523, @jhb wrote:

I believe since ppc is using Elf_Rela and that all of the relocations calculated absolute values to store at *where or *hwhere (vs using += or the like), the loader relocations just get overwritten by the kernel. I think when using Elf_Rel you might use the original value of *where as the addend in which case multiple passes of relocations is indeed destructive, but I don't think it is for Elf_Rela.

Wed, Aug 29, 10:17 PM

Fri, Aug 24

nwhitehorn committed rD52173: Update PGP key to one I still actually have..
Update PGP key to one I still actually have.
Fri, Aug 24, 9:34 PM

Aug 19 2018

nwhitehorn requested changes to D16794: Update PPC loader relocations to match the kernel..

I just looked at the actual patch. The kernel sometimes (almost always on ppc64, less often on ppc32) relocates itself again post-loader to an address that loader does not know, so I think this does not solve the actual problem, or at least solves it in only a subset of cases. Processing these relocations in the kernel would solve the issue in all cases.

Aug 19 2018, 10:58 PM
nwhitehorn added a comment to D16794: Update PPC loader relocations to match the kernel..
In D16794#357383, @jhb wrote:

I added Justin and Nathan (who I meant to include from the start).

I believe PPC kernels are relocatable. I think they use ET_DYN instead of ET_EXEC (and there is a pending PR to fix that issue in libkvm as libkvm doesn't work on it currently as it only expects ET_EXEC for a kernel). Justin and/or Nathan can confirm.

Aug 19 2018, 7:18 PM

Aug 11 2018

nwhitehorn added a comment to D16653: libfdt: Update to the full release of 1.4.7.

Looks OK to me. One question: Do we want the various instances of fdt_check_header() in our code to be spelled FDT_RO_PROBE() now?

Aug 11 2018, 9:18 PM

Jul 31 2018

nwhitehorn accepted D16346: ofw_cpu: Add support for getting cpu clock via clock property.
Jul 31 2018, 8:40 PM

Jul 19 2018

nwhitehorn added a comment to D16346: ofw_cpu: Add support for getting cpu clock via clock property.

Since I'm not familiar with the clock code, where is EXT_RESOURCES defined? Can we just use that code unconditionally?

Jul 19 2018, 8:06 PM
nwhitehorn accepted D16232: Merge the md_page structs for AIM and Book-E into a single unioned struct.
Jul 19 2018, 8:05 PM

Jun 29 2018

nwhitehorn accepted D16071: Support multiple OPAL consoles, and don't crash if uart is not stdout.

Assuming you have tested this and it works, looks great.

Jun 29 2018, 7:18 PM

Jun 21 2018

nwhitehorn accepted D15932: Introduce PMCR-based cpufreq(4) driver, for IBM POWER9 systems.

Looks good to me.

Jun 21 2018, 4:57 AM
nwhitehorn requested changes to D15835: Set the console sc if it's not already set..
Jun 21 2018, 4:56 AM

Jun 20 2018

nwhitehorn accepted D15921: Attach dev.cpu nodes on SMT cores, using only the first found thread.

Approved if you fix the #if 0 bit.

Jun 20 2018, 4:59 AM

Jun 15 2018

nwhitehorn added inline comments to D15818: Add a delayed VT attachment for ofwfb.
Jun 15 2018, 9:41 PM
nwhitehorn added inline comments to D15818: Add a delayed VT attachment for ofwfb.
Jun 15 2018, 6:37 PM
nwhitehorn accepted D15817: Check for a 'pci' prefix rather than a full match in get_addr_props.
Jun 15 2018, 6:33 PM
nwhitehorn added a comment to D15817: Check for a 'pci' prefix rather than a full match in get_addr_props.

Don't you want strcmp() == 0?

Jun 15 2018, 6:19 PM
nwhitehorn added a comment to D15817: Check for a 'pci' prefix rather than a full match in get_addr_props.

It's mildly stupid, since the universe of pci* isn't big, but I think I would prefer a check for "pci" || "pciex" to just checking the first three characters.

Jun 15 2018, 3:59 AM

Jun 11 2018

nwhitehorn added a comment to D15229: Allow run-time delayed attachment of devices.
In D15229#333064, @imp wrote:
In D15229#333038, @imp wrote:

The final option would be to do a variation on the prior option, but institutionalize it in DEVICE_ATTACH_LATE. It would be called just after interrupts were enabled for deferred work like this. It would cover the vast majority of driver independencies by giving a 'last' point. At that point, you return an error if you still weren't ready, and we'd loop while the number of devices returning an error was declining. It could largely replace config_intrhook.

I think this would work reasonably well for the general case here; the other suggestions would solve the case of smu(4), but there are other, simpler, ways to do that.

That said, I'm not sure what the advantage of a DEVICE_ATTACH_LATE() is over the mechanism originally proposed here or something like it except that it, as a side effect, delays until after interrupts -- which might not even be wanted, for example if the device in question is an interrupt controller.

If the device is an interrupt controller, you need to put it on a different pass. There's no way around that. But this isn't an interrupt controller, and interrupt controllers are special beasts that already have special handling in many places. Having a delayed attach for them is likely completely unacceptable so none of the proposals is appropriate for them.

Jun 11 2018, 6:39 PM
nwhitehorn added a comment to D15229: Allow run-time delayed attachment of devices.
In D15229#333038, @imp wrote:

The final option would be to do a variation on the prior option, but institutionalize it in DEVICE_ATTACH_LATE. It would be called just after interrupts were enabled for deferred work like this. It would cover the vast majority of driver independencies by giving a 'last' point. At that point, you return an error if you still weren't ready, and we'd loop while the number of devices returning an error was declining. It could largely replace config_intrhook.

Jun 11 2018, 6:25 PM

Jun 5 2018

nwhitehorn added a comment to D15229: Allow run-time delayed attachment of devices.

It's been another couple weeks. Any objections or approvals?

Jun 5 2018, 2:18 PM

Jun 4 2018

nwhitehorn accepted D15664: Add partition scheme for mpc85xx devices.
Jun 4 2018, 4:42 PM
nwhitehorn accepted D15660: Set kernelname in bootconfig to the kernel file.
Jun 4 2018, 4:00 AM

May 30 2018

nwhitehorn committed rS334372: If linebytes property is missing from the graphics device, assume no.
If linebytes property is missing from the graphics device, assume no
May 30 2018, 4:15 AM

May 26 2018

nwhitehorn accepted D15566: Make opal_pci driver work with POWER9.

This looks good to me, though I haven't tested on P8.

May 26 2018, 3:21 AM
nwhitehorn accepted D15581: Only crop the VPN on POWER4 and derivatives for TLBIE operations.

On POWER9, I think the lock is unnecessary (the ISA spec doesn't mention it).

May 26 2018, 12:29 AM

May 25 2018

nwhitehorn added a comment to D15229: Allow run-time delayed attachment of devices.

Any other thoughts? I'd like to get this in soon since it is blocking other things.

May 25 2018, 3:54 AM

May 20 2018

nwhitehorn updated the diff for D15229: Allow run-time delayed attachment of devices.

Fix style and spelling issues in man pages.

May 20 2018, 9:05 PM
nwhitehorn updated the diff for D15229: Allow run-time delayed attachment of devices.

Probe for pending devices at the end of each pass and after modules loaded. Add documentation.

May 20 2018, 7:24 PM
nwhitehorn committed rS333934: Fix build with PSERIES but not POWERNV defined..
Fix build with PSERIES but not POWERNV defined.
May 20 2018, 6:26 PM
nwhitehorn accepted D15492: Add support for the XIVE XICS emulation mode for POWER9 systems.
May 20 2018, 3:21 AM
nwhitehorn added inline comments to D15492: Add support for the XIVE XICS emulation mode for POWER9 systems.
May 20 2018, 2:50 AM
nwhitehorn added a comment to D15492: Add support for the XIVE XICS emulation mode for POWER9 systems.

See the comment on line 467 about powernv_smp_ap_init(). Otherwise, looks good.

May 20 2018, 2:03 AM

May 19 2018

nwhitehorn committed rS333897: Avoid writing to the frame buffer in early boot on PowerPC if the CPU's.
Avoid writing to the frame buffer in early boot on PowerPC if the CPU's
May 19 2018, 10:05 PM
nwhitehorn added inline comments to D15492: Add support for the XIVE XICS emulation mode for POWER9 systems.
May 19 2018, 8:40 PM
nwhitehorn accepted D15487: Add hypervisor trap handling, using HSRR0/HSRR1.

Approved if you also install it to EXC_HEA.

May 19 2018, 4:05 AM

May 18 2018

nwhitehorn accepted D15482: powerpc64: Ignore NVlink memory regions.
  1. Is there a document describing this that we can reference?

I was not able to find any documentation. Looking at the web, I found a patch[1] that documents it quickly in Linux, but it seems it was never accepted. I will ask internally.

May 18 2018, 6:14 PM
nwhitehorn added a comment to D15482: powerpc64: Ignore NVlink memory regions.

This looks good, even if the deice tree situation is a bit lamentable. Two questions:

  1. Is there a document describing this that we can reference?
  2. If this is just part of the PowerNV platform, maybe the code belongs in platform_powernv.c instead?
May 18 2018, 5:49 PM
nwhitehorn committed rS333804: Use sysrc(8) in the documentation rather than echoing things to rc.conf.
Use sysrc(8) in the documentation rather than echoing things to rc.conf
May 18 2018, 5:46 PM
nwhitehorn committed rS333803: Fix math error in the computation of the free space after the last partition.
Fix math error in the computation of the free space after the last partition
May 18 2018, 5:43 PM

May 14 2018

nwhitehorn added a comment to D15229: Allow run-time delayed attachment of devices.

Thanks -- I'll tweak the implementation to handle KLDs properly and write a man page, then update this diff.

May 14 2018, 8:50 PM
nwhitehorn committed rS333599: Final fix for alignment issues with the page table first patched with.
Final fix for alignment issues with the page table first patched with
May 14 2018, 4:01 AM

May 13 2018

nwhitehorn committed rS333594: Revert changes to hash table alignment in r333273, which booting on all G5.
Revert changes to hash table alignment in r333273, which booting on all G5
May 13 2018, 11:56 PM
nwhitehorn added a comment to D15229: Allow run-time delayed attachment of devices.

Any further comments? I'd really like to get this, or something like it, in.

May 13 2018, 5:26 PM

May 8 2018

nwhitehorn added a comment to D15174: Fix wrong cpu0 identification.

We should do the same thing (check fdtbootcpu rather than PIR) on PowerNV too. Thanks for the work on this patch!

May 8 2018, 3:33 PM

May 7 2018

nwhitehorn accepted D15174: Fix wrong cpu0 identification.

Looks good to me. I haven't tested it, of course -- is this working well for you?

May 7 2018, 7:52 PM
nwhitehorn added a comment to D15339: Mark relocated memory region as valid.

This is an interesting problem that I need to think about -- thanks for identifying it! I think this particular patch is not the right one, so let's put a pin in this for a couple days.

May 7 2018, 4:22 PM
nwhitehorn added a comment to D15174: Fix wrong cpu0 identification.

The CPU is stored in the device tree in one of two ways:

  1. As an ihandle "cpu" in /chosen
  2. The "fdtbootcpu" integer property from /chosen
May 7 2018, 3:23 PM

May 6 2018

nwhitehorn added inline comments to D15331: Enable XIVE XICS emulation mode for POWER9 interrupt controller.
May 6 2018, 10:52 PM

May 4 2018

nwhitehorn added a comment to D15229: Allow run-time delayed attachment of devices.
In D15229#321549, @jhb wrote:

(For future reference, a diff with context is nicer.)

(BTW, while reviewing this I found the device_register() "gem" which is a bit of a hack that snuck in with iflib and should be replaced with an iflib_if.m and a dedicated IFLIB_REGISTER rather than looking at magic numbers in the first 4 bytes of a pointer, etc. That's just ridiculous.)

I assume you're waiting on docs until the design is ok'd (which is sensible), but once that is settled DEVICE_ATTACH.9 probably needs extending to document this.

May 4 2018, 6:21 PM

May 1 2018

nwhitehorn committed rS333134: Report the kernel base address properly in kldstat when using PowerPC kernels.
Report the kernel base address properly in kldstat when using PowerPC kernels
May 1 2018, 4:07 AM

Apr 30 2018

nwhitehorn committed rS333124: Fix null pointer dereference on nodes without a "compatible" property..
Fix null pointer dereference on nodes without a "compatible" property.
Apr 30 2018, 7:37 PM
nwhitehorn added inline comments to D15229: Allow run-time delayed attachment of devices.
Apr 30 2018, 3:35 PM
nwhitehorn updated the diff for D15229: Allow run-time delayed attachment of devices.

Simplify logic dealing with pending attachments.

Apr 30 2018, 3:34 PM
nwhitehorn created D15229: Allow run-time delayed attachment of devices.
Apr 30 2018, 12:56 AM

Apr 25 2018

nwhitehorn added a comment to D15174: Fix wrong cpu0 identification.

We should fix that, too, though. This code assumes that we are booting on CPU 0 -- the same assumption could continue as a stopgap until we figure out a reliable way to evaluate the boot processor.

Apr 25 2018, 10:10 PM

Apr 24 2018

nwhitehorn added a comment to D15174: Fix wrong cpu0 identification.

Is there a reason not to just adopt the PowerNV version of this code, which already does the right thing?

Apr 24 2018, 10:18 PM

Apr 23 2018

nwhitehorn accepted D15174: Fix wrong cpu0 identification.
Apr 23 2018, 7:49 PM

Apr 19 2018

nwhitehorn committed rS332788: Fix detection of memory overlap with the kernel in the case where a memory.
Fix detection of memory overlap with the kernel in the case where a memory
Apr 19 2018, 6:35 PM
nwhitehorn closed D15121: Fix detection of kernel memory overlap.
Apr 19 2018, 6:35 PM

Apr 18 2018

nwhitehorn added inline comments to D15118: memcpy optimization for powerpc64.
Apr 18 2018, 7:53 PM · PowerPC

Apr 17 2018

nwhitehorn added a comment to D15118: memcpy optimization for powerpc64.

This looks great, with one nit about the way you determine whether VSX is available.

Apr 17 2018, 7:03 PM · PowerPC

Apr 5 2018

nwhitehorn accepted D14955: powerpc/ofw: Fix malloc inside lock.
Apr 5 2018, 8:50 PM

Mar 16 2018

nwhitehorn added a comment to D14437: Send SIGILL on HEA illegal instruction exception.

I think there is also a subtlety for uncaught signals if the previous trap was a kernel fault, since you then end up in the wrong branch of the kernel/user if in trap() and probably crash.

Mar 16 2018, 7:46 PM
nwhitehorn added a comment to D14437: Send SIGILL on HEA illegal instruction exception.

Sure, it will deliver the signal. But the value of MSR when control is returned to userland may be wrong (it may even have MSR[PR] unset and return in supervisor mode if the previous trap on this CPU was in the kernel!) and it will resume execution in the wrong place if the signal is caught and handled.

Mar 16 2018, 6:16 PM

Mar 15 2018

nwhitehorn added a comment to D14437: Send SIGILL on HEA illegal instruction exception.

I'm looking at this again. Does this actually work? HEA interrupts set HSRR0/HSSR1, which we don't save, so I think this will jump back to some random other memory location (whatever happened to be in SRR0).

Mar 15 2018, 11:35 PM

Mar 14 2018

nwhitehorn committed rS330936: Fix fat-fingering ("optional standard") and move all the OF code to.
Fix fat-fingering ("optional standard") and move all the OF code to
Mar 14 2018, 6:08 PM
nwhitehorn committed rS330930: The expression (aim | fdt) is always true on PowerPC. The last PowerPC.
The expression (aim | fdt) is always true on PowerPC. The last PowerPC
Mar 14 2018, 4:16 PM

Mar 13 2018

nwhitehorn committed rS330870: Restore missing temporary variable, deleted by accident in r330845. This.
Restore missing temporary variable, deleted by accident in r330845. This
Mar 13 2018, 6:24 PM
nwhitehorn committed rS330845: Execute PowerPC64/AIM kernel from direct map region when possible..
Execute PowerPC64/AIM kernel from direct map region when possible.
Mar 13 2018, 3:04 PM
nwhitehorn closed D14647: Execute PowerPC64/AIM kernel from direct map region when possible.
Mar 13 2018, 3:04 PM · PowerPC
nwhitehorn updated the diff for D14647: Execute PowerPC64/AIM kernel from direct map region when possible.

Use label arithmetic rather than instruction counting, which is much more robust.

Mar 13 2018, 4:26 AM · PowerPC

Mar 11 2018

nwhitehorn updated the summary of D14647: Execute PowerPC64/AIM kernel from direct map region when possible.
Mar 11 2018, 6:07 AM · PowerPC
nwhitehorn created D14647: Execute PowerPC64/AIM kernel from direct map region when possible.
Mar 11 2018, 6:06 AM · PowerPC
nwhitehorn committed rS330754: Make FDT-using parts of ofw_machdep.c condition on options FDT. This fixes.
Make FDT-using parts of ofw_machdep.c condition on options FDT. This fixes
Mar 11 2018, 1:09 AM
nwhitehorn accepted D14645: Fix errneous checks for OF_finddevice(9) return value.

Looks good. Thanks for doing this!

Mar 11 2018, 12:04 AM

Mar 7 2018

nwhitehorn committed rS330610: Move the powerpc64 direct map base address from zero to high memory. This.
Move the powerpc64 direct map base address from zero to high memory. This
Mar 7 2018, 5:08 PM
nwhitehorn closed D14499: Move powerpc64 direct map from 0 to 0xc000000000000000.
Mar 7 2018, 5:08 PM · PowerPC

Mar 6 2018

nwhitehorn accepted D14600: powerpc64: Print current MSR on printtrap().
Mar 6 2018, 8:59 PM
nwhitehorn added a comment to D14499: Move powerpc64 direct map from 0 to 0xc000000000000000.

Hi Nathan,

With the current patch, I was able to test it properly on my pseries VM, but I didn't use usefdt=1, mainly because I didn't know where to use it. Should I need to recompile the loader to use it, or, is it a parameter somewhere?

And it was working fine?

If I do not set the usefdt=1, it works fine. If I set it, it break in the early start.

OK set usefdt=1
OK boot
Booting...
Kernel entry at 0x102670 ...
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2018 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.0-CURRENT #102 66160e2fc87(nathan): Tue Mar  6 16:19:44 CET 2018
    root@free8:/usr/obj/root/kernel/freebsd/powerpc.powerpc64/sys/GENERIC64 powerpc
gcc version 4.2.1 20070831 patched [FreeBSD]
WARNING: WITNESS option enabled, expect reduced performance.
WARNING: Running on a broken hypervisor that does not support mandatory H_CLEAR_MOD and H_CLEAR_REF hypercalls. Performance will be suboptimal.
[ thread pid 0 tid 0 ]
Stopped at      .trap+0x40:     stdu    r1, r1, 0xfe40
db> bt
Tracing pid 0 tid 0 td 0x14eb5a0
0xe000000000001190: kernel DSI read trap @ 0xdeadc0dedeadc0de by .pmap_decode_kernel_ptr+0x38: srr1=0x8000000000001032
            r1=0xe000000000001440 cr=0x20001032 xer=0x20000000 ctr=0 r2=0x13a17b8 sr=0x40000000
0xe000000000001440: at 0x38000000901f0020
0xe0000000000014e0: at .trap_pfault+0xb0
0xe000000000001590: at .trap+0xef0
Mar 6 2018, 5:32 PM · PowerPC
nwhitehorn updated the diff for D14499: Move powerpc64 direct map from 0 to 0xc000000000000000.

Minor cleanups. Fix Book-E.

Mar 6 2018, 4:28 PM · PowerPC
nwhitehorn committed rS330542: Fix use of unitialized variables..
Fix use of unitialized variables.
Mar 6 2018, 3:53 PM
nwhitehorn added a comment to D14499: Move powerpc64 direct map from 0 to 0xc000000000000000.

Hi Nathan,

With the current patch, I was able to test it properly on my pseries VM, but I didn't use usefdt=1, mainly because I didn't know where to use it. Should I need to recompile the loader to use it, or, is it a parameter somewhere?

Mar 6 2018, 3:38 PM · PowerPC

Mar 5 2018

nwhitehorn added a comment to D14499: Move powerpc64 direct map from 0 to 0xc000000000000000.

Nathan,

I tried you most recent patchset and it is still not working on pseries.

Mar 5 2018, 3:06 PM · PowerPC
nwhitehorn updated the diff for D14499: Move powerpc64 direct map from 0 to 0xc000000000000000.

Fix fault when synchronizing icache.

Mar 5 2018, 3:04 PM · PowerPC

Mar 4 2018

nwhitehorn accepted D14566: Powerpc64: Add the facility unavailable trap subsystem.
Mar 4 2018, 9:56 PM
nwhitehorn updated the summary of D14499: Move powerpc64 direct map from 0 to 0xc000000000000000.
Mar 4 2018, 3:30 PM · PowerPC
nwhitehorn updated the diff for D14499: Move powerpc64 direct map from 0 to 0xc000000000000000.
  • Fix graphics console on pSeries
  • Apparent PS3 bugs fixed by other patches (this was only triggering latent problems)
Mar 4 2018, 6:09 AM · PowerPC
nwhitehorn committed rS330371: Where we can, pass the kernel an FDT facsimile of the OF device tree rather.
Where we can, pass the kernel an FDT facsimile of the OF device tree rather
Mar 4 2018, 4:49 AM

Mar 3 2018

nwhitehorn committed rS330365: Move "common" Open Firmware parts of the loader used only on PowerPC to.
Move "common" Open Firmware parts of the loader used only on PowerPC to
Mar 3 2018, 11:39 PM
nwhitehorn added a reviewer for D14499: Move powerpc64 direct map from 0 to 0xc000000000000000: andreast.

Another thing to try with the Open Firmware crash is to set 'usefdt=1' in the loader. For me, either of these resolve the crash. Could you verify this on your hardware?

Mar 3 2018, 10:26 PM · PowerPC
nwhitehorn committed rS330306: Honor physical memory regions marked unavailable in the FDT, when present..
Honor physical memory regions marked unavailable in the FDT, when present.
Mar 3 2018, 2:06 AM
nwhitehorn committed rS330305: Remove assumption that all physical memory is available to the kernel and.
Remove assumption that all physical memory is available to the kernel and
Mar 3 2018, 2:05 AM

Mar 1 2018

nwhitehorn added a comment to D14538: PowerPC: Implement new memcpy using vectors.

I have a question about your 1st worry. Is this a scenario in which we are doing memcpy in eg. interrupt filter code? If not, could you explain what are you worry about?

Mar 1 2018, 2:39 PM
nwhitehorn added a comment to D14499: Move powerpc64 direct map from 0 to 0xc000000000000000.

If the above analyzes is correct, It seems that a function ends up with a conditional branch, so, if the condition is not reached, then it moved to the function epilogue, which is 0x0.

(gdb) x/10i 0x000000007dbe02f0
    0x7dbe02f0:	std     r0,296(r1)
    0x7dbe02f4:	mfdar   r0
    0x7dbe02f8:	std     r0,304(r1)
    0x7dbe02fc:	mfdsisr r0
    0x7dbe0300:	std     r0,312(r1)
    0x7dbe0304:	bcl     20,4*cr7+so,0x7dbe0310
    0x7dbe0308:	.long 0x0
    0x7dbe030c:	.long 0x87eef8
    0x7dbe0310:	mflr    r2
    0x7dbe0314:	ld      r1,0(r2)

But this is still very confusing, since there just two places in the code we use mfdsisr, and it is always with %r31.

I am wondering if something caused the code to leave the kernel code, and now I am debugging somewhere else (OpenFirmware?).

Mar 1 2018, 5:36 AM · PowerPC

Feb 27 2018

nwhitehorn requested changes to D14538: PowerPC: Implement new memcpy using vectors.

I have a few main worries about this, mostly also in the inline comments:

  1. I think this trashes userland vector registers, which is very bad.
  2. It breaks booting on Apple hardware.
  3. Is there really a performance benefit to this? The kernel tries pretty vigorously to avoid memcpy and no other architectures have vectorized in-kernel memcpy(), substantially to avoid the serious issues associated with concern 1, but also because it doesn't help much. I would imagine you would get much more benefit, with much less hassle, from optimizing the copy in libc, which would be 90% of the same code but with all the complex cases deleted.
Feb 27 2018, 7:46 PM

Feb 24 2018

nwhitehorn updated the diff for D14499: Move powerpc64 direct map from 0 to 0xc000000000000000.
Feb 24 2018, 11:24 PM · PowerPC
nwhitehorn updated the diff for D14499: Move powerpc64 direct map from 0 to 0xc000000000000000.
Feb 24 2018, 11:03 PM · PowerPC