cpu/x86/smm: Remove heap
Currently no smihandler uses heap. coreboot's heap manager also is quite limited in what it will free (only the latest alloc). This makes it a bad idea to use it inside the smihandler, as depending on the alloc usage the heap might actually be full at some point, breaking the smihandler. This also reduces the ramstage by 448 bytes on google/vilboz. Change-Id: I70cd822be17c1efe13c94a9dbd2e1038808b9c56 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/64521 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
bf378a0fdf
commit
ea2c1d357c
|
@ -124,13 +124,6 @@ config SMM_LEGACY_ASEG
|
||||||
|
|
||||||
if HAVE_SMI_HANDLER && !SMM_LEGACY_ASEG
|
if HAVE_SMI_HANDLER && !SMM_LEGACY_ASEG
|
||||||
|
|
||||||
config SMM_MODULE_HEAP_SIZE
|
|
||||||
hex
|
|
||||||
default 0x4000
|
|
||||||
help
|
|
||||||
This option determines the size of the heap within the SMM handler
|
|
||||||
modules.
|
|
||||||
|
|
||||||
config SMM_MODULE_STACK_SIZE
|
config SMM_MODULE_STACK_SIZE
|
||||||
hex
|
hex
|
||||||
default 0x800 if ARCH_RAMSTAGE_X86_64
|
default 0x800 if ARCH_RAMSTAGE_X86_64
|
||||||
|
|
|
@ -67,9 +67,9 @@ $(call src-to-obj,ramstage,$(obj)/cpu/x86/smm/smmstub.manual): $(obj)/smmstub/sm
|
||||||
# C-based SMM handler.
|
# C-based SMM handler.
|
||||||
|
|
||||||
ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y)
|
ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y)
|
||||||
$(eval $(call rmodule_link,$(obj)/smm/smm.elf, $(obj)/smm/smm.o, $(CONFIG_SMM_MODULE_HEAP_SIZE),x86_32))
|
$(eval $(call rmodule_link,$(obj)/smm/smm.elf, $(obj)/smm/smm.o, 0,x86_32))
|
||||||
else
|
else
|
||||||
$(eval $(call rmodule_link,$(obj)/smm/smm.elf, $(obj)/smm/smm.o, $(CONFIG_SMM_MODULE_HEAP_SIZE),x86_64))
|
$(eval $(call rmodule_link,$(obj)/smm/smm.elf, $(obj)/smm/smm.o, 0,x86_64))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(obj)/smm/smm: $(obj)/smm/smm.elf.rmod
|
$(obj)/smm/smm: $(obj)/smm/smm.elf.rmod
|
||||||
|
|
|
@ -215,7 +215,6 @@ romstage-y += boot_device.c
|
||||||
ramstage-y += boot_device.c
|
ramstage-y += boot_device.c
|
||||||
|
|
||||||
smm-y += boot_device.c
|
smm-y += boot_device.c
|
||||||
smm-y += malloc.c
|
|
||||||
smm-y += delay.c
|
smm-y += delay.c
|
||||||
smm-y += fmap.c
|
smm-y += fmap.c
|
||||||
smm-y += cbfs.c memcmp.c
|
smm-y += cbfs.c memcmp.c
|
||||||
|
|
Loading…
Reference in New Issue