Author: markj Date: Tue Aug 14 19:21:31 2018 New Revision: 337813 URL: https://svnweb.freebsd.org/changeset/base/337813
Log: Help ensure that the copy loop doesn't get converted to a memcpy() call. Reported and reviewed by: kib X-MFC with: r337715 Sponsored by: The FreeBSD Foundation Modified: head/sys/x86/x86/ucode.c Modified: head/sys/x86/x86/ucode.c ============================================================================== --- head/sys/x86/x86/ucode.c Tue Aug 14 19:12:45 2018 (r337812) +++ head/sys/x86/x86/ucode.c Tue Aug 14 19:21:31 2018 (r337813) @@ -346,7 +346,7 @@ ucode_load_bsp(uintptr_t free) addr = map_ucode(free, len); /* We can't use memcpy() before ifunc resolution. */ for (i = 0; i < len; i++) - addr[i] = match[i]; + addr[i] = ((volatile uint8_t *)match)[i]; match = addr; if (loader->load(match, false) == 0) { _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"