diff mbox series

[v2,3/3] arch/arm/configs: Enable VMSPLIT_2G in imx_v6_v7_defconfig

Message ID 20210117180301.1956-3-alistair@alistair23.me
State New
Headers show
Series [v2,1/3] imx7d-remarkable2.dts: Initial device tree for reMarkable2 | expand

Commit Message

Alistair Jan. 17, 2021, 6:03 p.m. UTC
The reMarkable2 requires VMSPLIT_2G, so lets set this in the
imx_v6_v7_defconfig.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
 arch/arm/configs/imx_v6_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Shawn Guo Jan. 29, 2021, 7:13 a.m. UTC | #1
On Sun, Jan 17, 2021 at 10:03:01AM -0800, Alistair Francis wrote:
> The reMarkable2 requires VMSPLIT_2G, so lets set this in the

> imx_v6_v7_defconfig.


Hmm, why is VMSPLIT_2G required by reMarkable2?

Shawn

> 

> Signed-off-by: Alistair Francis <alistair@alistair23.me>

> ---

>  arch/arm/configs/imx_v6_v7_defconfig | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig

> index 55674cb1ffce..fa9229616106 100644

> --- a/arch/arm/configs/imx_v6_v7_defconfig

> +++ b/arch/arm/configs/imx_v6_v7_defconfig

> @@ -29,6 +29,7 @@ CONFIG_SOC_IMX7D=y

>  CONFIG_SOC_IMX7ULP=y

>  CONFIG_SOC_VF610=y

>  CONFIG_SMP=y

> +CONFIG_VMSPLIT_2G=y

>  CONFIG_ARM_PSCI=y

>  CONFIG_HIGHMEM=y

>  CONFIG_FORCE_MAX_ZONEORDER=14

> -- 

> 2.29.2

>
Alistair Francis Feb. 3, 2021, 2:37 a.m. UTC | #2
On Thu, Jan 28, 2021 at 11:13 PM Shawn Guo <shawnguo@kernel.org> wrote:
>

> On Sun, Jan 17, 2021 at 10:03:01AM -0800, Alistair Francis wrote:

> > The reMarkable2 requires VMSPLIT_2G, so lets set this in the

> > imx_v6_v7_defconfig.

>

> Hmm, why is VMSPLIT_2G required by reMarkable2?


I'm not too sure. It's difficult to debug problems as I only have a
UART but without this I don't see any kernel prints so it seems like
the kernel doesn't get very far. I haven't had any luck with earlycon
on the device so I don't know how I can get more information.

Alistair

>

> Shawn

>

> >

> > Signed-off-by: Alistair Francis <alistair@alistair23.me>

> > ---

> >  arch/arm/configs/imx_v6_v7_defconfig | 1 +

> >  1 file changed, 1 insertion(+)

> >

> > diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig

> > index 55674cb1ffce..fa9229616106 100644

> > --- a/arch/arm/configs/imx_v6_v7_defconfig

> > +++ b/arch/arm/configs/imx_v6_v7_defconfig

> > @@ -29,6 +29,7 @@ CONFIG_SOC_IMX7D=y

> >  CONFIG_SOC_IMX7ULP=y

> >  CONFIG_SOC_VF610=y

> >  CONFIG_SMP=y

> > +CONFIG_VMSPLIT_2G=y

> >  CONFIG_ARM_PSCI=y

> >  CONFIG_HIGHMEM=y

> >  CONFIG_FORCE_MAX_ZONEORDER=14

> > --

> > 2.29.2

> >
Arnd Bergmann Feb. 3, 2021, 7:50 a.m. UTC | #3
On Wed, Feb 3, 2021 at 3:37 AM Alistair Francis <alistair23@gmail.com> wrote:
>

> On Thu, Jan 28, 2021 at 11:13 PM Shawn Guo <shawnguo@kernel.org> wrote:

> >

