Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add freebsd_spi programmer #53

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@myfreeweb
Copy link

myfreeweb commented Jul 25, 2018

Based on linux_spi, using FreeBSD's spigen(4) interface.

Change-Id: I4e1689416fbb309df94807f51635bc1f4b53e0c8
Signed-off-by: Greg V greg@unrelenting.technology

Add freebsd_spi programmer
Based on linux_spi, using FreeBSD's spigen(4) interface.

Change-Id: I4e1689416fbb309df94807f51635bc1f4b53e0c8
Signed-off-by: Greg V <greg@unrelenting.technology>
@emaste

This comment has been minimized.

Copy link

emaste commented Nov 26, 2018

Is there anything holding up this change?

@dhendrix
Copy link
Contributor

dhendrix left a comment

It looks pretty good overall. My only issue is the use of alloca(), and that's easy to fix.

I also went ahead and posted this on the upstream review server: https://review.coreboot.org/c/flashrom/+/30764.


/* FreeBSD uses a single buffer for rx and tx. Allocate a temporary one to avoid overwriting anything. */
size_t tmpcnt = readcnt + writecnt;
unsigned char *tmpbuf = alloca(tmpcnt);

This comment has been minimized.

@dhendrix

dhendrix Jan 9, 2019

Contributor

Please use malloc() instead (see the BUGS section of https://www.freebsd.org/cgi/man.cgi?alloca).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.