AGP(4)
π agp β the whole vibe π
okay bestie, welcome to the agp manual page, section 4 of the Kernel Interfaces Manual, and no I will not be normal about it. this is the generic interface to the Accelerated Graphics Port (AGP). yes. AGP. the slot your graphics card used to live in before PCIe made everyone forget. iconic behavior, honestly. π
β¨ NAME β¨
agp β generic interface to the Accelerated Graphics Port (AGP). that's it. that's the name. short, sweet, ate. π
πΈ SYNOPSIS πΈ
device agp
just one line. put it in your kernel config and the whole thing wakes up. slay.
π¦ DESCRIPTION π¦
okay so here's the tea: the agp driver gives you uniform, abstract methods for controlling a whole squad of devices. and when I say squad, I mean squad. here's everybody invited to the party:
- 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
the most common application of agp is for running X(7) on the Intel i81x controllers. that's the one everybody actually shows up for. π
π IOCTLS π
so the following ioctl(2) operations can be performed on /dev/agpgart, and they're defined in <sys/agpio.h>. buckle up, there's a struct for basically each one. π
AGPIOC_INFOβ Returns state of theagpsystem. 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;
AGPIOC_ACQUIREβ Acquire control of the AGP chipset for use by this client. ReturnsEBUSYif the AGP chipset is already acquired by another client. like, someone else is already holding the aux cord, bestie. π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. heads up: releasing β cleaning up. that's on you. πAGPIOC_SETUPβ Enable the AGP hardware with the relevant mode. Thisioctl(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>.
AGPIOC_ALLOCATEβ Allocate physical memory suitable for mapping into the AGP aperture. Thisioctl(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. that handle is your receipt, keep it safe. π§
AGPIOC_DEALLOCATEβ Free the previously allocated memory associated with the handle passed.AGPIOC_BINDβ Bind the allocated memory at given offset with the AGP aperture. ReturnsEINVALif the memory is already bound or the offset is not at AGP page boundary. Thisioctl(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.
AGPIOC_UNBINDβ Unbind memory from the AGP aperture. ReturnsEINVALif the memory is not bound. Thisioctl(2)takes the following structure:
typedef struct _agp_unbind {
int key; /* tag of allocation */
uint32_t priority; /* priority for paging out */
} agp_unbind;
π FILES π
/dev/agpgartβ AGP device node. the main character of this entire page, lowkey. β¨
π SEE ALSO π
X(7)(ports/x11/xorg)
go read that one next, bestie, it's the whole reason any of this matters. π«Ά
β HISTORY β
The agp driver first appeared in FreeBSD 4.1. a legend was born. π«
and that's the page!! this one came from the good people at Debian, dated November 28, 2007 β so yeah, vintage. antique, even. but we still stan. bye bestie, go forth and ioctl responsibly πβ¨π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2001 Yar Tikhiy
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms