History log of /rk3399_rockchip-uboot/lib/sysmem.c (Results 26 – 34 of 34)
Revision Date Author Comments
# efda1f1d 29-Apr-2019 Joseph Chen <chenjh@rock-chips.com>

lib: sysmem: support M_ATTR_PEEK for memblk

- always return successful for M_ATTR_PEEK;
- add code comments;

Change-Id: I3c7f939ac61d8da5948978de4e70f17576748c91
Signed-off-by: Joseph Chen <chenjh@

lib: sysmem: support M_ATTR_PEEK for memblk

- always return successful for M_ATTR_PEEK;
- add code comments;

Change-Id: I3c7f939ac61d8da5948978de4e70f17576748c91
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>

show more ...


# 305d8903 28-Mar-2019 Joseph Chen <chenjh@rock-chips.com>

lib: sysmem: improve kernel reserved-memory alloc

- If the region is out of avaiable dram bank, return success;
- region can override allocated memblk with attr M_ATTR_OVERLAP;

Change-Id: I02171cdb

lib: sysmem: improve kernel reserved-memory alloc

- If the region is out of avaiable dram bank, return success;
- region can override allocated memblk with attr M_ATTR_OVERLAP;

Change-Id: I02171cdb51462e9cec3dd955ae3e0aaaa0ee7afd
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>

show more ...


# 2cb995bc 29-Mar-2019 Joseph Chen <chenjh@rock-chips.com>

lib: sysmem: allow alloc subset of an allocated memblk

Change-Id: I171c5978faf6fc1b3e95cc46c55a2adfe6df0176
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>


# a90f2861 26-Mar-2019 Joseph Chen <chenjh@rock-chips.com>

lib: sysmem: fix NULL attr.name

Change-Id: I93744c28668d1533ec2bcdaafc9198d8557284a1
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>


# 6e15146e 14-Mar-2019 Joseph Chen <chenjh@rock-chips.com>

lib: sysmem: refactor code

- import memblk id to manage memory blocks;
- change "sysmem_property" to generic "memblock";
- use alloc instead of reserve for all memory blocks;
- clean up and fix some

lib: sysmem: refactor code

- import memblk id to manage memory blocks;
- change "sysmem_property" to generic "memblock";
- use alloc instead of reserve for all memory blocks;
- clean up and fix some logic;
- add U-Boot cmd for sysmem;

Change-Id: I614223ce3bf97a7b3566412a9d1864fb30b68fd8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>

show more ...


# 727ebf6d 01-Mar-2019 Joseph Chen <chenjh@rock-chips.com>

lib: sysmem: alloc base and size must be 4-byte aligned

Change-Id: Icf59ee6522f2e0793605b03b0bcf05b58585069f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>


# 2c9d1179 29-Jan-2019 Joseph Chen <chenjh@rock-chips.com>

sysmem: fdt: reserve more CONFIG_SYS_FDT_PAD size for fdt

Sometimes, framework or user would call fdt_increase_size() to update
fdt size, it's better reserve more space to avoid sysmem gives the fdt

sysmem: fdt: reserve more CONFIG_SYS_FDT_PAD size for fdt

Sometimes, framework or user would call fdt_increase_size() to update
fdt size, it's better reserve more space to avoid sysmem gives the fdt
region overflow report.

The CONFIG_SYS_FDT_PAD default value is sync with bootm framework
in: common/image-fdt.c

Change-Id: I363e9a4182e13b1628a76666acd8272d25db659d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>

show more ...


# 3befe43d 14-Feb-2019 Joseph Chen <chenjh@rock-chips.com>

lib: sysmem: ignore sysmem reserve warning

Change-Id: I970da1456388f825a351dc26d725bb3ba10d41a4
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>


# ffa8f8b7 13-Jan-2019 Joseph Chen <chenjh@rock-chips.com>

lib: introduce sysmem for permanent memory management

U-Boot provides MALLOC for runtime temporary memory management and
LMB for bootm memory management. There is not a mechanism for permanent
memor

lib: introduce sysmem for permanent memory management

U-Boot provides MALLOC for runtime temporary memory management and
LMB for bootm memory management. There is not a mechanism for permanent
memory management. so that the memory blocks are easy to overlap with
each other.

What does permanent memory mean ?
- The memory can't be touched by U-Boot(ATF/OPTEE/SHM/kernel-reserved, etc);
- The memory occupied even in kernel, such as some firmware load buffer;

This patch introduces sysmem to do permanent memory management, which
implements base on LMB. It provides memory block (pool):
- init;
- add;
- alloc;
- free;
- reserve;
- stat;
- overflow check;

Here is an example for RK3399 sysmem boot stat(assume the "fdt" region is Overflow)
called by sysmem_dump_all():

sysmem_dump_all:
------------------------------------------------------
memory.rgn[0].base = 0x00000000
.size = 0x00000000
memory.rgn[1].base = 0x00200000
.size = 0x08200000
memory.rgn[2].base = 0x0a200000
.size = 0x75e00000

memory.total = 0x7e000000 (2016 MiB. 0 KiB)
------------------------------------------------------
reserved.rgn[0].name = "ATF"
.base = 0x00000000
.size = 0x00100000
reserved.rgn[1].name = "PSTORE/ATAGS/SHM"
.base = 0x00100000
.size = 0x00100000
reserved.rgn[2].name = "OP-TEE"
.base = 0x08400000
.size = 0x01e00000
reserved.rgn[3].name = "U-Boot"
.base = 0x71be03c0
.size = 0x0e41fc40
reserved.rgn[4].name = "secure-memory@20000000"
.base = 0x20000000
.size = 0x10000000

reserved.total = 0x2041fc40 (516 MiB. 127 KiB)
------------------------------------------------------
allocated.rgn[0].name = "fdt" (Overflow)
.base = 0x01f00000
.size = 0x00009704
allocated.rgn[1].name = "kernel"
.base = 0x0027c000
.size = 0x0129da04
allocated.rgn[2].name = "ramdisk"
.base = 0x0a200000
.size = 0x001e6c04

allocated.total = 0x0148dd0c (20 MiB. 567 KiB)
------------------------------------------------------
LMB.reserved[0].base = 0x00000000
.size = 0x00200000
LMB.reserved[1].base = 0x0027c000
.size = 0x0129da04
LMB.reserved[2].base = 0x01f00000
.size = 0x00009704
LMB.reserved[3].base = 0x08400000
.size = 0x01fe6c04
LMB.reserved[4].base = 0x20000000
.size = 0x10000000
LMB.reserved[5].base = 0x71be03c0
.size = 0x0e41fc40

reserved.core.total = 0x218ad94c (536 MiB. 694 KiB)
------------------------------------------------------

Change-Id: If63b7abed2cdd3c054719511fcceed733ddf606d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>

show more ...


12