diff --git a/fpga/zsbl/boot.c b/fpga/zsbl/boot.c index e8065f732..5b022cea3 100644 --- a/fpga/zsbl/boot.c +++ b/fpga/zsbl/boot.c @@ -49,6 +49,7 @@ int disk_read(BYTE * buf, LBA_t sector, UINT count) { if (sd_cmd(18, sector & 0xffffffff, crc) != 0x00) { print_uart("disk_read: CMD18 failed. r = "); print_uart_byte(r & 0xff); + print_uart("\r\n"); return -1; } @@ -61,6 +62,7 @@ int disk_read(BYTE * buf, LBA_t sector, UINT count) { if (r != SD_DATA_TOKEN) { print_uart("Didn't receive data token first thing. Shoot: "); print_uart_byte(r & 0xff); + print_uart("\r\n"); return -1; } @@ -97,7 +99,8 @@ void copyFlash(QWORD address, QWORD * Dst, DWORD numBlocks) { // Initialize UART for messages init_uart(20000000, 115200); - + + print_uart("Booting wally.\r\n"); // Print the wally banner print_uart(BANNER); diff --git a/fpga/zsbl/boot.h b/fpga/zsbl/boot.h index 2048ca47c..087550326 100644 --- a/fpga/zsbl/boot.h +++ b/fpga/zsbl/boot.h @@ -19,15 +19,15 @@ typedef QWORD LBA_t; #define OPENSBI_ADDRESS 0x80000000 // FW_TEXT_START #define KERNEL_ADDRESS 0x80200000 // FW_JUMP_ADDR -#define BANNER " █▀█ █▀█ █▀█ █▀▀ █ █\n" \ -" █ █ █ █▄▀ █▄▄ ▄▄▄ █ █\n" \ -" █▄█ █▄█ █ █ █▄▄ ▀▄▀\n" \ -" ____ ____ ____ ___ ___ ____ ___\n" \ -" \\ \\ / / / \\ | | | | \\ \\ / /\n" \ -" \\ \\ __ / / / \\ | | | | \\ \\/ /\n" \ -" \\ \\/ \\/ / / /\\ \\ | | | | \\ /\n" \ -" \\ / / ____ \\ | |___ | |___ | |\n" \ -" \\___/\\___/ /___/ \\___\\|_______||_______| |___|\n\n" +#define BANNER " █▀█ █▀█ █▀█ █▀▀ █ █\r\n" \ +" █ █ █ █▄▀ █▄▄ ▄▄▄ █ █\r\n" \ +" █▄█ █▄█ █ █ █▄▄ ▀▄▀\r\n" \ +" ____ ____ ____ ___ ___ ____ ___\r\n" \ +" \\ \\ / / / \\ | | | | \\ \\ / /\r\n" \ +" \\ \\ __ / / / \\ | | | | \\ \\/ /\r\n" \ +" \\ \\/ \\/ / / /\\ \\ | | | | \\ /\r\n" \ +" \\ / / ____ \\ | |___ | |___ | |\r\n" \ +" \\___/\\___/ /___/ \\___\\|_______||_______| |___|\r\n\r\n" // Export disk_read int disk_read(BYTE * buf, LBA_t sector, UINT count); diff --git a/fpga/zsbl/gpt.c b/fpga/zsbl/gpt.c index c308ea878..a52dc9048 100644 --- a/fpga/zsbl/gpt.c +++ b/fpga/zsbl/gpt.c @@ -42,21 +42,21 @@ int gpt_load_partitions() { // Load device tree ret = disk_read((BYTE *)FDT_ADDRESS, fdt->first_lba, fdt->last_lba - fdt->first_lba + 1); if (ret < 0) { - print_uart("Failed to load device tree!"); + print_uart("Failed to load device tree!\r\n"); return -1; } // Load OpenSBI ret = disk_read((BYTE *)OPENSBI_ADDRESS, opensbi->first_lba, opensbi->last_lba - opensbi->first_lba + 1); if (ret < 0) { - print_uart("Failed to load OpenSBI!"); + print_uart("Failed to load OpenSBI!\r\n"); return -1; } // Load Linux ret = disk_read((BYTE *)KERNEL_ADDRESS, kernel->first_lba,kernel->last_lba - kernel->first_lba + 1); if (ret < 0) { - print_uart("Failed to load Linux!"); + print_uart("Failed to load Linux!\r\n"); return -1; } diff --git a/fpga/zsbl/sd.c b/fpga/zsbl/sd.c index 585b98281..02ee4d3bf 100644 --- a/fpga/zsbl/sd.c +++ b/fpga/zsbl/sd.c @@ -133,7 +133,7 @@ void init_sd(){ uint64_t r; - print_uart("Initializing SD Card in SPI mode"); + print_uart("Initializing SD Card in SPI mode.\r\n"); // Reset SD Card command // Initializes SD card into SPI mode if CS is asserted '0' @@ -155,6 +155,6 @@ void init_sd(){ r = ACMD41(); } while (r == 0x1); - print_uart("SD card is initialized"); + print_uart("SD card is initialized.\n\r"); }