From c4676535ec6bc8a343df022493b9a4ebac039c29 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Wed, 8 May 2024 16:44:28 +0200 Subject: [PATCH] Set Hart count to 20 --- lagarto-hun.nix | 7 +++++++ opensbi-lagarto-hun.patch | 13 +++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 opensbi-lagarto-hun.patch diff --git a/lagarto-hun.nix b/lagarto-hun.nix index 0e866ba..d366809 100644 --- a/lagarto-hun.nix +++ b/lagarto-hun.nix @@ -57,6 +57,12 @@ serviceConfig.Restart = "always"; }; + # Disable hvc0 as it is racing for the same console + systemd.services."serial-getty@hvc0" = { + enable = lib.mkForce false; + wantedBy = lib.mkForce [ ]; + }; + sdImage = { # The image will be loaded as-is in memory, so no compression compressImage = false; @@ -120,6 +126,7 @@ "PLATFORM=fpga/openpiton" "FW_PAYLOAD_PATH=${final.uboot}/u-boot-nodtb.bin" ]; + patches = [ ./opensbi-lagarto-hun.patch ]; }); }) ]; } diff --git a/opensbi-lagarto-hun.patch b/opensbi-lagarto-hun.patch new file mode 100644 index 0000000..cbc1dc6 --- /dev/null +++ b/opensbi-lagarto-hun.patch @@ -0,0 +1,13 @@ +--- a/platform/fpga/openpiton/platform.c 2024-03-12 16:27:13.886525365 +0100 ++++ b/platform/fpga/openpiton/platform.c 2024-03-12 16:28:40.598403778 +0100 +@@ -26,8 +26,8 @@ + #define OPENPITON_DEFAULT_PLIC_ADDR 0xfff1100000 + #define OPENPITON_DEFAULT_PLIC_SIZE (0x200000 + \ + (OPENPITON_DEFAULT_HART_COUNT * 0x1000)) +-#define OPENPITON_DEFAULT_PLIC_NUM_SOURCES 2 +-#define OPENPITON_DEFAULT_HART_COUNT 3 ++#define OPENPITON_DEFAULT_PLIC_NUM_SOURCES 3 ++#define OPENPITON_DEFAULT_HART_COUNT 20 + #define OPENPITON_DEFAULT_CLINT_ADDR 0xfff1020000 + #define OPENPITON_DEFAULT_ACLINT_MTIMER_FREQ 1000000 + #define OPENPITON_DEFAULT_ACLINT_MSWI_ADDR \