Skip to content

Handle Load/StoreMisalignment Exception in RustSBI manually on k210 platform #6

@wyfcyx

Description

@wyfcyx

Due to the hardware limit of Kendryte k210 chip(it is okay on qemu), when we want to load a 64-bit value in to a general-purpose register(using ld instruction), we have to guarantee that the address is aligned to 8 bytes. However, it is somehow strict so that many librarys do not consider it, leading to some incompatibility(e.g. xmas-elf crate). The same issue may occurs in other instructions, such as lh/lw/sh/sw/sd, but I have not try them yet.

Should we handle them in RustSBI by performing some aligned memory access manually and then merging the results?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions