AGP(4)
π agp(4) β the Kernel Interfaces Manual, bestie edition
okay so this is agp, aka the generic interface to the Accelerated Graphics Port (AGP), and I'm gonna walk you through it like we're texting at 2am π«Ά it's from the Kernel Interfaces Manual, and yes it's giving vintage.
β¨ NAME β¨
agp β generic interface to the Accelerated Graphics Port (AGP). that's it, that's the whole vibe. a little bridge between your system and your graphics card, lowkey iconic π
β¨ SYNOPSIS β¨
device agp
literally one line. she's effortless. β¨
π DEPRECATION NOTICE π
bestie, bad news π the agp driver is slated to be removed in FreeBSD 16.0. it's giving "senior year, already got the diploma, just coasting" β enjoy it while it lasts, but don't build your whole future on it. fr fr.
π DESCRIPTION π
so the agp driver provides uniform, abstract methods for controlling the following devices. and when I say following, I mean the whole roster, no cap π
- Ali:
M1541,M1621andM1671host to AGP bridges - AMD:
751,761and762host to AGP bridges - ATI:
RS100,RS200,RS250andRS300AGP bridges - Intel:
i820,i840,i845,i850, andi860host to AGP bridges - Intel:
i810,i810-DC100,i810E,i815,830M,845G,845M,852GM,852GME,855GM,855GME,865G,915Gand915GMSVGA controllers - Intel:
82443BX,82443GX,82443LX,82815,82820,82830,82840,82845,82845G,82850,82855,82855GM,82860,82865,82875P,E7205andE7505host to AGP bridges - NVIDIA:
nForceandnForce2AGP controllers - SiS:
530,540,550,620,630,645,645DX,648,650,651,655,661,730,735,740,741,745,746,760and5591host to AGP bridges - VIA:
3296,82C597,82C598,82C691,82C694X,82C8363,8235,8237,8361,8367,8371,8377,8501,8601,862x,8633,8653,8703,8753,8754,8763,8783,KT880,PM800,PM880,PN800,PN880,PT880,XM266andXN266host to PCI bridges
and like, the most common application of agp? it's for running X(7) (ports/x11/xorg-docs) on the Intel i81x controllers. that's the main character use case, iykyk π
π IOCTLS π
The following ioctl(2) operations can be performed on /dev/agpgart, which are defined in <sys/agpio.h>. buckle up bestie, there's a bunch π¦
β AGPIOC_INFO
Returns state of the agp system. The result is a pointer to the following structure:
typedef struct _agp_info {
agp_version version; /* version of the driver */
uint32_t bridge_id; /* bridge vendor/device */
uint32_t agp_mode; /* mode info of bridge */
off_t aper_base; /* base of aperture */
size_t aper_size; /* size of aperture */
size_t pg_total; /* max pages (swap + system) */
size_t pg_system; /* max pages (system) */
size_t pg_used; /* current pages used */
} agp_info;
like a little ID card for your AGP system. so organized π
β AGPIOC_ACQUIRE
Acquire control of the AGP chipset for use by this client. Returns EBUSY if the AGP chipset is already acquired by another client.
so if somebody else is holding it? EBUSY. it's occupied. take the hint π
β AGPIOC_RELEASE
Release control of the AGP chipset. This does not unbind or free any allocated memory β which is the responsibility of the client to handle if necessary.
not me telling you this is the "you're on your own" flag π the memory cleanup is your problem, bestie.
β AGPIOC_SETUP
Enable the AGP hardware with the relevant mode. This ioctl(2) takes the following structure:
typedef struct _agp_setup {
uint32_t agp_mode; /* mode info of bridge */
} agp_setup;
The mode bits are defined in <sys/agpio.h>. go off, mode bits π
β AGPIOC_ALLOCATE
Allocate physical memory suitable for mapping into the AGP aperture. This ioctl(2) takes the following structure:
typedef struct _agp_allocate {
int key; /* tag of allocation */
size_t pg_count; /* number of pages */
uint32_t type; /* 0 == normal, other devspec */
uint32_t physical; /* device specific (some devices
* need a phys address of the
* actual page behind the gatt
* table) */
} agp_allocate;
Returns a handle to the allocated memory. hold onto that handle like it's your iced coffee π
β AGPIOC_DEALLOCATE
Free the previously allocated memory associated with the handle passed. bye bye memory, you served π
β AGPIOC_BIND
Bind the allocated memory at given offset with the AGP aperture. Returns EINVAL if the memory is already bound or the offset is not at AGP page boundary. This ioctl(2) takes the following structure:
typedef struct _agp_bind {
int key; /* tag of allocation */
off_t pg_start; /* starting page to populate */
} agp_bind;
The tag of allocation is the handle returned by AGPIOC_ALLOCATE. yep, the same handle. keep track of it β¨
β AGPIOC_UNBIND
Unbind memory from the AGP aperture. Returns EINVAL if the memory is not bound. This ioctl(2) takes the following structure:
typedef struct _agp_unbind {
int key; /* tag of allocation */
uint32_t priority; /* priority for paging out */
} agp_unbind;
unbinding that memory, no drama, except EINVAL if there was nothing bound in the first place π¬
π¦ FILES π¦
/dev/agpgartβ AGP device node. that's the one, the special file, the portal πΈ
π SEE ALSO π
X(7)(ports/x11/xorg)
go read the docs, bestie, i believe in you π«Ά
π§ HISTORY π§
The agp driver first appeared in FreeBSD 4.1. a true elder, ancient and respected β¨π
okay that's the whole page, mwah π this was the AGP(4) manual on Debian, dated October 24, 2025. go forth and be so normal about AGP bridges. periodt. π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2001 Yar Tikhiy
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms