Skip to content

Commit 74c57ce

Browse files
GTLin08kartben
authored andcommitted
soc: it8xxx2/linker: Make h2ram_pool behind the CONFIG_ESPI_IT8XXX2 option
The .h2ram_pool linker section was previously always included, even on platforms that do not enable eSPI. This caused unnecessary memory reservation in the RAMABLE_REGION for non-eSPI configurations. Add a CONFIG_ESPI_IT8XXX2 guard around the .h2ram_pool section definition so that it is only included when eSPI support is enabled. Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
1 parent 7ff2be0 commit 74c57ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

soc/ite/ec/it8xxx2/linker.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ SECTIONS
441441

442442
__data_region_end = .;
443443

444+
#ifdef CONFIG_ESPI_IT8XXX2
444445
SECTION_DATA_PROLOGUE(.h2ram_pool,(NOLOAD),)
445446
{
446447
/*
@@ -456,6 +457,7 @@ SECTIONS
456457
_h2ram_pool_end = .;
457458
} GROUP_DATA_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)
458459
_h2ram_pool_size = ABSOLUTE(_h2ram_pool_end - _h2ram_pool_start);
460+
#endif
459461

460462
__kernel_ram_end = .;
461463
__kernel_ram_size = __kernel_ram_end - __kernel_ram_start;

0 commit comments

Comments
 (0)