Re: [PATCH v2 00/21] Add support for the Mobileye EyeQ5 SoC

Jiaxun Yang
2023-11-23T17:31:59Z

在2023年11月23日十一月 下午3:26，Gregory CLEMENT写道：
> Hello,
>
> The EyeQ5 SoC from Mobileye is based on the MIPS I6500 architecture
> and features multiple controllers such as the classic UART, I2C, SPI,
> as well as CAN-FD, PCIe, Octal/Quad SPI Flash interface, Gigabit
> Ethernet, MIPI CSI-2, and eMMC 5.1. It also includes a Hardware
> Security Module, Functional Safety Hardware, and MJPEG encoder.
>
> One peculiarity of this SoC is that the physical address of the DDDR
> exceeds 32 bits. Given that the architecture is 64 bits, this is not
> an issue, but it requires some changes in how the mips64 is currently
> managed during boot.
>
> This second version comes a few weeks after the first one, because
> there several iteration to support having kernel code outside kseg.
>
> To build and test the
> kernel, we need to run the following commands:
>
> make 64r6el_defconfig BOARDS=eyeq5
> make vmlinuz.itb
>
> In order to get ride of the aliasing patch I got, I followed Jiaxun
> Yang suggestion by splitting the memory in 2 part: low part under
> 512MB and high part beyond the 4GB. It allows to boot and run Linux on
> the platform however as a side effect the number of pages used for
> memmap passed from 512 to 8672 which is a huge consumption of
> pages. Do you know if there is a way to reduce it ?

The best workaround is to enable SPARSEMEM, that's why I sent[1] :-)

I'm going to reversion my XKPHYS work to fix some other issues I found.

[1]: https://lore.kernel.org/linux-mips/20231028-mm-v1-0-45377cd158cf@flygoat.com/
>
> I also noticed that if the kernel can't be in kseg0 at all by using
> low memory at 0x40000000, then I got the following message during
> boot:
>
--
- Jiaxun