diff options
author | kib <kib@FreeBSD.org> | 2014-03-25 20:16:28 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-03-25 20:16:28 +0000 |
commit | 879dfba7f25caf8a813739f0795110c552d0bab3 (patch) | |
tree | 3e0366386bd1b57ec2cd210b866f12e11ec8b362 /sys/x86/iommu/intel_ctx.c | |
parent | 49c9412490d5dab8db56687a282948160d82e78a (diff) | |
download | FreeBSD-src-879dfba7f25caf8a813739f0795110c552d0bab3.zip FreeBSD-src-879dfba7f25caf8a813739f0795110c552d0bab3.tar.gz |
MFC r263305:
Provide a workaround by identity mapping the 32 pages after the bogus
entry start, which seems to be enough for the reported BIOS.
Diffstat (limited to 'sys/x86/iommu/intel_ctx.c')
-rw-r--r-- | sys/x86/iommu/intel_ctx.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c index fc5fe09..c5a77b9 100644 --- a/sys/x86/iommu/intel_ctx.c +++ b/sys/x86/iommu/intel_ctx.c @@ -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++) { |