> > On Sun, Jan 17, 2021 at 10:03:01AM -0800, Alistair Francis wrote:

> > > The reMarkable2 requires VMSPLIT_2G, so lets set this in the

> > > imx_v6_v7_defconfig.

> >

> > Hmm, why is VMSPLIT_2G required by reMarkable2?

>

> I'm not too sure. It's difficult to debug problems as I only have a

> UART but without this I don't see any kernel prints so it seems like

> the kernel doesn't get very far. I haven't had any luck with earlycon

> on the device so I don't know how I can get more information.


In the dts file, I can see that the machine has 1GB of RAM at
contiguous addresses. My first guess would be a problem with
highmem, as this configuration means that with VMSPLIT_3G
there are 768MB of lowmem and 256MB of highmem.

Can you try these two things to narrow the problem down
further?

a) disable CONFIG_HIGHMEM when using VMSPLIT_3G
b) use VMSPLIT_3G_OPT

If both of them solve the problem, then highmem is likely
the root cause. One possible issue might be that the boot
loader loads the initramfs or the dtb into a location outside
of the first 768 MB of lowmem where it is unreachable
in the VMSPLIT_3G configuration.

        Arnd
Alistair Francis Feb. 4, 2021, 6:55 a.m. UTC | #4
On Tue, Feb 2, 2021 at 11:50 PM Arnd Bergmann <arnd@kernel.org> wrote:
>

> On Wed, Feb 3, 2021 at 3:37 AM Alistair Francis <alistair23@gmail.com> wrote:

> >

> > On Thu, Jan 28, 2021 at 11:13 PM Shawn Guo <shawnguo@kernel.org> wrote:

> > >

> > > On Sun, Jan 17, 2021 at 10:03:01AM -0800, Alistair Francis wrote:

> > > > The reMarkable2 requires VMSPLIT_2G, so lets set this in the

> > > > imx_v6_v7_defconfig.

> > >

> > > Hmm, why is VMSPLIT_2G required by reMarkable2?

> >

> > I'm not too sure. It's difficult to debug problems as I only have a

> > UART but without this I don't see any kernel prints so it seems like

> > the kernel doesn't get very far. I haven't had any luck with earlycon

> > on the device so I don't know how I can get more information.

>

> In the dts file, I can see that the machine has 1GB of RAM at

> contiguous addresses. My first guess would be a problem with

> highmem, as this configuration means that with VMSPLIT_3G

> there are 768MB of lowmem and 256MB of highmem.

>

> Can you try these two things to narrow the problem down

> further?

>

> a) disable CONFIG_HIGHMEM when using VMSPLIT_3G

> b) use VMSPLIT_3G_OPT


Thanks Arnd,

I was working on testing the config changes you mentioned, but it
seems like all of them work now.

VMSPLIT_2G: Boots to userspace

VMSPLIT_3G && HIGHMEM: Boots to userspace

VMSPLIT_3G && !HIGHMEM: Boots to userspace

VMSPLIT_3G_OPT && HIGHMEM:Boots to userspace

>

> If both of them solve the problem, then highmem is likely

> the root cause. One possible issue might be that the boot

> loader loads the initramfs or the dtb into a location outside

> of the first 768 MB of lowmem where it is unreachable

> in the VMSPLIT_3G configuration.


It boots with u-boot, which I am building so I can change these addresses.

I'm guessing that I have changed the addresses at some point and now
it works. I'm going to drop this patch.

Alistair

>

>         Arnd
diff mbox series

Patch

diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index 55674cb1ffce..fa9229616106 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -29,6 +29,7 @@  CONFIG_SOC_IMX7D=y
 CONFIG_SOC_IMX7ULP=y
 CONFIG_SOC_VF610=y
 CONFIG_SMP=y
+CONFIG_VMSPLIT_2G=y
 CONFIG_ARM_PSCI=y
 CONFIG_HIGHMEM=y
 CONFIG_FORCE_MAX_ZONEORDER=14