Page MenuHomeFreeBSD

bdragon (Brandon Bergren)
Animal

Projects

User Details

User Since
Jun 6 2018, 11:31 PM (66 w, 4 d)

Recent Activity

Sat, Sep 14

bdragon created D21656: Fix aux_info corruption in rtld direct execution mode.
Sat, Sep 14, 3:54 AM

Tue, Sep 10

bdragon added inline comments to D19237: Fix TARGET_TRIPLE variable assembly when specifying TARGET_ABI.
Tue, Sep 10, 1:45 PM

Mon, Sep 9

bdragon added inline comments to D21476: [PowerPC] force applications linked with lib CSU to have .got.
Mon, Sep 9, 3:16 PM

Sat, Sep 7

bdragon added inline comments to D19237: Fix TARGET_TRIPLE variable assembly when specifying TARGET_ABI.
Sat, Sep 7, 10:39 PM
bdragon added inline comments to D21163: Make p_vaddr % p_align == p_offset % p_align for TLS segments..
Sat, Sep 7, 3:49 AM
bdragon added inline comments to D21163: Make p_vaddr % p_align == p_offset % p_align for TLS segments..
Sat, Sep 7, 3:41 AM
bdragon added inline comments to D21163: Make p_vaddr % p_align == p_offset % p_align for TLS segments..
Sat, Sep 7, 2:08 AM
bdragon added inline comments to D21163: Make p_vaddr % p_align == p_offset % p_align for TLS segments..
Sat, Sep 7, 1:57 AM

Fri, Sep 6

bdragon added a comment to D21163: Make p_vaddr % p_align == p_offset % p_align for TLS segments..

Hmm, calculations on powerpc64 seem to be offset incorrectly in both cases with the patched lld. Gonna meditate on a disassembly for a bit.

Fri, Sep 6, 11:24 PM
bdragon added a comment to D21163: Make p_vaddr % p_align == p_offset % p_align for TLS segments..

Testing powerpc64.

Fri, Sep 6, 8:52 PM

Sun, Sep 1

bdragon added a comment to D21476: [PowerPC] force applications linked with lib CSU to have .got.

Interesting thought. That seems to me like it should also help a lot with the logic in ld.bfd as well.

Sun, Sep 1, 6:30 PM

Fri, Aug 30

bdragon added inline comments to D21449: powerpc/pmap: NUMA-ize vm_page_array on powerpc.
Fri, Aug 30, 7:35 PM

Sat, Aug 17

bdragon added a comment to D21301: powerpc: Link Book-E kernels at the same address as AIM kernels.

