>
> Please see the developer documentation:
>
I am afraid this documentation does not answer why this build problem
does not happen when I apply this patch to the standalone cloned seabios
while it does happens when I apply it to the seabios built by a coreboot
Best regards,
Mike
On Sun, Feb 25, 2018 at 5:41 PM, Kevin O'Connor <[email protected]> wrote:
> On Sun, Feb 25, 2018 at 03:05:06AM +0300, Mike Banon wrote:
>> Friends, I need your help. While trying to improve SeaBIOS I got stuck
>> at this very strange problem - which does not appear when you do a
>> standalone build of SeaBIOS but it happens when you try building a
>> coreboot together with SeaBIOS. Steps to reproduce:
>
> Please see the developer documentation:
>
> https://www.seabios.org/Developer_Documentation
>
> In particular, read the "memory model" and "execution and code phase"
> documents.
>
> -Kevin
diff -rupN ./payloads/external/SeaBIOS/seabios/src/fw/coreboot.c ./payloads/external/SeaBIOS/seabios/src/fw/coreboot.c
--- ./payloads/external/SeaBIOS/seabios/src/fw/coreboot.c 2018-02-25 14:00:00.000000000 +0200
+++ ./payloads/external/SeaBIOS/seabios/src/fw/coreboot.c 2018-02-25 14:00:00.000000000 +0200
@@ -273,6 +273,18 @@
find_acpi_features();
}
+/*
+ (1) = OK, cbfs_copyfile
+ (2) = OK, coreboot_cbfs_init
+ (3) = ERR, cbfs_run_payload
+*/
+
+int // doesn't matter if static or not
+testfunc(void) {
+ int *c = malloc_tmp(sizeof(int)); // doesn't matter if _tmp or _tmphigh
+ // free(c); // <--- commented out because doesn't affect the results
+ return 0;
+}
/****************************************************************
* ulzma
@@ -368,6 +380,7 @@ static int cbfs_copyfile
}
iomemcpy(temp, src, size);
int ret = ulzma(dst, maxlen, temp, size);
+ testfunc(); // (1) <--- works OK there
yield();
free(temp);
return ret;
@@ -478,6 +491,7 @@ void coreboot_cbfs_init
}
process_links_file();
+ testfunc(); // (2) <--- works OK there
}
struct cbfs_payload_segment {
@@ -533,6 +547,7 @@ void cbfs_run_payload
} else if (CONFIG_LZMA
&& seg->compression == cpu_to_be32(CBFS_COMPRESS_LZMA)) {
int ret = ulzma(dest, dest_len, src, src_len);
+ testfunc(); // (3) <--- gives "is VARVERIFY32INIT but used from" error
if (ret < 0)
return;
src_len = ret;
_______________________________________________
SeaBIOS mailing list
[email protected]
https://mail.coreboot.org/mailman/listinfo/seabios