OpenBSD Journal

OpenBSD/amd64 kernel virtual address space is now 512GB

Contributed by Peter N. M. Hansteen on from the where-would-sir-like-his-640kB? dept.

We almost missed this in a flurry of commits by Jonathan gray (jsg@), but following this commit, OpenBSD/amd64 kernels now have a 512GB address space.

The commit message innocently reads,

List:       openbsd-cvs
Subject:    CVS: cvs.openbsd.org: src
From:       Jonathan Gray <jsg () cvs ! openbsd ! org>
Date:       2026-06-22 0:27:33
Message-ID: 162f075352ec66cd () cvs ! openbsd ! org

CVSROOT:	/cvs
Module name:	src
Changes by:	jsg@cvs.openbsd.org	2026/06/21 18:27:33

Modified files:
	sys/arch/amd64/include: vmparam.h 

Log message:
raise the size of amd64 kernel virtual address space from 4G to 512G
This allows mapping all of VRAM on recent Radeon cards where the
PCI BAR size is the full (> 4G) size.

Reported by Petre Rodan, who has a Radeon RX 6800 with 16G of VRAM.

feedback from claudio@ ok kettenis@

Comments
  1. By Noah Altun (naltun) noah@altun.cc on

    Good update to amd64 support. Great work devs!

  2. By Amit Kulkarni (amitkulz) on

    This commit is also important

    https://marc.info/?l=openbsd-cvs&m=178222561369914&w=2

    Allocate mbufs in high memory if only 64 bit DMA interfaces exist.
    Mbufs on amd64 were allocated below 4 GB so that devices not capable
    of 64 bit DMA can access the memory. Interface drivers use
    BUS_DMA_64BIT to allow the DMA layer doing 64 bit transfers. Now
    flag interfaces with IFXF_MBUF_64BIT that are capable of 64 bit DMA
    on all their mbuf rings.

    If only such interfaces exist in the system during amd64 boot,
    allocate mbufs and mbuf clusters also in high memory. Other
    architectures may be limited to 32 bit memory anyway or use an
    IOMMU. On riscv64 or arm64 busses may exists that support less
    than 64 bit, this will be handled later.

    Hotplug devices that do not support 64 bit DMA will use bounce
    buffering. By changing the flags in device drivers we can force
    bounce buffering and find missing calls to bus_dmamap_sync().

    OK kettenis@ deraadt@

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]