diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-12-05 15:34:33 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-12-05 16:02:51 +0100 |
| commit | 76169cd214e4830a523c8c2ee7bbddc04b4253df (patch) | |
| tree | 54d754426ca41729414e7f7ddb9427a61594f464 /arch/riscv/supervisor/hsm/compiler.h | |
| parent | f463d544793ff83efd8b95d0bce5ec80fd8170f3 (diff) | |
| download | farga-76169cd214e4830a523c8c2ee7bbddc04b4253df.tar.gz farga-76169cd214e4830a523c8c2ee7bbddc04b4253df.zip | |
supervisor: Add an example on the HSM extension
The HSM extension from SBI v2.0 allows a supervisor to manage the state
of harts on the system. Moreover, it also guarantees that only one hart
makes it into the booting stages of the supervisor, and it's up to the
supervisor to wake up the rest through the HSM extension.
I have added an example which showcases this extension in different
ways, and it finally shuts down the machine.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'arch/riscv/supervisor/hsm/compiler.h')
| -rw-r--r-- | arch/riscv/supervisor/hsm/compiler.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/riscv/supervisor/hsm/compiler.h b/arch/riscv/supervisor/hsm/compiler.h new file mode 100644 index 0000000..f86b0da --- /dev/null +++ b/arch/riscv/supervisor/hsm/compiler.h @@ -0,0 +1,12 @@ +#ifndef __COMPILER_H__ +#define __COMPILER_H__ + +typedef unsigned long uint64_t; +typedef unsigned long uintptr_t; +typedef unsigned long size_t; + +typedef struct { + unsigned int value; +} atomic_t; + +#endif // __COMPILER_H__ |
