Skip to content

Commit

Permalink
simple: Define SIMPLE_SKIPPED_INIT_CAPS better
Browse files Browse the repository at this point in the history
Make sure this macro is defined based on all possible configurations.

Signed-off-by: Robbie VanVossen <robert.vanvossen@dornerworks.com>
  • Loading branch information
Furao committed Aug 10, 2023
1 parent 310eace commit 94252d2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
8 changes: 7 additions & 1 deletion libsel4simple/arch_include/arm/simple/arch/simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@

/* Simple does not address initial null caps, including seL4_CapNull.
* seL4_CapIOSpace, seL4_CapIOPortControl are null on architectures other than x86 */
#define SIMPLE_SKIPPED_INIT_CAPS 3
#ifdef CONFIG_KERNEL_MCS
#define SKIP_THREADSC 0
#else
#define SKIP_THREADSC 1
#endif

#define SIMPLE_SKIPPED_INIT_CAPS (3 + SKIP_THREADSC)

/* Request a cap to a specific IRQ number on the system
*
Expand Down
12 changes: 10 additions & 2 deletions libsel4simple/arch_include/x86/simple/arch/simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,20 @@

/* Simple does not address initial null caps, including seL4_CapNull */
#ifdef CONFIG_IOMMU
#define SIMPLE_SKIPPED_INIT_CAPS 1
#define SKIP_IOSPACE 0
#else
/* seL4_CapIOSpace is null if IOMMU isn't supported */
#define SIMPLE_SKIPPED_INIT_CAPS 2
#define SKIP_IOSPACE 1
#endif

#ifdef CONFIG_KERNEL_MCS
#define SKIP_THREADSC 0
#else
#define SKIP_THREADSC 1
#endif

#define SIMPLE_SKIPPED_INIT_CAPS (1 + SKIP_IOSPACE + SKIP_THREADSC)

/**
* Request a cap to the IOPorts
*
Expand Down

0 comments on commit 94252d2

Please sign in to comment.