Skip to content
Snippets Groups Projects
Commit 6d31d460 authored by Matthew Fernandez's avatar Matthew Fernandez
Browse files

trivial: Standardise on 32-bit unsigned variables for domain values.

Domains are unnecessarily treated explicitly as 8-bit values within boot info.
Though there are existing proof constraints that limit the maximum domain value
to 8 bits, most of the code would permit domain values up to 32 bits. The
maximum value is unnecessarily constrained in boot info, a restriction which
this commit removes.

Closes VER-341
parent edf2d46b
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,7 @@ typedef struct bi {
uint8_t it_cnode_size_bits; /* initial thread's root CNode size (2^n slots) */
uint32_t num_dev_regs; /* number of device regions */
bi_dev_reg_t dev_reg_list[CONFIG_MAX_NUM_BOOTINFO_DEVICE_REGIONS]; /* device regions */
uint8_t it_domain; /* initial thread's domain ID */
dom_t it_domain; /* initial thread's domain ID */
} bi_t;
/* adjust constants in config.h if this assert fails */
......
......@@ -60,7 +60,7 @@ typedef struct {
uint8_t initThreadCNodeSizeBits; /* initial thread's root CNode size (2^n slots) */
seL4_Word numDeviceRegions; /* number of device regions */
seL4_DeviceRegion deviceRegions[CONFIG_MAX_NUM_BOOTINFO_DEVICE_REGIONS]; /* device regions */
uint8_t initThreadDomain; /* Initial thread's domain ID */
uint32_t initThreadDomain; /* Initial thread's domain ID */
} seL4_BootInfo;
/* function declarations */
......
......@@ -265,7 +265,7 @@ allocate_bi_frame(
BI_PTR(pptr)->num_iopt_levels = 0;
BI_PTR(pptr)->ipcbuf_vptr = ipcbuf_vptr;
BI_PTR(pptr)->it_cnode_size_bits = CONFIG_ROOT_CNODE_SIZE_BITS;
BI_PTR(pptr)->it_domain = (uint8_t)ksDomSchedule[ksDomScheduleIdx].domain;
BI_PTR(pptr)->it_domain = ksDomSchedule[ksDomScheduleIdx].domain;
return pptr;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment