It is not uncommon for BIOSes to report wrong RMRR entries in DMAR
table. Among them, some (old AMI ?) BIOSes report entries with range like (bf7ec000, bf7ebfff). Attempts to ignore the bogus entries result in faults, so the range must be covered somehow. Provide a workaround by identity mapping the 32 pages after the bogus entry start, which seems to be enough for the reported BIOS. Reported and tested by: Jason Harmening <jason.harmening@gmail.com> Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
f53199b05b
commit
f8f145010f
@ -182,6 +182,15 @@ ctx_init_rmrr(struct dmar_ctx *ctx, device_t dev)
|
||||
end = entry->end;
|
||||
entry->start = trunc_page(start);
|
||||
entry->end = round_page(end);
|
||||
if (entry->start == entry->end) {
|
||||
/* Workaround for some AMI (?) BIOSes */
|
||||
if (bootverbose) {
|
||||
device_printf(dev, "BIOS bug: dmar%d RMRR "
|
||||
"region (%jx, %jx) corrected\n",
|
||||
ctx->dmar->unit, start, end);
|
||||
}
|
||||
entry->end += DMAR_PAGE_SIZE * 0x20;
|
||||
}
|
||||
size = OFF_TO_IDX(entry->end - entry->start);
|
||||
ma = malloc(sizeof(vm_page_t) * size, M_TEMP, M_WAITOK);
|
||||
for (i = 0; i < size; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user