/* See LICENSE of license details. */ #include #include #include #include #include extern volatile uint64_t tohost; ssize_t _bsp_write(int fd, const void *ptr, size_t len) { if (isatty(fd)) { volatile uint64_t payload[8]; memset((void *)payload, 0, 8 * sizeof(uint64_t)); payload[0] = 64; payload[2] = (uintptr_t)ptr; payload[3] = len; tohost = (uintptr_t)payload; /* // accoring to my understading this part is used fot uart wrrite for later for (size_t jj = 0; jj < len; jj++) { *((uint32_t *)0xFFFF0000) = current[jj]; } */ return len; } return 1; }