Skip to content

Commit

Permalink
Merge branch 'bao-project:main' into fix/pl011-rpi4
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectroQuanta authored Oct 18, 2024
2 parents 6a0834e + 179337b commit 85c9a78
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ci
Submodule ci updated 2 files
+26 −9 docker/Dockerfile
+1 −1 docker/Makefile
2 changes: 1 addition & 1 deletion src/arch/armv8/aarch32/inc/arch/subarch/sysregs.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{ \
unsigned long long _temp, _tempH; \
__asm__ volatile("mrrc p15, " #op1 ", %0, %1, " #crm "\n\r" : "=r"(_temp), "=r"(_tempH)); \
return ((_tempH << 32) | _temp); \
return ((_tempH << 32) | ((unsigned long)_temp)); \
} \
static inline void sysreg_##reg##_write(unsigned long long val) \
{ \
Expand Down
2 changes: 1 addition & 1 deletion src/arch/riscv/inc/arch/csrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
#define SSTATUS_XS_DIRTY (3ULL << SSTATUS_XS_OFF)
#define SSTATUS_SUM (1ULL << 18)
#define SSTATUS_MXR (1ULL << 19)
#define SSTATUS_SD (1ULL << 63)
#define SSTATUS_SD (1ULL << ((REGLEN * 8) - 1))

#define SIE_USIE (1ULL << 0)
#define SIE_SSIE (1ULL << 1)
Expand Down
6 changes: 3 additions & 3 deletions src/arch/riscv/irqc/aia/imsic.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void imsic_init(void)
void imsic_set_enbl(irqid_t intp_id)
{
csrs_siselect_write(IMSIC_EIE + imsic_eie_index(intp_id));
csrs_sireg_set(1ULL << imsic_eie_bit(intp_id));
csrs_sireg_set(1UL << imsic_eie_bit(intp_id));
}

bool imsic_get_pend(irqid_t intp_id)
Expand All @@ -65,7 +65,7 @@ bool imsic_get_pend(irqid_t intp_id)
void imsic_clr_pend(irqid_t intp_id)
{
csrs_siselect_write(IMSIC_EIP + imsic_eie_index(intp_id));
csrs_sireg_clear(1ULL << imsic_eie_bit(intp_id));
csrs_sireg_clear(1UL << imsic_eie_bit(intp_id));
}

/**
Expand All @@ -77,7 +77,7 @@ void imsic_inject_pend(size_t guest_file, irqid_t intp_id)
UNUSED_ARG(guest_file);

csrs_vsiselect_write(IMSIC_EIP + imsic_eie_index(intp_id));
csrs_vsireg_clear(1ULL << imsic_eie_bit(intp_id));
csrs_vsireg_clear(1UL << imsic_eie_bit(intp_id));
}

void imsic_send_msi(cpuid_t target_cpu, irqid_t ipi_id)
Expand Down
7 changes: 5 additions & 2 deletions src/arch/riscv/sbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,10 @@ static struct sbiret sbi_bao_handler(unsigned long fid)
{
struct sbiret ret;

ret.error = hypercall(fid);
// Any hypercall will always be successful from a purely SBI standpoint. A
// bao-specific hypercall code is returned as the value.
ret.error = SBI_SUCCESS;
ret.value = hypercall(fid);

return ret;
}
Expand Down Expand Up @@ -436,7 +439,7 @@ size_t sbi_vs_handler()
break;
default:
WARNING("guest issued unsupport sbi extension call (%d)", extid);
ret.value = SBI_ERR_NOT_SUPPORTED;
ret.error = SBI_ERR_NOT_SUPPORTED;
}

vcpu_writereg(cpu()->vcpu, REG_A0, (unsigned long)ret.error);
Expand Down

0 comments on commit 85c9a78

Please sign in to comment.