Thread (17 messages) 17 messages, 6 authors, 2021-07-26

Re: Random reboots on ODROID-N2+

From: Stefan Agner <stefan@agner.ch>
Date: 2021-07-23 19:50:43
Also in: linux-amlogic

On 2021-07-23 19:47, Robin Murphy wrote:
On 2021-07-23 17:14, Robin Murphy wrote:
quoted
On 2021-07-23 16:56, Stefan Agner wrote:
<snip>
quoted
quoted
quoted
Booting with "efi=debug" should (among other things) print the memory
map at boot if you want to double-check that that is the source of the
mismatch. Our EFI code should be perfectly capable of setting the
memblock flag if the region *is* described appropriately, see
reserve_regions() in drivers/firmware/efi/efi-init.c.
Booting 5.12.10 with "efi=debug" on U-Boot 2021.04 gave this:
[    0.000000] Machine model: Hardkernel ODROID-N2Plus
[    0.000000] efi: Getting UEFI parameters from /chosen in DT:
[    0.000000] efi: UEFI not found.
[    0.000000] OF: fdt: Reserved memory: failed to reserve memory for
node 'secmon@5000000': base 0x0000000005000000, size 3 MiB

So it seems UEFI is not in the play here?
Ah, OK, in that case I guess the question remains why does early_init_dt_reserve_memory_arch() think the region is already reserved? My instinctive assumption was an EFI memory map being present; seeing that U-Boot does indeed reflect DT reservations there *and* has had a likely-looking bug recently was then just overwhelmingly suggestive :)
Actually, poking at U-Boot a bit more I find
meson_board_add_reserved_memory() - can you check /sys/firmware/fdt
and see if the region ends up being passed as a /memreserve/ as well
as a proper reserved-memory node?

IIRC the semantics of /memreserve/ aren't really well-defined enough
to be suitable for the kind of things which require no-map, and my new
guess is that that's what ends up conflicting here.
Seems to be present in booth:

On v5.12.10
# fdtdump /sys/firmware/fdt
...
/memreserve/ 0x5000000 0x300000;
...
    reserved-memory {
        #address-cells = <0x00000002>;
        #size-cells = <0x00000002>;
        ranges;
        secmon@5000000 {
            reg = <0x00000000 0x05000000 0x00000000 0x00300000>;
            no-map;
            phandle = <0x00000068>;
        };
        linux,cma {
            compatible = "shared-dma-pool";
            reusable;
            size = <0x00000000 0x10000000>;
            alignment = <0x00000000 0x00400000>;
            linux,cma-default;
        };
    };

--
Stefan

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help