Re: orangepi zero 3 fails to boot after hw.blockcpu patch

chara <[email protected]>
Newsgroups gmane.os.openbsd.misc
Message-ID <[email protected]>
Applied it on top of 7.9, seems to work. thanks a lot!
how do we know it doesnt break other machines?

On Fri, 14 Aug 2026 19:21:56 +0200
Mark Kettenis <[email protected]> wrote:

> > Date: Fri, 14 Aug 2026 04:00:59 +0330
> > From: chara <[email protected]>
> > 
> > Hi there, hope you all be well.
> > 
> > I have a orange pi zero 3, which has a allwinner h618 (cortext A53).
> > 
> > It used to work well (mostly) until 7.9, bisecting it and found out
> > the offending commit is '6159827a9df06769a0823fbf9738555785b69e8c' (git hash).
> > 
> 
> Does this patch fix the issue?
> 
> Index: arch/arm64/arm64/cpu.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/arm64/arm64/cpu.c,v
> diff -u -p -r1.149 cpu.c
> --- arch/arm64/arm64/cpu.c	23 Jun 2026 11:45:54 -0000	1.149
> +++ arch/arm64/arm64/cpu.c	14 Aug 2026 17:21:08 -0000
> @@ -1772,12 +1772,13 @@ cpu_attach(struct device *parent, struct
>  	cpu_kstat_attach(ci);
>  #endif
>  
> -	ci->ci_capacity = OF_getpropint(ci->ci_node, "capacity-dmips-mhz", 0);
>  	opp = OF_getpropint(ci->ci_node, "operating-points-v2", 0);
> -	if (opp) {
> +	if (opp)
>  		cpu_opp_init(ci, opp);
> +
> +	ci->ci_capacity = OF_getpropint(ci->ci_node, "capacity-dmips-mhz", 0);
> +	if (ci->ci_opp_table)
>  		ci->ci_capacity *= ci->ci_opp_table->ot_opp_hz_max / 1000000;
> -	}
>  	cpu_classify();
>  
>  	cpu_psci_init(ci);
> Index: arch/arm64/arm64/machdep.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/arm64/arm64/machdep.c,v
> diff -u -p -r1.100 machdep.c
> --- arch/arm64/arm64/machdep.c	7 Jul 2026 12:12:44 -0000	1.100
> +++ arch/arm64/arm64/machdep.c	14 Aug 2026 17:21:08 -0000
> @@ -1025,7 +1025,7 @@ initarm(struct arm64_bootparams *abp)
>  		 * EfiLoaderData so it won't be added here.
>  		 */
>  		for (i = 0; i < mmap_size / mmap_desc_size; i++) {
> -#ifdef MMAP_DEBUG
> +#ifndef MMAP_DEBUG
>  			printf("type 0x%x pa 0x%llx va 0x%llx pages 0x%llx attr 0x%llx\n",
>  			    desc->Type, desc->PhysicalStart,
>  			    desc->VirtualStart, desc->NumberOfPages,
> 


-- 
chara <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.