(C) 2021 - 2026, Eric Voirin (oerg866)
K6INIT is a driver for MS-DOS that lets you configure special features of AMD K5/K6/K6-2/2+/3/3+ processors, replacing tools like k6dos.sys and setk6.exe, and is similar to FASTVID on Pentium systems.
While K6INIT can run completely autonomously, it supports manual, detailed control over Memory Type Range Registers (including Write-Combine and Cachability modes), Write Allocate, Write Ordering, CPU Cache and Frequency Multiplier.
In contrast to other tools, K6INIT can be loaded from CONFIG.SYS, so it works
even with an extended memory manager (such as EMM386) installed.
If called with the /auto parameter, K6INIT does the following:
- Write Allocate for all system memory (auto detected)
- Write Ordering mode to 1 (All except UC/WC) (K6-2 and higher)
- Write Combining for Linear Frame Buffer(s) exposed by VESA BIOS or prefetchable memory regions from PCI/AGP graphics cards directly (auto detected) (K6-2 (CXT) and higher)
- L1 Cache to Enabled
- L2 Cache to Enabled (K6-2+/K6-III/K6-III+ only)
- Data Prefetch to Enabled (K6-2 and higher)
This can be altered and overridden with many command line parameters.
K6INIT runs on AMD K5 chips or later, but K5, K6 and K6-2 (pre-CXT) only have basic functionality. More in-depth configuration options are available with K6-2 (CXT) and later.
FBTWEAK is a decoupling of the K6INIT chipset tweaks module into a separate program to allow the user to perform chipset-specific frame buffer acceleration tweaks on Socket 5 / 7 systems without a K6 series CPU.
For more information, check the FBTWEAK documentation.
-
Detect CPU type automatically
-
Detect total available system memory (Using E820 and E801 methods)
-
Detect 15-16M Memory hole automatically
-
Give precise control over Memory Type Range Registers (MTRRs) including Write-Combine and Uncacheable modes. (K6-2 (CXT) and higher)
-
Set MTRR to enable Write combining for PCI/AGP BAR Frame Buffers automatically (K6-2 (CXT) and higher)
-
Set MTRR to enable Write combining for Linear Frame Buffers (LFBs) automatically (requires graphics card with VESA BIOS extensions) (K6-2 (CXT) and higher)
-
Enable chipset-internal Frame Buffer write cycle acceleration (EXPERIMENTAL!!!!)
Supported chipsets:
- ALi Aladdin III, IV, V
- SiS 5571, 5581, 5591, 5597
- SiS 530, 540
-
Set Write allocate for system memory
-
Set Write Order mode (K6-2 and higher)
-
Set Frequency Multiplier (K6-2+/III+ only)
-
Enable/Disable L1 Cache
-
Enable/Disable L2 Cache (K6-2+/K6-III/K6-III+ only)
-
Enable/Disable Data Prefetch (K6-2 and higher)
-
List all PCI/AGP device Base Address Regions (BARs)
| CPU Type | Family | Model | Stepping |
|---|---|---|---|
| AMD K5 w/ Write Allocate | 5 | 0..3 | 4..F |
| AMD K6 | 5 | 6 / 7 | Any |
| AMD K6-2 | 5 | 8 | 0..7 |
| AMD K6-2 (CXT Core) | 5 | 8 | 8..F |
| AMD K6-III | 5 | 9 | Any |
| AMD K6-2+ / AMD K6-III+ | 5 | D | Any |
- Supported AMD K5/6 family CPU (see above)
- Microsoft MS-DOS 5.0 (or compatible) or higher
- Microsoft Windows 95/98 support
- FreeDOS support
- IBM PC DOS 7.x/2000 support
- Other systems such as DR-DOS untested, but should work, your mileage may wary when loading it from CONFIG.SYS though.
Usage (config.sys):
DEVICE=K6INIT.EXE <parameters>
Usage (command line):
K6INIT.EXE <parameters>
All parameters are case-inensitive. Parameters other than /auto should only be used by knowledgeable users.
K6INIT offers several command-line options to configure and manage memory settings, CPU features, and other system parameters. Below is a detailed explanation of each parameter.
Description: Prints this list of parameters.
Description: Displays the current program status.
Description: Reduce text output, only print warnings/errors
Description: Fully automated setup. It is equivalent to /pci /lfb /wa:0 /wo:1 /l1:1 /l2:1 /prefetch:1
Parts of this procedure can be disabled with the following /skip parameters.
Description: Skip PCI/AGP Frame Buffer Detection & MTRR Setup
Description: Skip VESA Linear Frame Buffer Detection & MTRR Setup
Description: Skip CPU internals setup (Cache, Prefetch)
Description: Skip Write Allocate / Order setup
Description: Use PCI/AGP FBs that are not marked prefetchable
Usually framebuffers in PCI/AGP devices are marked 'prefetchable'. By default, BARs that do not, are ignored.
Use this parameter to force their usage.
Description: Apply chipset-specific tweaks
WARNING: Highly experimental feature!
Some chipsets support acceleration of frame buffer write cycles, which K6INIT can leverage. See above for supported chipsets.
Description: Enables Write Combining for a specific memory range. Parameters:
offset: Linear offset (e.g.,0xE0000000)size: Length in kilobytes (e.g.,8192)wc: Write-combine flag (1to enable,0to disable)uc: Uncacheable flag (1to enable,0to disable)
Notes:
- The
/mtrroption can be used twice. - Discards any MTRRs configured before running the program.
Description: Disables Memory Type Range Registers (MTRRs) entirely.
Notes:
- Clears any existing MTRRs, including Write-Combined and Uncacheable regions.
Description: Automatically finds and enables Write Combining for the Linear Frame Buffers (LFB).
Description: Automatically finds and enables Write Combining for Frame Buffers exposed by PCI / AGP graphics cards (experimental).
Description: Enables Write Combining for the VGA memory region (A0000-BFFFF).
Notes:
- Warning: This option is potentially unsafe. Do not use this memory region for Upper Memory Blocks (UMBs).
- Equivalent to:
/wc:0xA0000,128,1,0
Description: Configures Write Allocate (WA) settings.
Arguments:
size: Memory size in kilobytes.
Notes:
- Set this to
0to disable Write Allocate.
Description: Forces 15-16 MB memory hole skipping for Write Allocate
Notes:
- K6INIT usually detects the memory hole by itself, but this option can be used to force it on or off.
Description: Configures the Write Order Mode.
Arguments:
mode: A single digit representing the desired mode.0: All memory regions (Slow)1: All except uncacheable or write-combined regions (Fast)2: No memory regions (Fastest)
Description: Configures the CPU frequency multiplier.
Arguments:
x: Integral part of the multiplier.y: Fractional part of the multiplier.
Notes:
- Requires a K6-2+ or K6-III+ CPU.
- Example usage:
/multi:5.5
Description: Enables (1) or disables (0) the Level 1 cache.
Description: Enables (1) or disables (0) the Level 2 cache.
Notes:
- Only K6-2+ and K6-III+ CPUs have an on-die L2 cache.
Description: Enables (1) or disables (0) Data Prefetching (DPE)
Description: Lists all Base Address Regions (BARs) exposed by PCI/AGP devices in the system.
Building requires Microsoft C/C++ 7.00 or 8.00 (from MSVC 1.52). The latter allows building on modern windows systems, as the toolchain uses very early 32-Bit executables.
The MSC_Libs folder must be copied on top of that installation. It contains the late Geoff Chappell's libraries for writing device drivers in C, from his book "DOS Internals" - plus a fix for IBM PC DOS 7.xx.
cd <somewhere>\k6init
nmake
To make a build with a lot of verbose debug output, build it with DEBUG=1:
nmake DEBUG=1
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 (CC BY-NC-SA 4.0)
K6INIT was built using the LIB866D DOS Real-Mode Software Development Library



