summaryrefslogtreecommitdiff
path: root/stand/uboot
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2017-12-10 23:06:45 +0000
committerIan Lepore <ian@FreeBSD.org>2017-12-10 23:06:45 +0000
commit5fa28b3d9777ff10c01dbbe8f3c207a9c6643ac9 (patch)
tree93a2a20760c73bfcf0567470a7fb629cb0b53064 /stand/uboot
parent45b8a101e7fff3c56bd8d1e7336baa78d4f56455 (diff)
downloadsrc-test-5fa28b3d9777ff10c01dbbe8f3c207a9c6643ac9.tar.gz
src-test-5fa28b3d9777ff10c01dbbe8f3c207a9c6643ac9.zip
When building for arm arches, set PKGALIGN to the max cache line size
supported by the arch, to meet u-boot's requirement that I/O be done in cache-aligned chunks. PR: 223977
Notes
Notes: svn path=/head/; revision=326754
Diffstat (limited to 'stand/uboot')
-rw-r--r--stand/uboot/lib/libuboot.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/stand/uboot/lib/libuboot.h b/stand/uboot/lib/libuboot.h
index e4201d8a1347b..c6cf93cb0ad59 100644
--- a/stand/uboot/lib/libuboot.h
+++ b/stand/uboot/lib/libuboot.h
@@ -45,9 +45,16 @@ struct uboot_devdesc
#define d_disk d_kind.disk
/*
- * Default network packet alignment in memory
+ * Default network packet alignment in memory. On arm arches packets must be
+ * aligned to cacheline boundaries.
*/
+#if defined(__aarch64__)
+#define PKTALIGN 128
+#elif defined(__arm__)
+#define PKTALIGN 64
+#else
#define PKTALIGN 32
+#endif
int uboot_getdev(void **vdev, const char *devspec, const char **path);
char *uboot_fmtdev(void *vdev);