board: introduce Amazon Kindle PW3 support

With support for this board also come the following changes:
- rework blobs handling to get past the 0 size bug
- basic cpu "set up" in start.S
- assembly memcpy
- uart debugging
This commit is contained in:
Ivaylo Ivanov committed 2025-07-08 15:54:02 +03:00
1 parent 20f759082d
commit 8dc27cc402
21 files changed
+1284 -70

No files matched your search

+6
View File
@@ -4,4 +4,10 @@ menu "Libraries"
default y
help
Say Y if you want to have Framebuffer output.
config UART_DEBUG
bool "Support for UART debugging"
default n
help
Say Y if you want to have UART output.
endmenu
+8
View File
@@ -11,6 +11,8 @@
long int debug_linecount = 0;
void uart_puts(const char *s);
// Global log level that controls the verbosity
static int global_loglevel = CONFIG_LOGLEVEL;
@@ -50,6 +52,12 @@ void printk(int log_level, char *text)
break;
}
#ifdef CONFIG_UART_DEBUG
uart_puts(prefix);
uart_puts(text);
uart_puts("\r");
#endif
#ifdef CONFIG_SIMPLE_FB
// Actually the first line's Y pos. Scales in __simplefb_raw_print
int y_pos = 5;
+4 -32
View File
@@ -78,43 +78,15 @@ static void *__optimized_memcpy (void *dst0, const void *src0, size_t len0)
// Assembly-driven functions
#ifdef __aarch64__
void *memcpy (void *__restrict, const void *__restrict, size_t);
void *memmove (void *, const void *, size_t);
#endif
#ifdef __arm__
void *memcpy (void *s1, const void *s2, size_t n)
{
char *dest = (char *)s1;
const char *src = (const char *)s2;
#elif __arm__
while (n--) {
*dest++ = *src++;
}
void *__memcpy_arm (void *__restrict, const void *__restrict, size_t);
#define memcpy __memcpy_arm
return s1;
}
void *memmove (void *s1, const void *s2, size_t n)
{
char *dest = (char *)s1;
const char *src = (const char *)s2;
if (dest <= src) {
while (n--) {
*dest++ = *src++;
}
} else {
src += n;
dest += n;
while (n--) {
*--dest = *--src;
}
}
return s1;
}
#endif
static inline int tolower (int c)