The new KERNBASE allows my RB800 to boot without having to modify it, so that's a definite improvement there.
Will check for regression on G4 / G5 / POWER9 (and maybe test the X5000, if I can finally get uboot loader set up on it so I don't have to futz with mkimg to build test kernels) tomorrow.

Sat, Aug 17, 5:05 AM
bdragon added a comment to D21301: powerpc: Link Book-E kernels at the same address as AIM kernels.

on MPC85XXSPE build:

Sat, Aug 17, 4:49 AM

Aug 17 2019

bdragon created D21297: Fix loader on powerpc32.
Aug 17 2019, 12:08 AM · PowerPC

Aug 8 2019

bdragon added a comment to D20946: Bypass errno handling in _umtx_op_err on powerpc.

removing belt&suspenders bit.

Aug 8 2019, 4:00 AM · PowerPC

Aug 7 2019

bdragon added inline comments to D21070: [PPC64] Add ifunc support in libcsu.
Aug 7 2019, 8:56 PM
bdragon added inline comments to D21070: [PPC64] Add ifunc support in libcsu.
Aug 7 2019, 8:52 PM
bdragon added inline comments to D21070: [PPC64] Add ifunc support in libcsu.
Aug 7 2019, 8:27 PM

Jul 26 2019

bdragon added a comment to D21061: powerpc64/mmu: Use a SLIST for the PVO delete list, instead of a RB_TREE.

ELFv1 and ELFv2 buildworld worked fine.

Jul 26 2019, 4:34 AM
bdragon added a comment to D21061: powerpc64/mmu: Use a SLIST for the PVO delete list, instead of a RB_TREE.

Boots on ELFv1 and ELFv2. Doing a buildworld to excercise it a bit.

Jul 26 2019, 3:04 AM

Jul 25 2019

bdragon added a comment to D20799: Eliminate the last MI difference in AT_* definitions (for powerpc)..

That's up to jhibbits.

Jul 25 2019, 3:39 AM

Jul 24 2019

bdragon added a comment to D20799: Eliminate the last MI difference in AT_* definitions (for powerpc)..

My patch seemed to fix things. I was able to buildworld and installworld (after rolling base back to a non crashy version).

Jul 24 2019, 1:19 AM

Jul 23 2019

bdragon added a comment to D20799: Eliminate the last MI difference in AT_* definitions (for powerpc)..

I'm going to try this and see if it works:
http://drop.rtk0.net/rtld-auxv-flexibility.patch

Jul 23 2019, 11:24 PM
bdragon added a comment to D20799: Eliminate the last MI difference in AT_* definitions (for powerpc)..

Actually, we might be able to determine what format the aux vector is by heuristics.

Jul 23 2019, 10:52 PM
bdragon added a comment to D20799: Eliminate the last MI difference in AT_* definitions (for powerpc)..

OK, with OLD_AT_COUNT dropped down to 27, it continues working (whether or not I use 32 or 27 in exec_copyout_strings(), so it looks like it will continue to work even if the normal AT_COUNT is incremented in the future.)

Jul 23 2019, 4:25 PM
bdragon added inline comments to D20799: Eliminate the last MI difference in AT_* definitions (for powerpc)..
Jul 23 2019, 2:10 AM

Jul 22 2019

bdragon added a comment to D20799: Eliminate the last MI difference in AT_* definitions (for powerpc)..

Yep, that did it. exec_copyout_strings() needs to use the correct size for the aux vector or it will screw things up somehow.

Jul 22 2019, 9:49 PM
bdragon added a comment to D20799: Eliminate the last MI difference in AT_* definitions (for powerpc)..

I built a test program to examine auxv (or at least libc's idea of it): http://drop.rtk0.net/auxv.c

Jul 22 2019, 9:42 PM
bdragon added a comment to D20799: Eliminate the last MI difference in AT_* definitions (for powerpc)..

Yeah, I had bumped both of the sys/sys/param.h lines to 1300037.

Jul 22 2019, 8:35 PM
bdragon added a comment to D20799: Eliminate the last MI difference in AT_* definitions (for powerpc)..

Yeah, I had. Bumped both in sys/sys/param.h. Getting back into the machine to double check that I didn't do something silly with that now.

Jul 22 2019, 8:23 PM

Jul 20 2019

bdragon added a comment to D20799: Eliminate the last MI difference in AT_* definitions (for powerpc)..

Hmm, additionally, it looks like AT_EXECPATH is damaged, because I can't use /rescue/sh either, it just comes up with the usage.

Jul 20 2019, 4:08 AM
bdragon added a comment to D20799: Eliminate the last MI difference in AT_* definitions (for powerpc)..

elfv1, new kernel, old userland:

Jul 20 2019, 4:04 AM

Jul 13 2019

bdragon updated the summary of D20946: Bypass errno handling in _umtx_op_err on powerpc.
Jul 13 2019, 8:29 PM · PowerPC
bdragon created D20946: Bypass errno handling in _umtx_op_err on powerpc.
Jul 13 2019, 8:28 PM · PowerPC

Jul 7 2019

bdragon added a comment to D20857: [PPC64] pseries: fix realmaxaddr calculation.

Makes sense to me. That's the same sort of thing that chrp_mem_regions() is doing to determine it for its own purposes.

Jul 7 2019, 5:21 PM

Jul 1 2019

bdragon added a comment to D20261: [PowerPC64] Adds support for using ld.bfd on LIB32 and STAND, when default linker is ld.lld.

Not 100% sure, but I think you should skip the logic if either _NO_INCLUDE_COMPILERMK or _NO_INCLUDE_LINKERMK is defined. That appears to be what controls the variables not being defined.

Jul 1 2019, 8:29 PM

Jun 28 2019

bdragon added a comment to D18547: Fix llvm-tblgen self-bootstrap.

Looks like r344264 and r344798 have fixed this independently.

Jun 28 2019, 6:40 PM

Jun 27 2019

bdragon added a comment to D20782: [PowerPC64] readelf: print description for 'e_flags' in ELF header (ABI type).

Maybe move the EM_PPC: case down to right before the edesc = powerpc_eflags_desc; line and explicitly fall through there so that the e_flags code only runs on ppc64 and not ppc32, but both of them do the edesc?

Jun 27 2019, 4:59 PM

Jun 25 2019

bdragon added a comment to D19046: Rockchip RK3399 PWM driver.

Will address comments and catch up with the latest API changes soon. Poking at it this evening.

Jun 25 2019, 2:34 AM · arm64

Jun 24 2019

D20598: powerpc: Transition to Secure-PLT, like most other OSs is now accepted and ready to land.

Current version tested on iBook G4, still works.
Current version also tested on rb800 (powerpcspe), works as well.

Jun 24 2019, 3:49 PM

Jun 14 2019

bdragon added a comment to D20640: Enable use of ofwcons for early debug.

I like the idea, it beats having to compile a custom kernel. This is also relevant on some of my macintoshes, where the keyboard works in OFW but not in the kernel debugger when I have an early crash.

Jun 14 2019, 7:48 PM

Jun 13 2019

bdragon added a comment to D17512: Fix dpcpu and vnet panics with complex types at the end of the section.

Over in powerpc land, we've been chasing crashes with dpcpu and vnet as well. Our current prospective fix is https://reviews.freebsd.org/D20461 but we don't understand why it seems to fix it.

Jun 13 2019, 1:01 PM

Jun 12 2019

bdragon requested changes to D20337: [PowerPC64] backport of LLVM fixes in preparation for building FreeBSD/PowerPC64.

needs reroll, the backport of most of this landed with r349004.

Jun 12 2019, 10:07 PM
bdragon closed D20608: Fix PPC970 boot after r348783.
Jun 12 2019, 3:58 PM · PowerPC
bdragon committed rS348994: Fix PPC970 boot after r348783.
Fix PPC970 boot after r348783
Jun 12 2019, 3:58 PM
bdragon removed a watcher for PowerPC: bdragon.
Jun 12 2019, 1:42 PM
bdragon added a member for PowerPC: bdragon.
Jun 12 2019, 1:42 PM

Jun 11 2019

bdragon added inline comments to D20598: powerpc: Transition to Secure-PLT, like most other OSs.
Jun 11 2019, 8:32 PM
bdragon updated the diff for D20608: Fix PPC970 boot after r348783.

fix style(9) issue.

Jun 11 2019, 8:01 PM · PowerPC
bdragon created D20608: Fix PPC970 boot after r348783.
Jun 11 2019, 5:00 PM · PowerPC

Jun 2 2019

pi renamed bdragon from git_bdragon.rtk0.net to bdragon.
Jun 2 2019, 5:23 PM

May 27 2019

bdragon updated the summary of D20367: Add missing powerpc64 relocation support to libdwarf.
May 27 2019, 4:45 AM · PowerPC
bdragon retitled D20367: Add missing powerpc64 relocation support to libdwarf from Add missing powerpc64 support to libdwarf to Add missing powerpc64 relocation support to libdwarf.
May 27 2019, 4:41 AM · PowerPC

May 26 2019

bdragon created D20413: Fix link_elf_ctf_get() on big endian platforms.
May 26 2019, 5:39 PM · PowerPC

May 23 2019

bdragon added inline comments to D20367: Add missing powerpc64 relocation support to libdwarf.
May 23 2019, 1:47 AM · PowerPC
bdragon updated the diff for D20367: Add missing powerpc64 relocation support to libdwarf.

fix my diff config, context was missing

May 23 2019, 12:16 AM · PowerPC
bdragon added a reviewer for D20367: Add missing powerpc64 relocation support to libdwarf: emaste.
May 23 2019, 12:10 AM · PowerPC

May 22 2019

bdragon added a comment to D20367: Add missing powerpc64 relocation support to libdwarf.

This is the root cause of all the ctfmerge oddness on powerpc64.

May 22 2019, 11:55 PM · PowerPC
bdragon updated the diff for D20367: Add missing powerpc64 relocation support to libdwarf.

Fix backwards logic.

May 22 2019, 11:52 PM · PowerPC
bdragon added a comment to D20367: Add missing powerpc64 relocation support to libdwarf.

Of course I was getting the first part backwards. The point stands that the support was missing.

May 22 2019, 11:48 PM · PowerPC
bdragon updated the test plan for D20367: Add missing powerpc64 relocation support to libdwarf.
May 22 2019, 11:19 PM · PowerPC
bdragon created D20367: Add missing powerpc64 relocation support to libdwarf.
May 22 2019, 11:06 PM · PowerPC
bdragon created D20346: Fix fbt blacklisting all functions on ELFv2 kernels.
May 22 2019, 3:50 AM · PowerPC

May 21 2019

bdragon updated the diff for D19352: Fix PPC64 kernel build with clang8 + lld8.

Remove DMAP_ZERO bits -- since we're in real mode while in the trap area, we can reach the magic trap address as TRAP_GENTRAP(0).

May 21 2019, 4:31 PM

May 20 2019

bdragon added inline comments to D20261: [PowerPC64] Adds support for using ld.bfd on LIB32 and STAND, when default linker is ld.lld.
May 20 2019, 4:42 PM

May 18 2019

bdragon added a comment to D20301: Update loader size on powerpc isos.

Loader comes up fine and loads kernel on my iMac G3 using the same cd. (Ctrl-c'd it at that point since the ppc64 kernel won't run on g3)

May 18 2019, 5:28 AM · PowerPC
bdragon added a comment to D20301: Update loader size on powerpc isos.

regenerated hfs stats:

May 18 2019, 4:45 AM · PowerPC
bdragon created D20301: Update loader size on powerpc isos.
May 18 2019, 4:08 AM · PowerPC

May 15 2019

bdragon updated the diff for D19352: Fix PPC64 kernel build with clang8 + lld8.

This one is not tested properly yet but I wanted to bounce the idea off jhibbits.

May 15 2019, 11:22 PM

May 1 2019

bdragon added a comment to D20121: Optimize padding in powerpc busdma_machdep.c.

Yeah I meant bits, not bytes. 64 bits. 8 bytes.

May 1 2019, 6:02 PM · PowerPC
bdragon created D20121: Optimize padding in powerpc busdma_machdep.c.
May 1 2019, 4:14 AM · PowerPC

Apr 7 2019

bdragon added a comment to D19352: Fix PPC64 kernel build with clang8 + lld8.

Going to work on some issues I noticed with the power_save_sequence.

Apr 7 2019, 5:41 PM
bdragon added a comment to D19352: Fix PPC64 kernel build with clang8 + lld8.

@luporl Feel free to commandeer this back again. Please do a test of the updated trap code with clang8/lld8. I have sucessfully booted this with my base/gcc 8.2.0.

Apr 7 2019, 4:59 PM
bdragon added a comment to D19352: Fix PPC64 kernel build with clang8 + lld8.

marking done on addressed comments.

Apr 7 2019, 4:52 PM
bdragon updated the diff for D19352: Fix PPC64 kernel build with clang8 + lld8.

Rewrote trap code to not waste valuable trap space for addresses that are easily calculatable.
Tighten up the reset vector by one instruction.

Apr 7 2019, 4:51 PM
bdragon commandeered D19352: Fix PPC64 kernel build with clang8 + lld8.

Commandeering this to post updated trap code.

Apr 7 2019, 4:49 PM

Apr 6 2019

bdragon added a comment to D19352: Fix PPC64 kernel build with clang8 + lld8.

Yep, there is indeed an 8-byte alignment restriction on .toc.
Also the section being subsumed into .got might throw off the linker as well.

Apr 6 2019, 9:03 PM
bdragon added a comment to D19352: Fix PPC64 kernel build with clang8 + lld8.

Well, it's probably from the alignment being off. Ensuring alignment there makes sense to me imo. Checking what the actual requirements are...

Apr 6 2019, 8:56 PM

Mar 29 2019

bdragon added a comment to D19352: Fix PPC64 kernel build with clang8 + lld8.

The TOC_REF bits have landed separately as rS345676.

Mar 29 2019, 3:39 AM

Mar 26 2019

bdragon added a comment to D19649: Rename fuse(4) to fusefs(4).

Note: The LINKS= line breaks installkernel on systems where /boot is a msdos filesystem (currently needed on some petitboot systems on powerpc64 -- Talos II in particular, due to lack of UFS support in the default PNOR builds)

Mar 26 2019, 5:33 PM
bdragon added a comment to D19708: powerpc64: Use medium code model in asm files for TOC references.

Looks good here. It has the bugs fixed that I had in the original. +1

Mar 26 2019, 2:43 PM

Mar 17 2019

bdragon added a comment to D19352: Fix PPC64 kernel build with clang8 + lld8.

Some parts of this will land separately. The ldscript chanages are split off to D19574 as more cases have been discovered where kernels were built with multiple PT_LOAD sections, even on ELFv1, and it should probably go in first.

Mar 17 2019, 5:42 PM

Mar 16 2019

bdragon added a comment to D19574: powerpc64: Fix kernel ldscript to only emit one PT_LOAD segment.

ELFv1 test went fine too on the G5.

Mar 16 2019, 8:35 PM

Mar 15 2019

bdragon added a comment to D19574: powerpc64: Fix kernel ldscript to only emit one PT_LOAD segment.

This is functionally identical to what I've been running locally since last October for my ELFv2 kernel builds.

Mar 15 2019, 5:32 AM

Mar 12 2019

bdragon added inline comments to D19516: powerpc64: Implement Radix MMU for POWER9 CPUs.
Mar 12 2019, 10:57 PM

Feb 26 2019

bdragon created D19373: Silence irrelevant warning on 32 bit platforms..
Feb 26 2019, 11:54 PM

Feb 25 2019

bdragon added a comment to D19352: Fix PPC64 kernel build with clang8 + lld8.

Regarding the sys/conf/Makefile.powerpc, sys/conf/kern.pre.mk and
sys/powerpc/include/vparam.h changes that you left out, leaving them out is correct -- they were POWER9BSD and/or local hacks that are unrelated.

Feb 25 2019, 6:38 PM

Feb 22 2019

bdragon added a reviewer for D19291: Since the compatibility code for FreeBSD < 11.2 was removed, we can unconditionally omit objcopy in base/binutils.: bapt.
Feb 22 2019, 1:45 AM
bdragon created D19291: Since the compatibility code for FreeBSD < 11.2 was removed, we can unconditionally omit objcopy in base/binutils..
Feb 22 2019, 1:36 AM

Feb 18 2019

bdragon accepted D19237: Fix TARGET_TRIPLE variable assembly when specifying TARGET_ABI.

Yeah, that's better.

Feb 18 2019, 8:57 PM

Feb 14 2019

bdragon added inline comments to D19046: Rockchip RK3399 PWM driver.
Feb 14 2019, 6:09 PM · arm64

Jan 31 2019

bdragon created D19046: Rockchip RK3399 PWM driver.
Jan 31 2019, 4:35 PM · arm64

Jan 15 2019

bdragon accepted D18807: silence cast-align warnings from clang on powerpc64.

32 bit version works fine on G4.

Jan 15 2019, 8:50 PM

Jan 10 2019

bdragon added a comment to D18807: silence cast-align warnings from clang on powerpc64.

C question: Would a cast through void* be a better workaround for this specific issue by the way?

Jan 10 2019, 4:37 PM
bdragon added a comment to D18807: silence cast-align warnings from clang on powerpc64.
In D18807#401468, @kib wrote:

So it is only in _tcb_get() ? Can you use #pragma to only disable the warning at the place ? https://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas
I do not like too broad settings which might prevent some useful warning ignored.

Jan 10 2019, 4:34 PM
bdragon abandoned D18565: Fix warning in PowerPC64 ELFv2 build of rtld-elf..

Abandoning in favor of the D18808 solution.

Jan 10 2019, 4:17 PM · PowerPC
bdragon accepted D18808: fix rtld-elf compilation warning for powerpc64 ELFv2 ABI.

OK, I'm fine with this solution.

Jan 10 2019, 4:14 PM

Jan 7 2019

bdragon added a project to D14484: powerpc64: Add a trap stack area: PowerPC.
Jan 7 2019, 11:06 PM · PowerPC
bdragon added a comment to D14484: powerpc64: Add a trap stack area.

32-bit version of the code is working OK on my iBook G4.

Jan 7 2019, 10:22 PM · PowerPC