public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/10] MIPS: Fix kernel in XKPHYS
@ 2023-10-27 22:10 Jiaxun Yang
  2023-10-27 22:10 ` [PATCH v2 01/10] MIPS: Export higher/highest relocation functions in uasm Jiaxun Yang
                   ` (10 more replies)
  0 siblings, 11 replies; 20+ messages in thread
From: Jiaxun Yang @ 2023-10-27 22:10 UTC (permalink / raw)
  To: linux-mips
  Cc: linux-kernel, tsbogend, gregory.clement, vladimir.kondratiev,
	Jiaxun Yang

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

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.

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.

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


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2023-12-22 12:47 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v2 00/10] MIPS: Fix kernel in XKPHYS Gregory CLEMENT

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox