diff options
author | 2018-07-30 09:04:52 +0000 | |
---|---|---|
committer | 2018-07-30 09:04:52 +0000 | |
commit | 3083b0fdfe2880bac7e072adba703740d3494143 (patch) | |
tree | 532f8a3564b393a2dcc68191da1014afac55bfa3 | |
parent | update to nsd 4.1.23, from the release notes: (diff) | |
download | wireguard-openbsd-3083b0fdfe2880bac7e072adba703740d3494143.tar.xz wireguard-openbsd-3083b0fdfe2880bac7e072adba703740d3494143.zip |
When converting the bios memory map to memory clusters, clip segments at
the 512GB mark as the direct map cannot address memory past that point.
ok kettenis@ (quite a while ago)
-rw-r--r-- | sys/arch/amd64/amd64/machdep.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 05c91e3def1..29f4448a220 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.249 2018/07/27 21:11:31 kettenis Exp $ */ +/* $OpenBSD: machdep.c,v 1.250 2018/07/30 09:04:52 jmatthew Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -1485,6 +1485,16 @@ init_x86_64(paddr_t first_avail) continue; } + /* + * The direct map is limited to 512GB of memory, so + * discard anything above that. + */ + if (e1 >= (uint64_t)512*1024*1024*1024) { + e1 = (uint64_t)512*1024*1024*1024; + if (s1 > e1) + continue; + } + /* Crop stuff into "640K hole" */ if (s1 < IOM_BEGIN && e1 > IOM_BEGIN) e1 = IOM_BEGIN; |