vlib: add max-size configuration parameter for pmalloc 82/23082/3
authorjieqiang wang <jieqiang.wang@arm.com>
Tue, 22 Oct 2019 07:54:40 +0000 (15:54 +0800)
committerDamjan Marion <dmarion@me.com>
Tue, 17 Dec 2019 18:19:50 +0000 (18:19 +0000)
Enable 'max-size' configuration parameter to set maximum size of
memory space allocated for pmalloc module. This parameter along
with existing 'base-addr' falls into physmem section. Both are
dedicated parameters to pmalloc module.

Type: feature

Change-Id: I939f25156b9a43440a24d69a7397d57eb6c2d392
Signed-off-by: Jieqiang Wang <Jieqiang.Wang@arm.com>
src/vlib/physmem.c

index 40346fc..846f9a0 100755 (executable)
@@ -178,6 +178,9 @@ vlib_physmem_config (vlib_main_t * vm, unformat_input_t * input)
     {
       if (unformat (input, "base-addr 0x%lx", &vpm->base_addr))
        ;
+      else if (unformat (input, "max-size %U",
+                        unformat_memory_size, &vpm->max_size))
+       ;
       else
        return unformat_parse_error (input);
     }