Page MenuHomeFreeBSD

shipujin.t_gmail.com (Shi Pujin )
User

Projects

User is not a member of any projects.

User Details

User Since
Sep 10 2026, 2:37 AM (8 w, 2 d)

Recent Activity

Sat, Oct 17

shipujin.t_gmail.com added a reviewer for D59901: kldxref: add LoongArch support: shipujin.t_gmail.com.
Sat, Oct 17, 1:10 AM
shipujin.t_gmail.com added a reviewer for D59898: libthr: add LoongArch support: shipujin.t_gmail.com.
Sat, Oct 17, 1:09 AM
shipujin.t_gmail.com added a reviewer for D59897: rtld: add LoongArch support: shipujin.t_gmail.com.
Sat, Oct 17, 1:08 AM
shipujin.t_gmail.com added a reviewer for D59895: lib/msun: add LoongArch support: shipujin.t_gmail.com.
Sat, Oct 17, 1:07 AM
shipujin.t_gmail.com added a reviewer for D59894: libsys: add LoongArch support: shipujin.t_gmail.com.
Sat, Oct 17, 1:07 AM
shipujin.t_gmail.com added a reviewer for D59893: libc: add LoongArch support: shipujin.t_gmail.com.
Sat, Oct 17, 1:06 AM
shipujin.t_gmail.com added a reviewer for D59892: lib/csu: add LoongArch support: shipujin.t_gmail.com.
Sat, Oct 17, 1:06 AM
shipujin.t_gmail.com added a reviewer for D59891: build: add LoongArch build infrastructure: shipujin.t_gmail.com.
Sat, Oct 17, 1:04 AM
shipujin.t_gmail.com added a reviewer for D59890: loongarch: add initial kernel support: shipujin.t_gmail.com.
Sat, Oct 17, 1:03 AM
shipujin.t_gmail.com added a reviewer for D59889: loader: add LoongArch EFI loader support: shipujin.t_gmail.com.
Sat, Oct 17, 1:02 AM

Thu, Oct 15

shipujin.t_gmail.com added inline comments to D59890: loongarch: add initial kernel support.
Thu, Oct 15, 8:56 AM

Mon, Oct 12

shipujin.t_gmail.com added a reviewer for D60580: LoongArch: Add to config.sub/config.guess: tijl.
Mon, Oct 12, 7:26 AM

Sat, Oct 10

shipujin.t_gmail.com requested review of D60580: LoongArch: Add to config.sub/config.guess.
Sat, Oct 10, 9:46 AM

Oct 6 2026

shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

0x100d0014 is the LS7A bridge chip's private ACPI PM1_CNT physical address and should not be hardcoded in generic kernel code.

Oct 6 2026, 3:30 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

suggested to use the generic uiomove_step() instead of the inline switch/case,
consistent with architectures such as amd64/arm64/riscv/powerpc, to avoid duplicating the implementation.

Oct 6 2026, 2:04 AM

Oct 5 2026

shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

base_freq * cfm is computed as uint32_t, so the intermediate result may exceed 2^32-1 and overflow; it should be changed to ((uint64_t)base_freq * cfm) / cfd to perform 64-bit multiplication.

Oct 5 2026, 9:23 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

ll/sc only guarantees the atomicity of that read-modify-write, not ordering with surrounding memory accesses; a successful CAS should have at least acquire/release semantics.

Oct 5 2026, 8:14 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

ptrace_clear_single_step() only clears a software flag, td->td_md.md_ss_active, but does not write the hardware CSRs (LOONG_CSR_IB0CTRL and LOONGARCH_CSR_FWPS) to actually disable IB0.

Oct 5 2026, 6:24 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

pmap_enter() hardcodes PTE_CC and ignores m->md.pv_memattr.

Oct 5 2026, 3:15 AM

Oct 4 2026

shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

The version register read operation uses unnamed numbers.

Oct 4 2026, 9:24 AM
shipujin.t_gmail.com added inline comments to D59890: loongarch: add initial kernel support.
Oct 4 2026, 8:19 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

ofwbus should only be added when the system has no ACPI RSDP (i.e. FDT boot).

Oct 4 2026, 7:43 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

When setting the CPU bitmap all_cpus, cpu_mp_start() incorrectly uses the hardware cpuid boot_cpu, whereas all_cpus should use the logical cpuid (0-based).

Oct 4 2026, 6:16 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

