Re: [PATCH 12/17] MIPS: enable 64-bit kernel segment addressing on CONFIG_64BIT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05.06.23 22:10, Denis Orlov wrote:
> This allows using addresses from XKPHYS segment. This is needed as we
> access hardware registers through this segment in 64BIT configuration,
> but this also lets us peek/poke bigger memory address space using
> commands that work with memory on 64BIT.
> 
> With this commit, malta with 64-bit CPU finally boots into 64BIT barebox
> in QEMU.
> 
> Signed-off-by: Denis Orlov <denorl2009@xxxxxxxxx>

Reviewed-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>

> ---
>  arch/mips/boot/start.S             |  2 ++
>  arch/mips/include/asm/pbl_macros.h | 11 +++++++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
> index 5f134f9ae9..30828ad9ef 100644
> --- a/arch/mips/boot/start.S
> +++ b/arch/mips/boot/start.S
> @@ -26,6 +26,8 @@ EXPORT(_start)
>  
>  	mips_disable_interrupts
>  
> +	mips64_enable_64bit_addressing
> +
>  	copy_to_link_location _start
>  
>  	stack_setup
> diff --git a/arch/mips/include/asm/pbl_macros.h b/arch/mips/include/asm/pbl_macros.h
> index 1fba690c8c..ce169a1554 100644
> --- a/arch/mips/include/asm/pbl_macros.h
> +++ b/arch/mips/include/asm/pbl_macros.h
> @@ -152,6 +152,17 @@
>  	.set	pop
>  	.endm
>  
> +	.macro	mips64_enable_64bit_addressing
> +#ifdef CONFIG_64BIT
> +	.set	push
> +	.set	noreorder
> +	mfc0	k0, CP0_STATUS
> +	or	k0, ST0_KX
> +	mtc0	k0, CP0_STATUS
> +	.set	pop
> +#endif
> +	.endm
> +
>  	.macro	mips_barebox_10h
>  	.set	push
>  	.set	noreorder

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux