mirror of
https://github.com/thead-yocto-mirror/meta-riscv
synced 2026-09-10 10:45:41 +02:00
Add functionality to bbl to modify the device tree passed to Linux to specify the MicroSemi PCIe device. Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
74 lines
1.7 KiB
Diff
74 lines
1.7 KiB
Diff
From 2dd8da6841fcc0c8ae6977e5461bcbeaaf715813 Mon Sep 17 00:00:00 2001
|
|
From: Alistair Francis <alistair.francis@wdc.com>
|
|
Date: Mon, 9 Jul 2018 12:58:21 -0700
|
|
Subject: [PATCH 4/4] Rename bcopy to acopy
|
|
|
|
This is requried to avoid an infinite loop in the bcopy implementation
|
|
that causes bbl to never exit.
|
|
|
|
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
|
|
---
|
|
bbl/bbl.h | 2 ++
|
|
util/bcopy.c | 3 ++-
|
|
util/string.c | 3 ++-
|
|
3 files changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/bbl/bbl.h b/bbl/bbl.h
|
|
index c9a02e1..689418f 100644
|
|
--- a/bbl/bbl.h
|
|
+++ b/bbl/bbl.h
|
|
@@ -10,6 +10,8 @@
|
|
|
|
void print_logo();
|
|
|
|
+void acopy(const void *src0, void *dst0, size_t length);
|
|
+
|
|
#endif // !__ASSEMBLER__
|
|
|
|
#endif
|
|
diff --git a/util/bcopy.c b/util/bcopy.c
|
|
index 69b9384..55b28df 100644
|
|
--- a/util/bcopy.c
|
|
+++ b/util/bcopy.c
|
|
@@ -31,6 +31,7 @@
|
|
* SUCH DAMAGE.
|
|
*/
|
|
#include <string.h>
|
|
+#include "bbl.h"
|
|
/*
|
|
* sizeof(word) MUST BE A POWER OF TWO
|
|
* SO THAT wmask BELOW IS ALL ONES
|
|
@@ -52,7 +53,7 @@ void *
|
|
memmove(void *dst0, const void *src0, size_t length)
|
|
#else
|
|
void
|
|
-bcopy(const void *src0, void *dst0, size_t length)
|
|
+acopy(const void *src0, void *dst0, size_t length)
|
|
#endif
|
|
#endif
|
|
{
|
|
diff --git a/util/string.c b/util/string.c
|
|
index 02a2648..a9ae18b 100644
|
|
--- a/util/string.c
|
|
+++ b/util/string.c
|
|
@@ -3,6 +3,7 @@
|
|
#include <string.h>
|
|
#include <stdint.h>
|
|
#include <ctype.h>
|
|
+#include "bbl.h"
|
|
|
|
void *memchr(const void *s, int c, size_t n)
|
|
{
|
|
@@ -57,7 +58,7 @@ void *memmove(void *dst, const void *src, size_t n)
|
|
if (__builtin_expect((q < p) || ((size_t)(q - p) >= n), 1)) {
|
|
return memcpy(dst, src, n);
|
|
} else {
|
|
- bcopy(src, dst, n);
|
|
+ acopy(src, dst, n);
|
|
return dst;
|
|
}
|
|
}
|
|
--
|
|
2.19.1
|
|
|