FDT and ACPI code for starting an AP does the same thing, so they must send the same IPI. Changing both the original 2 (PREEMPT) and 1 (AST) to IPI_WAKEUP eliminates the inconsistency and avoids sending a preemption signal during early AP startup.

Oct 4 2026, 3:22 AM
shipujin.t_gmail.com added inline comments to D59890: loongarch: add initial kernel support.
Oct 4 2026, 1:08 AM

Oct 3 2026

shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

cpu_flush_dcache() is an empty function, which would make callers believe the cache has been flushed.

Oct 3 2026, 10:02 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

Change the cpuhead list traversal to CPU_FOREACH_ISSET to iterate directly over the target cpuset, avoiding scanning all online CPUs, consistent with other architecture implementations, and remove the redundant pc_pending_ipis setting.

Oct 3 2026, 8:02 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

mvendorid/marchid/mimpid are RISC-V CSR names, and has_sstc/has_sscofpmf are RISC-V extensions. LoongArch does not have these, so they should not exist in LoongArch at all. LoongArch's CPU identity information should be read via CPUCFG-related instructions.

Oct 3 2026, 3:48 AM

Oct 2 2026

shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

TF_FCSR0/_FCC relies on anonymous union members.

Oct 2 2026, 7:44 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

This macro is defined in elf.h, but hardware capability bits are more appropriate in <machine/cpu.h>. Making pmap.h depend on an ELF header is not appropriate.

Oct 2 2026, 4:04 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

cpu_desc[MAXCPU] is declared in pmap.h, which is not an appropriate place.

Oct 2 2026, 2:01 AM

Oct 1 2026

shipujin.t_gmail.com added inline comments to D59890: loongarch: add initial kernel support.
Oct 1 2026, 9:08 AM
shipujin.t_gmail.com added inline comments to D59890: loongarch: add initial kernel support.
Oct 1 2026, 7:51 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

Fix non-standard C99 anonymous unions/structs.

Oct 1 2026, 7:46 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

Do not allow GDB to write $zero (r0) into the trapframe.

Oct 1 2026, 6:21 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

The full FP / LSX / LASX context is saved on every exception, which is a significant overhead on every exception.

Oct 1 2026, 5:59 AM
shipujin.t_gmail.com added inline comments to D59890: loongarch: add initial kernel support.
Oct 1 2026, 3:10 AM
shipujin.t_gmail.com added inline comments to D59890: loongarch: add initial kernel support.
Oct 1 2026, 2:24 AM
shipujin.t_gmail.com added inline comments to D59890: loongarch: add initial kernel support.
Oct 1 2026, 1:07 AM

Sep 30 2026

shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

Please pass count through to db_stack_trace_cmd() and use it to bound the loop.

Sep 30 2026, 9:40 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

%u is used to print uint64_t fields.

Sep 30 2026, 8:17 AM
shipujin.t_gmail.com added inline comments to D59890: loongarch: add initial kernel support.
Sep 30 2026, 7:23 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

invtlb is not in 3R register format, but rather op, rj, rk (an immediate plus two registers). Using pr_rrr would incorrectly display the op field as a register name.

Sep 30 2026, 7:22 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

addi.w skip logic is based on an incorrect premise, It is suggested to remove this code.

Sep 30 2026, 6:36 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

JIRL/LL/SC offsets are as *4 instead of *2.

Sep 30 2026, 6:13 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

ops[] is not NULL-terminated.

Sep 30 2026, 5:54 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

IRQ_NMI / IRQ_AVEC should not appear in the CPUINTC enum.

Sep 30 2026, 3:13 AM
shipujin.t_gmail.com added inline comments to D59890: loongarch: add initial kernel support.
Sep 30 2026, 2:16 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

It only contains a cpu_initclocks() stub that calls cpu_initclocks_bsp() / cpu_initclocks_ap(), with no timecounter, no eventtimer, no timer CSR programming (TCFG/T/TICLR), and no interrupt handler.

Sep 30 2026, 1:51 AM

Sep 29 2026

shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

bs_rs_s takes 4 arguments, but bus_space_read_stream_8 passes 5; please remove the extra 8 so it reads bs_rs_s(8,(t),(h),(o))

