Signed-off-by: Oleksii Kurochko
---
Changes since v1:
* initialization of .bss was moved to head.S
---
xen/arch/riscv/include/asm/asm.h | 4
xen/arch/riscv/riscv64/head.S| 9 +
2 files changed, 13 insertions(+)
diff --git a/xen/arch/riscv/include/asm/asm.h b/xen/arch/riscv
g
frame and macros (bug_*()) related to the 'struct bug_frame'
* Introduce BUG_INSTR and BUG_ASM_CONST to make _ASM_BUGFRAME_TEXT reusable
between
architectures
* Make macros related to bug frame structure more generic.
Signed-off-by: Oleksii Kurochko
---
Changes in V4:
* common/bug.c:
redundant redeclaration of ...
In the following two patches x86 and ARM archictectures will be
switched fully:
* xen/arm: switch ARM to use generic implementation of bug.h
* xen/x86: switch x86 to use generic implemetation of bug.h
Signed-off-by: Oleksii Kurochko
---
Changes in V4:
implementation of bug.h macros to generic one
Signed-off-by: Oleksii Kurochko
---
Changes in V4:
* Switch ARM implementation to generic one
* Remove BUG_FN_REG from arm{16,32}/bug.h as it isn't needed after switch to
generic implementation
* Update commit message
---
Changes in V3:
* As prototype and what
-by: Oleksii Kurochko
---
Changes in V4:
* Back comment /* !__ASSEMBLY__ */ for #else case in
* Remove changes related to x86/.../asm/debuger.h as do_bug_frame() prototype
was updated and cpu_user_regs isn't const any more.
---
Changes in V3:
* As prototype and what do_bug_frame() returns
ic
do_bug_frame() uses
bug_ptr().
* Introduce BUG_INSTR and MODIFIER to make _ASM_BUGFRAME_TEXT reusable
between x86 and
RISC-V.
* Rework do_invalid_op() in x86 ( re-use handle_bug_frame() and
find_bug_frame() )
---
Oleksii Kurochko (4):
xen: introduce CONFIG_GENERIC_BUG_FRAME
xen
EN)
(XEN) Reboot in five seconds...
(XEN) Xen: Platform reset did not work properly!
(XEN) Xen: Platform reset did not work properly!
Signed-off-by: Oleksii Kurochko
---
xen/arch/arm/xen.lds.S | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
inde
Calculate load and linker linker image addresses and
setup initial pagetables.
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/setup.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
index b7cd438a1d..f69bc278bb 100644
.
Origin: https://gitlab.com/xen-on-risc-v/xen/-/tree/riscv-rebase 4af165b468af
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/Makefile | 1 +
xen/arch/riscv/include/asm/mm.h | 9 ++
xen/arch/riscv/include/asm/page.h | 90
xen/arch/riscv/mm.c | 223
the built page table into the SATP
3. Enables MMU.
4. Updates smoke test to grep message which should be printed after
MMU is enabled.
Oleksii Kurochko (3):
xen/riscv: introduce setup_initial_pages
xen/riscv: setup initial pagetables
automation: update RISC-V smoke test
automation
The smoke test was updated to verify that MMU has been enabled.
Signed-off-by: Oleksii Kurochko
---
automation/scripts/qemu-smoke-riscv64.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/automation/scripts/qemu-smoke-riscv64.sh
b/automation/scripts/qemu-smoke-riscv64.sh
Disable FPU to detect illegal usage of floating point in kernel
space.
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/setup.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
index 593bb471a4..b7cd438a1d 100644
--- a/xen/arch/riscv
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/setup.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
index 154bf3a0bc..593bb471a4 100644
--- a/xen/arch/riscv/setup.c
+++ b/xen/arch/riscv/setup.c
@@ -24,6 +24,18 @@ static
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/setup.c | 12
1 file changed, 12 insertions(+)
diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
index b3f8b10f71..154bf3a0bc 100644
--- a/xen/arch/riscv/setup.c
+++ b/xen/arch/riscv/setup.c
@@ -26,6 +26,18 @@ static
The patch modifies the grep pattern to reflect the usage of WARN.
Signed-off-by: Oleksii Kurochko
Reviewed-by: Alistair Francis
Acked-by: Stefano Stabellini
---
Changes in V4:
- Add Reviewed-by: Alistair Francis
and Acked-by: Stefano Stabellini
---
Changes in V3:
- Update commit message
The patch introduces macros: BUG(), WARN(), run_in_exception(),
assert_failed.
The implementation uses "ebreak" instruction in combination with
diffrent bug frame tables (for each type) which contains useful
information.
Signed-off-by: Oleksii Kurochko
---
Changes in V4:
- Updates i
The patch introduces stuff needed to decode a reason of an
exception.
Signed-off-by: Oleksii Kurochko
---
Changes in V4:
- fix string in decode_reserved_interrupt_cause()
---
Changes in V3:
- Nothing changed
---
Changes in V2:
- Make decode_trap_cause() more optimization friendly
Signed-off-by: Oleksii Kurochko
Acked-by: Alistair Francis
---
Changes in V4:
- Add Acked-by: Alistair Francis
---
Changes in V3:
- Nothing changed
---
Changes in V2:
- Nothing changed
---
xen/arch/riscv/setup.c | 16
1 file changed, 16 insertions(+)
diff --git a/xen
Signed-off-by: Oleksii Kurochko
Reviewed-by: Alistair Francis
---
Changes in V4:
- Nothing changed
---
Changes in V3:
- Nothing changed
---
Changes in V2:
- Rename setup_trap_handler() to trap_init().
- Add Reviewed-by to the commit message.
---
xen/arch/riscv/include/asm/traps.h | 1
tch series.
- Refactor bug.h, remove bug_instr_t type from it.
- Refactor decode_trap_cause() function to be more optimization-friendly.
- Add two new empty headers: and as they are needed to
include which provides ARRAY_SIZE and other macros.
- Code style fixes.
---
Oleksii Kurochk
Since the generic version of bug.h stuff was introduced use
instead of unnecessary
Signed-off-by: Oleksii Kurochko
---
Changes in V3:
* Update patch 2 not to break compilation: move some parts from patches 3 and 4
to patch 2:
* move some generic parts from to
* add define
-by: Oleksii Kurochko
---
Changes in V3:
* As prototype and what do_bug_frame() returns was changed so patch 3 and 4
was updated to use a new version of do_bug_frame
* MODIFIER was change to BUG_ASM_CONST to align with generic implementation
---
Changes in V2:
* Remove all unnecessary things
of do_bug_frame
* new config CONFIG_GENERIC_BUG_FRAME
Signed-off-by: Oleksii Kurochko
---
Changes in V3:
* Add debugger_trap_fatal() to do_bug_frame(). It simplifies usage of
do_bug_frame() for x86 so making handle_bug_frame() and find_bug_frame()
not needed anymore.
* Update do_bug_frame
() to bug_ptr() to align it with generic
implementation.
Signed-off-by: Oleksii Kurochko
---
Changes in V3:
* As prototype and what do_bug_frame() returns was changed so patch 3 and 4
was updated to use a new version of do_bug_frame
---
Changes in V2:
* Rename bug_file() in ARM implementation
s
bug_ptr().
* Introduce BUG_INSTR and MODIFIER to make _ASM_BUGFRAME_TEXT reusable
between x86 and
RISC-V.
* Rework do_invalid_op() in x86 ( re-use handle_bug_frame() and
find_bug_frame() )
---
Oleksii Kurochko (4):
xen: introduce CONFIG_GENERIC_BUG_FRAME
xen: change to
xen/ar
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
* Remove all unnecessary things from as they were introduced in
.
* Define BUG_INSTR = 'ud2' and MODIFIER = 'c' ( it is needed to skip '$'
when use an imidiate in x86 assembly )
* Update do_invalid_op() to re-use handle_bug_frame
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
* Rename bug_file() in ARM implementation to bug_ptr() as
generic do_bug_frame() uses bug_ptr().
* Remove generic parts from bug.h
* Remove declaration of 'int do_bug_frame(...)'
from as it was introduced in
---
xen/arch/arm/Kconfig
of do_bug_frame()
* new config CONFIG_GENERIC_BUG_FRAME
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
- Switch to x86 implementation as generic as it is more compact
( at least from the point of view of bug frame structure ).
- Rename CONFIG_GENERIC_DO_BUG_FRAME
more generic.
* Rename bug_file() in ARM implementation to bug_ptr() as generic
do_bug_frame() uses
bug_ptr().
* Introduce BUG_INSTR and MODIFIER to make _ASM_BUGFRAME_TEXT reusable
between x86 and
RISC-V.
* Rework do_invalid_op() in x86 ( re-use handle_bug_frame() and
find_bug_frame()
Since the generic version of bug.h stuff was introduced use
instead of unnecessary
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
* Put [PATCH v1 4/4] xen: change to as second patch,
update the patch to change all to among the whole
project
to not break build.
* Update
Signed-off-by: Oleksii Kurochko
---
Changes in V3:
- Nothing changed
---
Changes in V2:
- Nothing changed
---
xen/arch/riscv/setup.c | 16
1 file changed, 16 insertions(+)
diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
index d502cf06b0..8d070244fd 100644
The patch modifies the grep pattern to reflect the usage of WARN.
Signed-off-by: Oleksii Kurochko
---
Changes in V3:
- Update commit message
---
Changes in V2:
- Leave only the latest "grep ..."
---
automation/scripts/qemu-smoke-riscv64.sh | 2 +-
1 file changed, 1 insertion(+),
The patch introduces stuff needed to decode a reason of an
exception.
Signed-off-by: Oleksii Kurochko
---
Changes in V3:
- Nothing changed
---
Changes in V2:
- Make decode_trap_cause() more optimization friendly.
- Merge the pathc which introduces do_unexpected_trap() to the current one
Signed-off-by: Oleksii Kurochko
Reviewed-by: Alistair Francis
---
Changes in V3:
- Nothing changed
---
Changes in V2:
- Rename setup_trap_handler() to trap_init().
- Add Reviewed-by to the commit message.
---
xen/arch/riscv/include/asm/traps.h | 1 +
xen/arch/riscv/setup.c | 4
The patch introduces macros: BUG(), WARN(), run_in_exception(),
assert_failed.
The implementation uses "ebreak" instruction in combination with
diffrent bug frame tables (for each type) which contains useful
information.
Signed-off-by: Oleksii Kurochko
---
Changes in V3:
- Rebase
The patch introduces an implementation of basic exception handlers:
- to save/restore context
- to handle an exception itself. The handler calls wait_for_interrupt
now, nothing more.
Signed-off-by: Oleksii Kurochko
---
Changes in V3:
- Nothing changed
---
Changes in V2:
- Refactor entry.S
pdate correspondingly
the patches in the patch series.
- Refactor bug.h, remove bug_instr_t type from it.
- Refactor decode_trap_cause() function to be more optimization-friendly.
- Add two new empty headers: and as they are needed to
include which provides ARRAY_SIZE and other macro
Signed-off-by: Oleksii Kurochko
Acked-by: Alistair Francis
---
Changes in V3:
- Add Acked-by: Alistair Francis
---
Changes in V2:
- Take the latest version of riscv_encoding.h from OpenSBI.
- Update riscv_encoding.h with Xen related changes mentioned in the
commit message.
- Update comm
Signed-off-by: Oleksii Kurochko
Reviewed-by: Alistair Francis
---
Changes in V3:
- Nothing changed
---
Changes in V2:
- Add Reviewed-by to the commit message
---
xen/arch/riscv/riscv64/head.S | 5 +
1 file changed, 5 insertions(+)
diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch
eded for current status of
the RISC-V port
- register_t renamed to unsigned long
- rename wait_for_interrupt to wfi
Signed-off-by: Bobby Eshleman
Signed-off-by: Oleksii Kurochko
---
Changes in V3:
- update code style for die() function
---
Changes in V2:
- All the changes were a
To include is required
Signed-off-by: Oleksii Kurochko
Acked-by: Alistair Francis
---
Changes in V3:
- Add Acked-by: Alistair Francis
---
Changes in V2:
- is a new empty header which is required to include
---
xen/arch/riscv/include/asm/string.h | 6 ++
1 file changed, 6
The following changes were made in comparison with from
Linux:
* remove all defines as they are defined in riscv_encoding.h
* leave only csr_* macros
Origin: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
d2d11f342b17
Signed-off-by: Oleksii Kurochko
---
Changes in V3
To include is required
Signed-off-by: Oleksii Kurochko
Acked-by: Alistair Francis
---
Changes in V3:
- Add Acked-by: Alistair Francis
---
Changes in V2:
- is a new empty header which is required to include
---
xen/arch/riscv/include/asm/cache.h | 6 ++
1 file changed, 6
Signed-off-by: Oleksii Kurochko
---
Changes in V3:
- Nothing changed
---
Changes in V2:
- Nothing changed
---
xen/arch/riscv/include/asm/asm.h | 54
1 file changed, 54 insertions(+)
create mode 100644 xen/arch/riscv/include/asm/asm.h
diff --git a/xen/arch
-off-by: Oleksii Kurochko
Reviewed-by: Alistair Francis
---
Changes in V3:
- Change the name of config RISCV_ISA_RV64IMA to RISCV_ISA_RV64G as
instructions from Zicsr and Zifencei extensions aren't part of I
extension any more.
---
Changes in V2:
- Nothing changed
---
xen/arch/riscv
Add check if there is a message 'Hello from C env' presents
in log file to be sure that stack is set and C part of early printk
is working.
Signed-off-by: Oleksii Kurochko
Acked-by: Stefano Stabellini
Reviewed-by: Alistair Francis
---
Changes in V10:
- Nothing changed
---
Changes in V9
ow so there is no vscnprintf.
This commit adds early printk implementation built on the putc SBI call.
As sbi_console_putchar() is already being planned for deprecation
it is used temporarily now and will be removed or reworked after
real uart will be ready.
Signed-off-by: Bobby Eshleman
Signed-off-by: Ol
5:
- Nothing changed
---
Changes in V4:
- Nothing changed
---
Changes in V3:
- Nothing changed
- All mentioned comments by Stefano in Xen mailing list will be
fixed as a separate patch out of this patch series.
---
Oleksii Kurochko (2):
xen/riscv: introduce early_printk basic stuff
automa
ow so there is no vscnprintf.
This commit adds early printk implementation built on the putc SBI call.
As sbi_console_putchar() is already being planned for deprecation
it is used temporarily now and will be removed or reworked after
real uart will be ready.
Signed-off-by: Bobby Eshleman
Signed-off-by: Ol
All mentioned comments by Stefano in Xen mailing list will be
fixed as a separate patch out of this patch series.
---
Oleksii Kurochko (2):
xen/riscv: introduce early_printk basic stuff
automation: add RISC-V smoke test
automation/gitlab-ci/test.yaml| 20 ++
automa
Add check if there is a message 'Hello from C env' presents
in log file to be sure that stack is set and C part of early printk
is working.
Signed-off-by: Oleksii Kurochko
Acked-by: Stefano Stabellini
Reviewed-by: Alistair Francis
---
Changes in V9:
- Nothing changed
---
Changes in V8:
- Set
header
* generic implementation of do_bug_frame()
* new config CONFIG_GENERIC_BUG_FRAME
Signed-off-by: Oleksii Kurochko
---
xen/common/Kconfig| 6 ++
xen/common/Makefile | 1 +
xen/common/bug.c | 88 +
xen/include/xen/bug.h | 127
Signed-off-by: Oleksii Kurochko
---
xen/arch/arm/Kconfig | 1 +
xen/arch/arm/include/asm/bug.h | 86
xen/arch/arm/include/asm/div64.h | 2 +-
xen/arch/arm/traps.c | 79 -
xen/arch/arm/vgic/vgic-v2.c
only common parts was removed from .
RISC-V will be switched to use and in the future, it will use common
the version of do_bug_frame() when xen/common will work for RISC-V.
Oleksii Kurochko (4):
xen: introduce CONFIG_GENERIC_BUG_FRAME
xen/arm: switch ARM to use generic implementation
Since the generic version of bug.h stuff was introduced it
is necessary to rename all uses of to
Signed-off-by: Oleksii Kurochko
---
xen/drivers/cpufreq/cpufreq.c | 2 +-
xen/include/xen/lib.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/drivers/cpufreq
Signed-off-by: Oleksii Kurochko
---
xen/arch/x86/acpi/cpufreq/cpufreq.c | 2 +-
xen/arch/x86/include/asm/asm_defns.h | 2 +-
xen/arch/x86/include/asm/bug.h | 32 ++--
3 files changed, 4 insertions(+), 32 deletions(-)
diff --git a/xen/arch/x86/acpi/cpufreq
ow so there is no vscnprintf.
This commit adds early printk implementation built on the putc SBI call.
As sbi_console_putchar() is already being planned for deprecation
it is used temporarily now and will be removed or reworked after
real uart will be ready.
Signed-off-by: Bobby Eshleman
Signed-off-by: Ol
in test.yaml for .qemu-riscv64.
---
Changes in V5:
- Nothing changed
---
Changes in V4:
- Nothing changed
---
Changes in V3:
- Nothing changed
- All mentioned comments by Stefano in Xen mailing list will be
fixed as a separate patch out of this patch series.
---
Oleksii Kurochko (2):
xen
Add check if there is a message 'Hello from C env' presents
in log file to be sure that stack is set and C part of early printk
is working.
Signed-off-by: Oleksii Kurochko
Acked-by: Stefano Stabellini
Reviewed-by: Alistair Francis
---
Changes in V8:
- Set "needs: archlinux-current-gcc-ri
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
- Leave only the latest "grep ..."
---
automation/scripts/qemu-smoke-riscv64.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/automation/scripts/qemu-smoke-riscv64.sh
b/automation/scripts/qemu-smoke-riscv6
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
- Nothing changed
---
xen/arch/riscv/setup.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
index c8513ca4f8..bcff680fb5 100644
--- a/xen/arch/riscv/setup.c
+++ b/xen/arch
The patch introduces macros: BUG(), WARN(), run_in_exception(),
assert_failed.
The implementation uses "ebreak" instruction in combination with
diffrent bug frame tables (for each type) which contains useful
information.
Signed-off-by: Oleksii Kurochko
---
Changes:
- Remove __
The patch introduces stuff needed to decode a reason of an
exception.
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
- Make decode_trap_cause() more optimization friendly.
- Merge the pathc which introduces do_unexpected_trap() to the current one.
---
xen/arch/riscv/traps.c | 85
Signed-off-by: Oleksii Kurochko
Reviewed-by: Alistair Francis
---
Changes in V2:
- Add Reviewed-by to the commit message
---
xen/arch/riscv/riscv64/head.S | 5 +
1 file changed, 5 insertions(+)
diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S
index d444dd8aad
eded for current status of
the RISC-V port
- register_t renamed to unsigned long
- rename wait_for_interrupt to wfi
Signed-off-by: Bobby Eshleman
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
- All the changes were added to the commit message.
- temporarily was added function
Signed-off-by: Oleksii Kurochko
Reviewed-by: Alistair Francis
---
Changes in V2:
- Rename setup_trap_handler() to trap_init().
- Add Reviewed-by to the commit message.
---
xen/arch/riscv/include/asm/traps.h | 1 +
xen/arch/riscv/setup.c | 4
xen/arch/riscv/traps.c
To include is required
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
- is a new empty header which is required to include
---
xen/arch/riscv/include/asm/string.h | 6 ++
1 file changed, 6 insertions(+)
create mode 100644 xen/arch/riscv/include/asm/string.h
diff --git a/xen
The following changes were made in comparison with from
Linux:
* remove all defines as they are defined in riscv_encoding.h
* leave only csr_* macros
Origin: https://github.com/torvalds/linux.git 2475bf0250de
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
- Minor refactoring mentioned
The patch introduces an implementation of basic exception handlers:
- to save/restore context
- to handle an exception itself. The handler calls wait_for_interrupt
now, nothing more.
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
- Refactor entry.S to start using of defines introduced
To include is required
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
- is a new empty header which is required to include
---
xen/arch/riscv/include/asm/cache.h | 6 ++
1 file changed, 6 insertions(+)
create mode 100644 xen/arch/riscv/include/asm/cache.h
diff --git a/xen
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
- Take the latest version of riscv_encoding.h from OpenSBI.
- Update riscv_encoding.h with Xen related changes mentioned in the
commit message.
- Update commit message and add "Origin:" tag
---
xen/arch/riscv/include/asm/ri
unction to be more optimization-friendly.
- Add two new empty headers: and as they are needed to
include which provides ARRAY_SIZE and other macros.
- Code style fixes.
---
Oleksii Kurochko (14):
xen/riscv: add _zicsr to CFLAGS
xen/riscv: add header
xen/riscv: add header
xen/riscv:
Work with some registers requires csr command which is part of
Zicsr.
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
- Nothing changed
---
xen/arch/riscv/arch.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk
index
Signed-off-by: Oleksii Kurochko
---
Changes in V2:
- Nothing changed
---
xen/arch/riscv/include/asm/asm.h | 54
1 file changed, 54 insertions(+)
create mode 100644 xen/arch/riscv/include/asm/asm.h
diff --git a/xen/arch/riscv/include/asm/asm.h b/xen/arch/riscv
Add check if there is a message 'Hello from C env' presents
in log file to be sure that stack is set and C part of early printk
is working.
Signed-off-by: Oleksii Kurochko
Acked-by: Stefano Stabellini
Reviewed-by: Alistair Francis
---
Changes in V7:
- Fix dependecy for qemu-smoke-riscv64-gcc
g.debug
- Move dockerfile changes to separate config and sent them as
separate patch to mailing list.
- Update test.yaml to wire up smoke test
---
Oleksii Kurochko (2):
xen/riscv: introduce early_printk basic stuff
automation: add RISC-V smoke test
automation/gitlab-ci/test.yaml
ow so there is no vscnprintf.
This commit adds early printk implementation built on the putc SBI call.
As sbi_console_putchar() is already being planned for deprecation
it is used temporarily now and will be removed or reworked after
real uart will be ready.
Signed-off-by: Bobby Eshleman
Signed-off-by: Ol
ow so there is no vscnprintf.
This commit adds early printk implementation built on the putc SBI call.
As sbi_console_putchar() is already being planned for deprecation
it is used temporarily now and will be removed or reworked after
real uart will be ready.
Signed-off-by: Bobby Eshleman
Signed-off-by: Ol
Add check if there is a message 'Hello from C env' presents
in log file to be sure that stack is set and C part of early printk
is working.
Signed-off-by: Oleksii Kurochko
Acked-by: Stefano Stabellini
Reviewed-by: Alistair Francis
---
Changes in V6:
- Rename container name in test.yaml
list comments
- Remove unneeded types in
- Introduce definition of STACK_SIZE
- order the files alphabetically in Makefile
- Add license to early_printk.c
- Add RISCV_32 dependecy to config EARLY_PRINTK in Kconfig.debug
- Move dockerfile changes to separate config and sent th
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/setup.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
index d09ffe1454..174e134c93 100644
--- a/xen/arch/riscv/setup.c
+++ b/xen/arch/riscv/setup.c
@@ -1,16 +1,27 @@
#include
Signed-off-by: Oleksii Kurochko
---
automation/scripts/qemu-smoke-riscv64.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/automation/scripts/qemu-smoke-riscv64.sh
b/automation/scripts/qemu-smoke-riscv64.sh
index e0f06360bc..e7cc7f1442 100755
--- a/automation/scripts/qemu-smoke-riscv64
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/riscv64/head.S | 5 +
1 file changed, 5 insertions(+)
diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S
index d444dd8aad..ffd95f9f89 100644
--- a/xen/arch/riscv/riscv64/head.S
+++ b/xen/arch/riscv/riscv64/head.S
The patch introduces macros: BUG(), WARN(), run_in_exception(),
assert_failed.
The implementation uses "ebreak" instruction in combination with
diffrent bug frame tables (for each type) which contains useful
information.
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/include
The patch introduces an implementation of basic exception handlers:
- to save/restore context
- to handle an exception itself. The handler calls wait_for_interrupt
now, nothing more.
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/Makefile| 2 +
xen/arch/riscv/entry.S
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/include/asm/csr.h | 82
1 file changed, 82 insertions(+)
create mode 100644 xen/arch/riscv/include/asm/csr.h
diff --git a/xen/arch/riscv/include/asm/csr.h b/xen/arch/riscv/include/asm/csr.h
new file mode 100644
The patch introduces the function the purpose of which is to print
a cause of an exception and call "wfi" instruction.
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/traps.c | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/xen/arch/riscv/traps.c
and removed unneeded things from
it now.
Signed-off-by: Bobby Eshleman
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/include/asm/processor.h | 114 +
1 file changed, 114 insertions(+)
create mode 100644 xen/arch/riscv/include/asm/processor.h
diff --git a/xen/arch/riscv
Work with some registers requires csr command which is part of
Zicsr.
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/arch.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk
index 012dc677c3..95b41d9f3e 100644
--- a/xen/arch
Add ability to print hex number.
It might be useful to print register value as debug information
in BUG(), WARN(), etc...
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/early_printk.c | 39 +++
xen/arch/riscv/include/asm/early_printk.h | 2 ++
2 files
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/setup.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
index 174e134c93..35ab9d25c6 100644
--- a/xen/arch/riscv/setup.c
+++ b/xen/arch/riscv/setup.c
@@ -1,6
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/include/asm/riscv_encoding.h | 945
1 file changed, 945 insertions(+)
create mode 100644 xen/arch/riscv/include/asm/riscv_encoding.h
diff --git a/xen/arch/riscv/include/asm/riscv_encoding.h
b/xen/arch/riscv/include/asm
The patch introduces stuff needed to decode a reason of an
exception.
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/traps.c | 88 ++
1 file changed, 88 insertions(+)
diff --git a/xen/arch/riscv/traps.c b/xen/arch/riscv/traps.c
index 3201b851ef
should be definitely changed
in the neareset future.
It wasn't implemented show_execution_state() and stack trace discovering
as it's not necessary now.
Oleksii Kurochko (14):
xen/riscv: add _zicsr to CFLAGS
xen/riscv: add header
xen/riscv: add header
xen/riscv: add early_printk_hnum()
Signed-off-by: Oleksii Kurochko
---
xen/arch/riscv/include/asm/asm.h | 54
1 file changed, 54 insertions(+)
create mode 100644 xen/arch/riscv/include/asm/asm.h
diff --git a/xen/arch/riscv/include/asm/asm.h b/xen/arch/riscv/include/asm/asm.h
new file mode 100644
.
Signed-off-by: Bobby Eshleman
Signed-off-by: Oleksii Kurochko
Reviewed-by: Bobby Eshleman
Reviewed-by: Alistair Francis
---
Changes in V5:
- Nothing critical was changed
- Code style fixes
- Remove unneeded from sbi.c
---
Changes in V4:
- Nothing changed
---
Changes in V3
Add check if there is a message 'Hello from C env' presents
in log file to be sure that stack is set and C part of early printk
is working.
Signed-off-by: Oleksii Kurochko
Acked-by: Stefano Stabellini
Reviewed-by: Alistair Francis
---
Changes in V5:
- Nothing changed
---
Changes in V4
ow so there is no vscnprintf.
This commit adds early printk implementation built on the putc SBI call.
As sbi_console_putchar() is already being planned for deprecation
it is used temporarily now and will be removed or reworked after
real uart will be ready.
Signed-off-by: Bobby Eshleman
Signed-off-by: Ol
In the patch "include/types: move stddef.h-kind types to common
header" [1] size_t was moved from to
so early_printk should be updated correspondingly.
[1]
https://lore.kernel.org/xen-devel/5a0a9e2a-c116-21b5-8081-db75fe417...@suse.com/
Signed-off-by: Oleksii Kurochko
---
xen/i
Signed-off-by: Oleksii Kurochko
---
Changes in V5:
- Remove size_t from asm/types after rebase on top of the patch
"include/types: move stddef.h-kind types to common header" [1].
- All other types were back as they are used in and
in xen/common.
---
Cha
601 - 700 of 748 matches
Mail list logo