Hi all,
I read the kernel sources today, looking for a way of doing native init for AMD boards like the F2A85-M.
My CPU has a Radeon HD 7660D built in; lspci says 00:01.0 VGA ... Trinity [Radeon HD 7660D]
drivers/gpu/drm/radeon/radeon_asic.c - int radeon_asic_init() handles Trinity like this: case CHIP_ARUBA: rdev->asic = &trinity_asic; /* set num crtcs */ rdev->num_crtc = 4; break;
trinity_asic.init = cayman_init(), which can be summarized as - radeon_get_bios() - radeon_atombios_init() - if (!radeon_card_posted()) atom_asic_init() - bring up device: r600_scratch_init(), radeon_surface_init(), radeon_get_clock_inf() - bring up memory: evergreen_mc_init(), radeon_bo_init(), r600_ring_init() - cayman_startup(): load ucode, ...
Once cayman_init() and radeon_asic_init() are done, control goes back to drivers/gpu/drm/radeon/radeon_kms.c - int radeon_driver_load_kms(), with: r = radeon_modeset_init(rdev); if (r) dev_err(&dev->pdev->dev, "Fatal error during modeset init\n");
/* Call ACPI methods: require modeset init * but failure is not fatal */ if (!r) { acpi_status = radeon_acpi_init(rdev); if (acpi_status) dev_dbg(&dev->pdev->dev, "Error during ACPI methods call\n"); }
My questions are:
1. How hard would it be to import the kernel code into coreboot directly?
The ACPI init at the end could be skipped for a first attempt.
It would be some work to find the kernel APIs used in the radeon code and produce suitable glue for coreboot.
Comments welcome on the insanity of this proposal :)
2. Do coreboot developers have contact with the radeon driver developers? A little nudge from time to time could keep a project like this on track.
3. It feels wrong to add so much code to coreboot. With 20/20 hindsight, this could be one of UEFI's downfalls, namely making the pre-boot environment into an entire kernel.
Is a modular approach better? A payload to modeset or some sort of driver model would be nice.
Regards, David