diff options
author | Iru Cai <mytbk920423@gmail.com> | 2018-12-21 10:21:49 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2019-11-17 15:10:43 +0800 |
commit | 7265ade6323caef65305bb95c12968dd0823e1e4 (patch) | |
tree | 7750c623d3885cd0ece9e8d812133ca33cbc1ae0 /src | |
parent | 5306c39b296bf7dd6990a07a35a74b64e83529c3 (diff) | |
download | coreboot-7265ade6323caef65305bb95c12968dd0823e1e4.tar.xz |
PEI memory range/size functions
Diffstat (limited to 'src')
-rw-r--r-- | src/northbridge/intel/haswell/Makefile.inc | 1 | ||||
-rw-r--r-- | src/northbridge/intel/haswell/mrc.asm | 31 | ||||
-rw-r--r-- | src/northbridge/intel/haswell/pei_mem.c | 23 |
3 files changed, 28 insertions, 27 deletions
diff --git a/src/northbridge/intel/haswell/Makefile.inc b/src/northbridge/intel/haswell/Makefile.inc index 08932943ce..434beb478c 100644 --- a/src/northbridge/intel/haswell/Makefile.inc +++ b/src/northbridge/intel/haswell/Makefile.inc @@ -50,6 +50,7 @@ romstage-y += stall.c romstage-y += mrc_main.c romstage-y += mrc_pch_init.c romstage-y += mrc_misc.c +romstage-y += pei_mem.c postcar-y += memmap.c endif diff --git a/src/northbridge/intel/haswell/mrc.asm b/src/northbridge/intel/haswell/mrc.asm index 0f1414a76a..428786b4bd 100644 --- a/src/northbridge/intel/haswell/mrc.asm +++ b/src/northbridge/intel/haswell/mrc.asm @@ -27,6 +27,8 @@ extern mrc_pch_iobp_read extern mrc_pch_iobp_update extern mrc_pch_init extern dmi_check_link +extern pei_get_platform_memsize +extern pei_choose_ranges ; PEI services extern PeiInstallPpi @@ -400,31 +402,6 @@ pop esi pop ebp ret -fcn_fffa049e: ; not directly referenced -push ebp -mov ebp, esp -mov eax, dword [ebp + 0x10] -mov dword [eax], 0 -mov eax, dword [ebp + 0x14] -mov dword [eax], 0 -mov eax, dword [ebp + 0x18] -mov dword [eax], 0 -mov eax, dword [ebp + 0x1c] -mov dword [eax], 0 -xor eax, eax -pop ebp -ret - -fcn_fffa04c9: ; not directly referenced -push ebp -mov ebp, esp -mov eax, dword [ebp + 0x10] -mov dword [eax], 0x1000000 -mov dword [eax + 4], 0 -xor eax, eax -pop ebp -ret - dummy_func: push ebp xor eax, eax @@ -2863,8 +2840,8 @@ mov al, dl mov cl, 5 mov dword [ebp - 0x467], 0x400000 mov byte [ebp - 0x526], 0xe -mov dword [ebp - 0x616], fcn_fffa049e ; mov dword [ebp - 0x616], 0xfffa049e -mov dword [ebp - 0x612], fcn_fffa04c9 ; mov dword [ebp - 0x612], 0xfffa04c9 +mov dword [ebp - 0x616], pei_choose_ranges +mov dword [ebp - 0x612], pei_get_platform_memsize rep stosb ; rep stosb byte es:[edi], al lea edi, [ebp - 0x553] mov cl, 0x15 diff --git a/src/northbridge/intel/haswell/pei_mem.c b/src/northbridge/intel/haswell/pei_mem.c new file mode 100644 index 0000000000..83fb0a9cb6 --- /dev/null +++ b/src/northbridge/intel/haswell/pei_mem.c @@ -0,0 +1,23 @@ +#include <stdint.h> + +int pei_get_platform_memsize(void **peisv, void *_this_, uint64_t *memsz); +int pei_choose_ranges(void **peisv, void *_this_, + uint32_t *oprom_mask, uint32_t *smram_mask, + uint32_t *gfxram_mask, uint32_t *pcimem_mask); + +int pei_get_platform_memsize(void **peisv, void *_this_, uint64_t *memsz) +{ + *memsz = 0x1000000; + return 0; +} + +int pei_choose_ranges(void **peisv, void *_this_, + uint32_t *oprom_mask, uint32_t *smram_mask, + uint32_t *gfxram_mask, uint32_t *pcimem_mask) +{ + *oprom_mask = 0; + *smram_mask = 0; + *gfxram_mask = 0; + *pcimem_mask = 0; + return 0; +} |