Skip to content
Hacker-friendly radeon.ko module
C C++ Objective-C Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
reg_srcs
.gitignore
Kconfig
Makefile
ObjectID.h
README.md
atom-bits.h
atom-names.h
atom-types.h
atom.c
atom.h
atombios.h
atombios_crtc.c
atombios_dp.c
atombios_encoders.c
atombios_i2c.c
avivod.h
btc_dpm.c
btc_dpm.h
btcd.h
cayman_blit_shaders.c
cayman_blit_shaders.h
ci_dpm.c
ci_dpm.h
ci_smc.c
cik.c
cik_blit_shaders.c
cik_blit_shaders.h
cik_reg.h
cik_sdma.c
cikd.h
clearstate_cayman.h
clearstate_ci.h
clearstate_defs.h
clearstate_evergreen.h
clearstate_si.h
cypress_dpm.c
cypress_dpm.h
dce3_1_afmt.c
dce6_afmt.c
evergreen.c
evergreen_blit_shaders.c
evergreen_blit_shaders.h
evergreen_cs.c
evergreen_dma.c
evergreen_hdmi.c
evergreen_reg.h
evergreen_smc.h
evergreend.h
kv_dpm.c
kv_dpm.h
kv_smc.c
mkregtable.c
ni.c
ni_dma.c
ni_dpm.c
ni_dpm.h
ni_reg.h
nid.h
nislands_smc.h
ppsmc.h
pptable.h
r100.c
r100_track.h
r100d.h
r200.c
r300.c
r300_cmdbuf.c
r300_reg.h
r300d.h
r420.c
r420d.h
r500_reg.h
r520.c
r520d.h
r600.c
r600_audio.c
r600_blit.c
r600_blit_shaders.c
r600_blit_shaders.h
r600_cp.c
r600_cs.c
r600_dma.c
r600_dpm.c
r600_dpm.h
r600_hdmi.c
r600_reg.h
r600d.h
radeon.h
radeon.mod.c
radeon_acpi.c
radeon_acpi.h
radeon_agp.c
radeon_asic.c
radeon_asic.h
radeon_atombios.c
radeon_atpx_handler.c
radeon_benchmark.c
radeon_bios.c
radeon_clocks.c
radeon_combios.c
radeon_connectors.c
radeon_cp.c
radeon_cs.c
radeon_cursor.c
radeon_device.c
radeon_display.c
radeon_drv.c
radeon_drv.h
radeon_encoders.c
radeon_family.h
radeon_fb.c
radeon_fence.c
radeon_gart.c
radeon_gem.c
radeon_i2c.c
radeon_ib.c
radeon_ioc32.c
radeon_irq.c
radeon_irq_kms.c
radeon_kms.c
radeon_legacy_crtc.c
radeon_legacy_encoders.c
radeon_legacy_tv.c
radeon_mem.c
radeon_mode.h
radeon_object.c
radeon_object.h
radeon_pm.c
radeon_prime.c
radeon_reg.h
radeon_ring.c
radeon_sa.c
radeon_semaphore.c
radeon_state.c
radeon_test.c
radeon_trace.h
radeon_trace_points.c
radeon_ttm.c
radeon_ucode.c
radeon_ucode.h
radeon_uvd.c
radeon_vce.c
radeon_vm.c
rs100d.h
rs400.c
rs400d.h
rs600.c
rs600d.h
rs690.c
rs690d.h
rs780_dpm.c
rs780_dpm.h
rs780d.h
rv200d.h
rv250d.h
rv350d.h
rv515.c
rv515d.h
rv6xx_dpm.c
rv6xx_dpm.h
rv6xxd.h
rv730_dpm.c
rv730d.h
rv740_dpm.c
rv740d.h
rv770.c
rv770_dma.c
rv770_dpm.c
rv770_dpm.h
rv770_smc.c
rv770_smc.h
rv770d.h
si.c
si_blit_shaders.c
si_blit_shaders.h
si_dma.c
si_dpm.c
si_dpm.h
si_reg.h
si_smc.c
sid.h
sislands_smc.h
smu7.h
smu7_discrete.h
smu7_fusion.h
sumo_dpm.c
sumo_dpm.h
sumo_smc.c
sumod.h
trinity_dpm.c
trinity_dpm.h
trinity_smc.c
trinityd.h
uvd_v1_0.c
uvd_v2_2.c
uvd_v3_1.c
uvd_v4_2.c
vce_v1_0.c
vce_v2_0.c

README.md

README

What is this?

This is the linux 'radeon', hacked to permit fine-grained reverse-engineering of the ATOMBIOS on which this driver so carelessly depends. It contains a number of non-upstreamable hacks, from IO tracing of atom table execution, to re-implementations of atom tables which could be upstreamed in the future.

It is based on the 3.17 kernel release, but could be rebased on newer versions in the future.

Quick and dirty HOWTO

Find an atombios that you'd like to RE. Decide if you want iotracing only on certain parameters. Enable iotracing before calling the table, then disable it once the table returns. iotracing is controlled by the global 'atombios_iotrace' variable.

extern int atombios_iotrace;

...

if (condition)
	atombios_iotrace = 1;
atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
atombios_iotrace = 0;

Build and install the hacked module (see below). Unload old radeon module, then

modprobe radeon

This may require a system reboot, as unbinding the GPU device from the driver will severely confuse the system and hardware.

Build

One way is to create a makefile which points to the radeon sources. Then, commands like 'make modules' and 'make install' will work as expected.

KDIR  := /lib/modules/$(shell uname -r)/build
SRC   := /path/to/radeon

all: modules

modules:
	$(MAKE) -C $(KDIR) -r M=$(SRC) modules

clean:
	$(MAKE) -C $(KDIR) -r M=$(SRC) clean

install:
        $(MAKE) -C $(KDIR) -r M=$(SRC) modules_install

Another way is to cd to the radeon sources and use the following commands:

make -C /lib/modules/`uname -r`/build M=`pwd` clean
make -C /lib/modules/`uname -r`/build M=`pwd` modules
make -C /lib/modules/`uname -r`/build M=`pwd` modules_install

External resources

You can’t perform that action at this time.