"varverify32init.patch" in the attachments. To apply a patch please copy it
to the coreboot directory, "cd" to coreboot, and - if seabios is already cloned
(e.g. after building a coreboot once, followed by a "make clean" of course)
run " patch -l -p1 < varverify32init.patch "
Sorry, my previous message had a typo, the final results for testfunc() :
(1) = OK, inside " cbfs_copyfile "
(2) = OK, inside " coreboot_cbfs_init "
(3) = ERR, inside " cbfs_run_payload "
P.S. I'm using the default "menuconfig" settings, "emulation/qemu-i440fx" target
Best regards,
Mike
On Sun, Feb 25, 2018 at 11:55 AM, Paul Menzel <[email protected]> wrote:
> Dear Mike,
>
>
> Am 25.02.2018 um 01:05 schrieb Mike Banon:
>>
>> 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 attach your patch, so that it can easily applied and the build
> problem reproduced.
>
> […]
>
>
> Kind regards,
>
> Paul
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