public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>, linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, tsbogend@alpha.franken.de,
	vladimir.kondratiev@intel.com,
	Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: Re: [PATCH v2 00/10] MIPS: Fix kernel in XKPHYS
Date: Wed, 08 Nov 2023 17:12:31 +0100	[thread overview]
Message-ID: <87r0l06x74.fsf@BL-laptop> (raw)
In-Reply-To: <20231027221106.405666-1-jiaxun.yang@flygoat.com>

Hello Jiaxun,

> Hi all,
>
> This series fixes support for loading kernel to XKPHYS space.
> It is derived from "MIPS: use virtual addresses from xkphys for MIPS64" [1].
>

Thanks for this new series, I was able to test it this week and I have a
few comments.


> Boot tested on boston and QEMU with loading address set to 0xa800000090000000.
> QEMU patch on the way.
>
> For EyeQ5's memory layout, I think you just need to write devicetree memory
> node as:
>
> memory@0 {
> 	device_type = "memory";
> 	reg = < 0x0 0x08000000 0x0 0x08000000
> 		0x8 0x08000000 0x0 0x78000000>;
> };
>
> And set kernel load addesss to somewhere in RAM, everything should
> work.

With this setup and a workaround that I had to do and I will comment in
for the patch "MIPS: Refactor mips_cps_core_entry implementation", I
managed to boot the kernel and the 8 core of my setup are detected.

>
> It makes me a little bit confused that in EyeQ5 enablement patch, you set
> load address to:
>> +else
>> +load-$(CONFIG_MIPS_GENERIC)	+= 0xa800000080100000
>> +endif
> Where does not have memory aviailable.
>
> I guess you might want to set it to 0xa800000800100000?
> Though I would suggest you to set it to 0xa800000808000000, to avoid
> collisions with low mem and reserved mem.

Indeed I used CONFIG_PHYSICAL_START=0xa800000808000000

Gregory
>
> Gregory and Vladimir, do let me know if I missed anything.
>
> Thanks
> - Jiaxun
>
> [1]: https://lore.kernel.org/lkml/20231004161038.2818327-3-gregory.clement@bootlin.com/
>
> Jiaxun Yang (10):
>   MIPS: Export higher/highest relocation functions in uasm
>   MIPS: spaces: Define a couple of handy macros
>   MIPS: genex: Fix except_vec_vi for kernel in XKPHYS
>   MIPS: Fix set_uncached_handler for ebase in XKPHYS
>   MIPS: Refactor mips_cps_core_entry implementation
>   MIPS: Allow kernel base to be set from Kconfig for all platforms
>   MIPS: traps: Handle CPU with non standard vint offset
>   MIPS: Avoid unnecessary reservation of exception space
>   MIPS: traps: Enhance memblock ebase allocation process
>   MIPS: Get rid of CONFIG_NO_EXCEPT_FILL
>
>  arch/mips/Kconfig                           |  27 ++--
>  arch/mips/include/asm/addrspace.h           |   5 +
>  arch/mips/include/asm/mach-generic/spaces.h |   5 +-
>  arch/mips/include/asm/mips-cm.h             |   1 +
>  arch/mips/include/asm/smp-cps.h             |   4 +-
>  arch/mips/include/asm/traps.h               |   1 -
>  arch/mips/include/asm/uasm.h                |   2 +
>  arch/mips/kernel/cps-vec.S                  | 110 +++++--------
>  arch/mips/kernel/cpu-probe.c                |   5 -
>  arch/mips/kernel/cpu-r3k-probe.c            |   2 -
>  arch/mips/kernel/genex.S                    |  19 ++-
>  arch/mips/kernel/head.S                     |   7 +-
>  arch/mips/kernel/smp-cps.c                  | 167 +++++++++++++++++---
>  arch/mips/kernel/traps.c                    |  85 +++++++---
>  arch/mips/mm/uasm.c                         |   6 +-
>  15 files changed, 293 insertions(+), 153 deletions(-)
>
> -- 
> 2.34.1
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

      parent reply	other threads:[~2023-11-08 16:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 22:10 [PATCH v2 00/10] MIPS: Fix kernel in XKPHYS Jiaxun Yang
2023-10-27 22:10 ` [PATCH v2 01/10] MIPS: Export higher/highest relocation functions in uasm Jiaxun Yang
2023-10-27 22:10 ` [PATCH v2 02/10] MIPS: spaces: Define a couple of handy macros Jiaxun Yang
2023-12-21 15:42   ` Thomas Bogendoerfer
2023-10-27 22:10 ` [PATCH v2 03/10] MIPS: genex: Fix except_vec_vi for kernel in XKPHYS Jiaxun Yang
2023-10-27 22:11 ` [PATCH v2 04/10] MIPS: Fix set_uncached_handler for ebase " Jiaxun Yang
2023-10-27 22:11 ` [PATCH v2 05/10] MIPS: Refactor mips_cps_core_entry implementation Jiaxun Yang
2023-10-28  7:22   ` kernel test robot
2023-11-08 16:30   ` Gregory CLEMENT
2023-11-09 13:12     ` Jiaxun Yang
2023-12-22 12:18   ` Thomas Bogendoerfer
2023-12-22 12:40     ` Jiaxun Yang
2023-10-27 22:11 ` [PATCH v2 06/10] MIPS: Allow kernel base to be set from Kconfig for all platforms Jiaxun Yang
2023-10-27 22:11 ` [PATCH v2 07/10] MIPS: traps: Handle CPU with non standard vint offset Jiaxun Yang
2023-12-22 12:19   ` Thomas Bogendoerfer
2023-12-22 12:47     ` Jiaxun Yang
2023-10-27 22:11 ` [PATCH v2 08/10] MIPS: Avoid unnecessary reservation of exception space Jiaxun Yang
2023-10-27 22:11 ` [PATCH v2 09/10] MIPS: traps: Enhance memblock ebase allocation process Jiaxun Yang
2023-10-27 22:11 ` [PATCH v2 10/10] MIPS: Get rid of CONFIG_NO_EXCEPT_FILL Jiaxun Yang
2023-11-08 16:12 ` Gregory CLEMENT [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0l06x74.fsf@BL-laptop \
    --to=gregory.clement@bootlin.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=vladimir.kondratiev@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox