rpi4 FreeBSD vs. ubuntu u-boot fdt print / memereserve difference (lack of reserve in FreeBSD context), 0x3b400000 vs. DMA_HIGH_LIMIT being 0x3c000000

Mark Millard marklmi at yahoo.com
Sat Oct 3 22:20:45 UTC 2020


Another FreeBSD vs. ubuntu context difference, this time in the
fdt print / output . . .

The ubuntu u-boot has (fdt print / output):

        memreserve = <0x3b400000 0x04c00000>;
. . . (Note: 0x3b400000+0x04c00000 == 0x40000000) . . .
 
        #address-cells = <0x00000002>;
        #size-cells = <0x00000001>;
. . .
        axi {
                vc_mem {
                        reg = <0x3ec00000 0x40000000 0xc0000000>;
                };
Note:       "vc_mem is solely used as a mechanism for passing a couple
            of parameters through from the firmware to vcdbg"
End note
        };

. . . ( boot args has: vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 ) . . .

        reserved-memory {
                #address-cells = <0x00000002>;
                #size-cells = <0x00000001>;
                ranges;
                phandle = <0x0000003d>;
                linux,cma {
                        compatible = "shared-dma-pool";
                        size = <0x04000000>;
                        reusable;
                        linux,cma-default;
                        alloc-ranges = <0x00000000 0x00000000 0x30000000>;
                        phandle = <0x0000003e>;
                };
        };
. . . (I split the reg into lines below) . . .
        memory at 0 {
                device_type = "memory";
                reg = <0x00000000 0x00000000 0x3b400000
                       0x00000000 0x40000000 0xbc000000
                       0x00000001 0x00000000 0x80000000
                       0x00000001 0x80000000 0x80000000>;
        };
. . . (Note: 0x40000000+0xbc000000 == 0xFC000000) . . .

(I've ignored gpiomem above and below.)

It appears to be that the memreserve may be important
to have. The above may also suggest that FreeBSD's:

#define DMA_HIGH_LIMIT                  0x3c000000

may be a little too large (< or <= 0x3b400000 ?).

FreeBSD u-boot reports just:

/memreserve/ 0x0 0x1000;
. . .
        memory at 0 {
 
                device_type = "memory";
                reg = <0x0 0x0 0x0>;
        };

And so does not indicate anything special for either of
(showing begin/end points):

0x3b400000..0x3FFFFFFF (in use by the vc?)
0xFC000000..0xFFFFFFFF (I/O peripheral area and such?)

The context is an 8 GiByte RPi4 in both examples. Various
details would vary on 1 GiByte and 2 GiByte RPi4Bs and
some in memory at 0 on the 4 GiBYTe RPi4B.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-arm mailing list