-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #292 from VisorFolks/development
Bump changes into stable.
- Loading branch information
Showing
40 changed files
with
1,536 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# CYANCORE LICENSE | ||
# Copyrights (C) 2024, Cyancore Team | ||
# | ||
# File Name : build.mk | ||
# Description : This file builds and gathers project properties | ||
# Primary Author : Akash Kollipara [[email protected]] | ||
# Organisation : Cyancore Core-Team | ||
# | ||
|
||
PROJECT_DIR := $(GET_PATH) | ||
|
||
OPTIMIZATION := s | ||
|
||
EXE_MODE := terravisor | ||
|
||
include $(PROJECT_DIR)/config.mk | ||
|
||
DIR := $(PROJECT_DIR) | ||
include mk/obj.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# CYANCORE LICENSE | ||
# Copyrights (C) 2019, Cyancore Team | ||
# | ||
# File Name : config.mk | ||
# Description : This file consists of project config | ||
# Primary Author : Akash Kollipara [[email protected]] | ||
# Organisation : Cyancore Core-Team | ||
# | ||
|
||
COMPILER := gcc | ||
FAMILY := ibex | ||
PLATFORM := simple_system | ||
STDLOG_MEMBUF := 1 | ||
BOOTMSGS := 1 | ||
EARLYCON_SERIAL := 1 | ||
OBRDLED_ENABLE := 0 | ||
TERRAKERN := 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* CYANCORE LICENSE | ||
* Copyrights (C) 2022, Cyancore Team | ||
* | ||
* File Name : project.c | ||
* Description : This file consists of project srouces | ||
* Primary Author : Akash Kollipara [[email protected]] | ||
* Organisation : Cyancore Core-Team | ||
*/ | ||
|
||
#include <status.h> | ||
#include <stdio.h> | ||
#include <string.h> | ||
#include <terravisor/bootstrap.h> | ||
#include <driver.h> | ||
#include <time.h> | ||
|
||
void plug() | ||
{ | ||
bootstrap(); | ||
driver_setup_all(); | ||
|
||
printf("Demo Program!\n"); | ||
return; | ||
} | ||
|
||
|
||
void play() | ||
{ | ||
static unsigned char i = 0; | ||
char progress[] = "-\\|/"; | ||
uint64_t time; | ||
char c = progress[(i++) % strlen(progress)]; | ||
get_timestamp(&time); | ||
time /= 1000U; | ||
|
||
printf("[%012llu] Running Blinky ... [%c]", time, c); | ||
|
||
mdelay(500); | ||
|
||
printf("\r"); | ||
return; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# RV32 IMC-Extension | ||
|
||
#### Supported Extensions | ||
* RV32I baseline | ||
* M - Hardware multiplication | ||
* C - Compressed instructions | ||
|
||
#### Supported execution level | ||
* Terravisor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# RV32 IMAC [Terravisor] | ||
|
||
Home directory for RV32imac Terravisor | ||
|
||
For terravisor documentation please read [Terravisor README](../../../../../visor/terravisor/README.md) | ||
|
||
Please refer [README.md](../../i/terravisor/README.md) in i/terravisor directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# | ||
# CYANCORE LICENSE | ||
# Copyrights (C) 2024, Cyancore Team | ||
# | ||
# File Name : build.mk | ||
# Description : Build script for this directory. | ||
# Primary Authod : Akash Kollipara [[email protected]] | ||
# Organisation : Cyancore Core-Team | ||
# | ||
|
||
RV32IMC_T_ARCH_DIR := $(GET_PATH) | ||
|
||
include $(RV32IMC_T_ARCH_DIR)/../../i/terravisor/build.mk | ||
|
||
DIR := $(RV32IMC_T_ARCH_DIR) | ||
include mk/obj.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# CYANCORE LICENSE | ||
# Copyrights (C) 2019, Cyancore Team | ||
# | ||
# File Name : build.mk | ||
# Description : This file accumulates sources of console serial | ||
# Primary Author : Akash Kollipara [[email protected]] | ||
# Organisation : Cyancore Core-Team | ||
# | ||
|
||
DIR := $(GET_PATH) | ||
|
||
EARLYCON_SERIAL ?= 0 | ||
CONSOLE_SERIAL := 0 | ||
|
||
$(eval $(call add_define,EARLYCON_SERIAL)) | ||
|
||
ifeq ($(filter $(CONSOLE_SERIAL) $(EARLYCON_SERIAL),1),1) | ||
include mk/obj.mk | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/* | ||
* CYANCORE LICENSE | ||
* Copyrights (C) 2019, Cyancore Team | ||
* | ||
* File Name : earlycon_serial.c | ||
* Description : This file contains sources of uart earlycon | ||
* Primary Author : Akash Kollipara [[email protected]] | ||
* Organisation : Cyancore Core-Team | ||
*/ | ||
|
||
#include <stdint.h> | ||
#include <stddef.h> | ||
#include <stdbool.h> | ||
#include <status.h> | ||
#include <stdlib.h> | ||
#include <syslog.h> | ||
#include <lock/spinlock.h> | ||
#include <resource.h> | ||
#include <visor_call.h> | ||
#include <arch.h> | ||
#include <driver.h> | ||
#include <interrupt.h> | ||
#include <hal/uart.h> | ||
#include <driver/console.h> | ||
#include <driver/sysclk.h> | ||
|
||
static uart_port_t *earlycon_port; | ||
|
||
static status_t earlycon_serial_setup() | ||
{ | ||
uart_get_properties(earlycon_port, console_uart); | ||
|
||
sysdbg2("UART engine @ %p\n", earlycon_port->baddr); | ||
/* | ||
* If memory mapping is applicable, | ||
* put it in mmu supported guide. | ||
*/ | ||
return success; | ||
} | ||
|
||
static status_t earlycon_serial_write(const char c) | ||
{ | ||
status_t ret; | ||
ret = uart_tx(earlycon_port, c); | ||
return ret; | ||
} | ||
|
||
static console_t *earlycon_serial_driver; | ||
|
||
status_t earlycon_serial_driver_exit() | ||
{ | ||
status_t ret; | ||
ret = console_release_device(); | ||
free(earlycon_port); | ||
free(earlycon_serial_driver); | ||
return ret; | ||
} | ||
|
||
status_t earlycon_serial_driver_setup() | ||
{ | ||
status_t ret; | ||
|
||
earlycon_port = (uart_port_t *)malloc(sizeof(uart_port_t)); | ||
if(!earlycon_port) | ||
{ | ||
ret = error_memory_low; | ||
goto cleanup_1; | ||
} | ||
|
||
earlycon_serial_driver = (console_t *)malloc(sizeof(console_t)); | ||
if(!earlycon_serial_driver) | ||
{ | ||
ret = error_memory_low; | ||
goto cleanup_1; | ||
} | ||
earlycon_serial_driver->write = &earlycon_serial_write; | ||
|
||
ret = earlycon_serial_setup(); | ||
if(ret) | ||
goto cleanup_1; | ||
ret = console_attach_device(ret, earlycon_serial_driver); | ||
if(!ret) | ||
goto exit; | ||
cleanup_1: | ||
earlycon_serial_driver_exit(); | ||
exit: | ||
return ret; | ||
} | ||
|
||
#if EARLYCON_SERIAL==1 | ||
INCLUDE_DRIVER(earlycon, earlycon_serial_driver_setup, earlycon_serial_driver_exit, 0, 2, 2); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.