Page MenuHomeFreeBSD

bdragon (Brandon Bergren)
Animal

Projects

User Details

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

Recent Activity

Today

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).

Wed, Jul 24, 1:19 AM

Yesterday

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

Tue, Jul 23, 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.

Tue, Jul 23, 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.)

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

Mon, Jul 22

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.

Mon, Jul 22, 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

Mon, Jul 22, 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.

Mon, Jul 22, 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.

Mon, Jul 22, 8:23 PM

Sat, Jul 20

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.

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

elfv1, new kernel, old userland:

Sat, Jul 20, 4:04 AM

Sat, Jul 13

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

Sun, Jul 7

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.

Sun, Jul 7, 5:21 PM

Mon, Jul 1

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.

Mon, Jul 1, 8:29 PM

Fri, Jun 28

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

Looks like r344264 and r344798 have fixed this independently.

Fri, Jun 28, 6:40 PM

Thu, Jun 27

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?

Thu, Jun 27, 4:59 PM

Tue, Jun 25

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.

Tue, Jun 25, 2:34 AM · arm64

Mon, Jun 24

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.

Mon, Jun 24, 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

Jan 3 2019

bdragon added a comment to D18604: Fix PowerPC64 ELFv2 checks in PCRE JIT..

The patch has been accepted upstream.

Jan 3 2019, 4:31 PM · PowerPC

Dec 19 2018

bdragon added reviewers for D18604: Fix PowerPC64 ELFv2 checks in PCRE JIT.: krion, linimon.
Dec 19 2018, 1:36 AM · PowerPC
bdragon retitled D18604: Fix PowerPC64 ELFv2 checks in PCRE JIT. from Fix ELFv2 checks in PCRE JIT. to Fix PowerPC64 ELFv2 checks in PCRE JIT..
Dec 19 2018, 1:34 AM · PowerPC
bdragon created D18604: Fix PowerPC64 ELFv2 checks in PCRE JIT..
Dec 19 2018, 1:32 AM · PowerPC

Dec 16 2018

bdragon added a comment to D18565: Fix warning in PowerPC64 ELFv2 build of rtld-elf..

On second thought, it looks like there might be cases where we should actually be checking the relocation. I'll fix this properly with the ifunc implementation I'll be submitting this week.

Dec 16 2018, 11:27 PM · PowerPC
bdragon created D18575: Add AT_HWCAP / AT_HWCAP2 to elf64_sysvec_v2..
Dec 16 2018, 5:37 AM · PowerPC

Dec 14 2018

bdragon created D18565: Fix warning in PowerPC64 ELFv2 build of rtld-elf..
Dec 14 2018, 11:44 PM · PowerPC
bdragon added a comment to D18547: Fix llvm-tblgen self-bootstrap.

This could plausibly be either that binutils ld.bfd is more picky than lld about undefined references (in code that is ultimately dead, possibly? JSON.o / MicrosoftMangle.o seem like the sort of thing to me that would end up ultimately trimmed out) or that my build went down a path that is untested on amd64.

Dec 14 2018, 9:17 PM
bdragon updated the diff for D18547: Fix llvm-tblgen self-bootstrap.

Always include xxhash.cpp in libllvm, to fix buildworld on powerpc64 with binutils ld.

Dec 14 2018, 9:05 PM
bdragon added a comment to D18547: Fix llvm-tblgen self-bootstrap.

I think it's possible that ld.bfd on powerpc64 is more picky than lld when it comes to missing references inside archives, because I am encountering a build failure on the main compiler as well.

Dec 14 2018, 8:17 PM
bdragon added a comment to D18547: Fix llvm-tblgen self-bootstrap.

make.conf:

OPTIONS_UNSET=DOCS NLS
WRKDIRPREFIX=/usr/obj
Dec 14 2018, 4:51 PM
bdragon created D18547: Fix llvm-tblgen self-bootstrap.
Dec 14 2018, 5:36 AM

Dec 1 2018

bdragon updated the diff for D18364: Fix PowerPC64 ELFv1-specific problem in __elf_phdr_match_addr() leading to crash in threaded programs that unload libraries..

Replaced the comment block with one that jhibbits wrote that's worded a lot better than mine.

Dec 1 2018, 1:37 AM · PowerPC

Nov 28 2018

bdragon created D18364: Fix PowerPC64 ELFv1-specific problem in __elf_phdr_match_addr() leading to crash in threaded programs that unload libraries..
Nov 28 2018, 1:25 AM · PowerPC

Nov 27 2018

bdragon created D18352: Allow truss to operate on ELFv2 processes..
Nov 27 2018, 4:11 AM · PowerPC

Nov 26 2018

bdragon updated the diff for D18330: Fix thread creation in PowerPC64 ELFv2 processes..

Fix ABI violation that was causing crash on thread exit.

Nov 26 2018, 6:25 AM · PowerPC

Nov 25 2018

bdragon created D18330: Fix thread creation in PowerPC64 ELFv2 processes..
Nov 25 2018, 9:19 AM · PowerPC

Nov 2 2018

bdragon created D17813: powerpc64: Fix "show spr" command on ELFv2 kernels.
Nov 2 2018, 4:04 AM · PowerPC

Oct 31 2018

bdragon added a comment to D17117: rtld: set obj->textsize correctly.

Looks good to me too, and I think it's important for anything doing textrelocs on ppc.

Oct 31 2018, 1:24 AM

Oct 29 2018

bdragon added a comment to D17601: ppc64: limited 32-bit DMA address range.

Additionally, the setting of lowaddr to an address below the end of phys memory will force bus_dmamem_alloc to always do contig malloc, which causes additional pressure and possibility of failure. sys/powerpc/powerpc/busdma_machdep.c badly needs some updating to handle stuff like multiple segment allocations and multiple exclusion ranges.

Oct 29 2018, 6:01 PM
bdragon added a comment to D17601: ppc64: limited 32-bit DMA address range.

On POWER9, the controllers operate in 32 bit and 64 bit mode simultaneously. A full fix will require teaching the dma tag handling to handle multiple exclusion ranges, I imagine. Right now it's hardcoded to only allocate memory between 0x0 and lowaddr, and it ignores highaddr entirely.

Oct 29 2018, 5:55 PM
bdragon added a comment to D17601: ppc64: limited 32-bit DMA address range.

Specifically, here's the problem that we're seeing on the Talos II:

Oct 29 2018, 5:52 PM