nova: avoid unaligned warnings by gcc10

Issue #4126
This commit is contained in:
Alexander Boettcher 2021-05-05 23:02:07 +02:00 committed by Christian Helmuth
parent a5385cebf4
commit b6bdd91cfa

View File

@ -592,10 +592,11 @@ namespace Nova {
} gdtr, idtr;
unsigned long long tsc_val, tsc_off;
} __attribute__((packed));
mword_t mr[(4096 - 4 * sizeof(mword_t)) / sizeof(mword_t)];
};
/* message payload */
mword_t * msg() { return reinterpret_cast<mword_t *>(&mtd); }
mword_t * msg() { return mr; }
struct Item {
mword_t crd;
@ -747,7 +748,9 @@ namespace Nova {
}
mword_t mtd_value() const { return static_cast<Mtd>(mtd).value(); }
} __attribute__((packed));
};
static_assert(sizeof(Utcb) == 4096, "Unexpected size of UTCB");
/**
* Size of event-specific portal window mapped at PD creation time