Sep 29 2026, 2:04 PM
shipujin.t_gmail.com retitled D60111: riscv/bus.h: `__bs_rs_s` takes 4 arguments, but `bus_space_read_stream_8` passes 5; please remove the extra `8` so it reads `__bs_rs_s(8,(t),(h),(o))` from `__bs_rs_s` takes 4 arguments, but `bus_space_read_stream_8` passes 5; please remove the extra `8` so it reads `__bs_rs_s(8,(t),(h),(o))`
Sep 29 2026, 2:43 AM
shipujin.t_gmail.com requested review of D60111: riscv/bus.h: `__bs_rs_s` takes 4 arguments, but `bus_space_read_stream_8` passes 5; please remove the extra `8` so it reads `__bs_rs_s(8,(t),(h),(o))`.
Sep 29 2026, 2:39 AM

Sep 27 2026

shipujin.t_gmail.com added a comment to D59896: libproc: add LoongArch support.

LGTM.

Sep 27 2026, 6:31 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

Remove the privileged CSRs, so struct reg becomes smaller and the ptrace ABI is cleaner.

Sep 27 2026, 6:20 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

Fix non-standard C99 anonymous unions/structs in <machine/reg.h> and <machine/ucontext.h>.

Sep 27 2026, 4:32 AM
shipujin.t_gmail.com added inline comments to D60045: stand: fallback to hob list search to locate FDT.
Sep 27 2026, 3:57 AM
shipujin.t_gmail.com added inline comments to D60045: stand: fallback to hob list search to locate FDT.
Sep 27 2026, 1:19 AM

Sep 26 2026

shipujin.t_gmail.com added inline comments to D59901: kldxref: add LoongArch support.
Sep 26 2026, 6:34 AM
shipujin.t_gmail.com added inline comments to D59900: dtrace: add LoongArch support.
Sep 26 2026, 2:41 AM

Sep 25 2026

shipujin.t_gmail.com added inline comments to D59898: libthr: add LoongArch support.
Sep 25 2026, 2:08 PM
shipujin.t_gmail.com added inline comments to D59897: rtld: add LoongArch support.
Sep 25 2026, 1:58 PM
shipujin.t_gmail.com added inline comments to D59897: rtld: add LoongArch support.
Sep 25 2026, 1:35 PM
shipujin.t_gmail.com added inline comments to D59897: rtld: add LoongArch support.
Sep 25 2026, 1:19 PM
shipujin.t_gmail.com added a comment to D59896: libproc: add LoongArch support.

break 0 is BRK_DEFAULT, not a user-breakpoint code, use break 0x4 (BRK_USERBP)

Sep 25 2026, 9:33 AM
shipujin.t_gmail.com added inline comments to D59895: lib/msun: add LoongArch support.
Sep 25 2026, 8:01 AM
shipujin.t_gmail.com added inline comments to D59890: loongarch: add initial kernel support.
Sep 25 2026, 7:09 AM
shipujin.t_gmail.com added inline comments to D59894: libsys: add LoongArch support.
Sep 25 2026, 7:08 AM
shipujin.t_gmail.com added inline comments to D59894: libsys: add LoongArch support.
Sep 25 2026, 6:15 AM
shipujin.t_gmail.com added inline comments to D59894: libsys: add LoongArch support.
Sep 25 2026, 5:55 AM
shipujin.t_gmail.com added inline comments to D59894: libsys: add LoongArch support.
Sep 25 2026, 3:54 AM
shipujin.t_gmail.com added inline comments to D59890: loongarch: add initial kernel support.
Sep 25 2026, 3:28 AM

Sep 24 2026

shipujin.t_gmail.com added inline comments to D59894: libsys: add LoongArch support.
Sep 24 2026, 4:06 PM
shipujin.t_gmail.com added inline comments to D59893: libc: add LoongArch support.
Sep 24 2026, 3:46 PM
shipujin.t_gmail.com added inline comments to D59893: libc: add LoongArch support.
Sep 24 2026, 3:12 PM
shipujin.t_gmail.com added inline comments to D59893: libc: add LoongArch support.
Sep 24 2026, 2:53 PM
shipujin.t_gmail.com added inline comments to D59893: libc: add LoongArch support.
Sep 24 2026, 2:23 PM
shipujin.t_gmail.com added inline comments to D59892: lib/csu: add LoongArch support.
Sep 24 2026, 9:31 AM
shipujin.t_gmail.com added inline comments to D59892: lib/csu: add LoongArch support.
Sep 24 2026, 9:07 AM
shipujin.t_gmail.com added inline comments to D59890: loongarch: add initial kernel support.
Sep 24 2026, 7:35 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

