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