bus_dma_impl.h uses the old busdma internal API (filter / parent / ref_count) that has already been removed upstream in FreeBSD.

Sep 24 2026, 6:10 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

Here $t0 is hardcoded as the temporary register for SC and communicated to the compiler via the "t0" clobber, but I think a better approach would be to use the output register res directly for the SC, without needing an extra temporary register.

Sep 24 2026, 4:22 AM
shipujin.t_gmail.com added inline comments to D59891: build: add LoongArch build infrastructure.
Sep 24 2026, 1:06 AM

Sep 23 2026

shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

According to the LoongArch ELF ABI register convention, $r21 is marked as Reserved (Non-allocatable) and cannot be used as a PCPU pointer; you can use $tp instead: LoongArch ABI thread pointer register is $tp (r2).

Sep 23 2026, 4:04 PM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

C++ conditional guards should not be added here; adding them here would make the behavior inconsistent with other architectures.

Sep 23 2026, 3:44 PM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

There is no functional issue here, but the placement of the bit-width macros is inconsistent with upstream conventions. They could be moved to the front of the file, consistent with the placement in other architectures, to improve code readability.

Sep 23 2026, 3:28 PM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

Please complete the binary format specifier macros PRIb* / PRIB* / SCNb*. Upstream RISC-V/ARM64 _inttypes.h already includes them, and the Loong64 LP64 ABI determines the width selection.

Sep 23 2026, 3:13 PM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

You should not delete _bus_dmamap_addsegs() ; please pull the latest main branch code.

Sep 23 2026, 2:27 PM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

Because sys/kern/link_elf_obj.c is a machine-independent file, LoongArch-specific macros cannot be expanded directly in it.

Sep 23 2026, 2:20 PM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

Please clarify whether this is because the pmap has not yet been initialized, or because DMW0 has already been configured during the early console stage. This does not look like something applicable to all LoongArch platforms, and it seems to be bypassing the normal mapping interface.

Sep 23 2026, 12:38 PM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

Perhaps it would be more appropriate to use the fence() wrapper newly added in machine/atomic.h.

Sep 23 2026, 11:46 AM
shipujin.t_gmail.com added a comment to D59890: loongarch: add initial kernel support.

Wrap the assembly fence() in atomic.h, For consistency in code style, use the fence() wrapper newly added in machine/atomic.h. This way, if changes are needed later, only the fence() wrapper has to be modified.

Sep 23 2026, 11:22 AM
shipujin.t_gmail.com added a comment to D59889: loader: add LoongArch EFI loader support.

code review

Sep 23 2026, 10:12 AM
shipujin.t_gmail.com added a comment to D59889: loader: add LoongArch EFI loader support.

Conduct code review

Sep 23 2026, 7:49 AM
shipujin.t_gmail.com added a comment to D59889: loader: add LoongArch EFI loader support.

It is suggested to remove the explicitly defined setcommand_set and set_Xficl_compile_set output sections, and just retain them via objcopy -j.

Sep 23 2026, 7:17 AM
shipujin.t_gmail.com added a comment to D59889: loader: add LoongArch EFI loader support.
Sep 23 2026, 7:12 AM
shipujin.t_gmail.com added a comment to D59889: loader: add LoongArch EFI loader support.

Redundant includes and extern declaration.

Sep 23 2026, 6:51 AM
shipujin.t_gmail.com added a comment to D59889: loader: add LoongArch EFI loader support.

It is suggested to use designated initializers for the struct file_format initialization.

Sep 23 2026, 6:44 AM
shipujin.t_gmail.com added a comment to D59889: loader: add LoongArch EFI loader support.

dev_cleanup() must be called before bi_load().

Sep 23 2026, 6:24 AM
shipujin.t_gmail.com added a comment to D59889: loader: add LoongArch EFI loader support.

Passing entry itself and kernend to the kernel via registers is a custom ABI. If the kernel needs this information, it should obtain it from the modulep metadata (FreeBSD already has mechanisms such as MODINFOMD_KERNEND and MODINFOMD_MODULEP), rather than breaking cross-architecture consistency.

Sep 23 2026, 5:58 AM
shipujin.t_gmail.com added a comment to D59889: loader: add LoongArch EFI loader support.

MP Service Protocol query serves no real purpose, suggested to remove.

Sep 23 2026, 5:35 AM