<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Am 22.12.2009 23:17, schrieb Myles Watson:<br>
<blockquote
 cite="mid:2831fecf0912221417p34f52068oa14b8a8265ae80ed@mail.gmail.com"
 type="cite">
  <div class="gmail_quote">On Tue, Dec 22, 2009 at 2:27 PM, Patrick
Georgi <span dir="ltr"><<a moz-do-not-send="true"
 href="mailto:patrick@georgi-clan.de">patrick@georgi-clan.de</a>></span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
- Provide a framework to build image selection logic<br>
In newconfig, most boards have their own code to select the image. The<br>
goal in this layout is to have generic decision routines to take care of<br>
that, and encourage their use.<br>
  </blockquote>
  <div>Is it possible to have it be generic?  Won't we have to unify
CMOS layouts for that to happen?<br>
  </div>
  </div>
</blockquote>
In a way, it's just the do_normal_boot() code in
src/pc80/mc146818rtc_early.c.<br>
We already have everything in the tree to make it all generic, but we
didn't properly use it. Maybe because the generic code came after the
copied versions and no-one dared to refactor things.<br>
<br>
It's not simply a port because of the intrusive change of moving CAR
out of the bootblock, and this time, the generic code will be around
from the start, so it has a chance to be used.<br>
<blockquote
 cite="mid:2831fecf0912221417p34f52068oa14b8a8265ae80ed@mail.gmail.com"
 type="cite">
  <div class="gmail_quote">
  <div>I think it would be a mistake to bring romcc to targets that
don't need it now.<br>
  </div>
  </div>
</blockquote>
The alternative at that point is to do that code in assembly, or to
move CAR to the bootblock again.<br>
romcc works quite fine for small code, and the code in the bootblock is
supposed to be small.<br>
<br>
<blockquote
 cite="mid:2831fecf0912221417p34f52068oa14b8a8265ae80ed@mail.gmail.com"
 type="cite">
  <div class="gmail_quote">
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">-
Look up fallback/romstage in CBFS (this can be extended with selection<br>
logic if desired) ("selection logic" is C, compiled with romcc, lookup<br>
is assembly)<br>
  </blockquote>
  <div>It's more important to me to avoid assembly than to have the
absolute minimum size bootblock.  Especially for K8 & Fam10,
there's plenty of space to not have to do this.<br>
  </div>
  </div>
</blockquote>
Among the reasons: The way it is done now, it's always exactly one copy
of the tree walker. If it's written in C and compiled with romcc, it
could end up several times in the bootblock, if there are various calls
(fallback, normal, ...), probably giving the register allocator a
harder time.<br>
<br>
<blockquote
 cite="mid:2831fecf0912221417p34f52068oa14b8a8265ae80ed@mail.gmail.com"
 type="cite">
  <div class="gmail_quote">
  <div>Picky detail:<br>
Since CONFIG_TINY_BOOTBLOCK is referenced in a Makefile that isn't
board specific, the Kconfig entry for it should go there too (with a
default n).  There should just be a "select" in qemu-x86/Kconfig<br>
  </div>
  </div>
</blockquote>
Fixed, thanks for the reminder. I wanted to keep things minimal and
forgot about it. It's not a big issue, as in Makefiles, missing
variables simply expand to the empty string, but it's cleaner the way
you proposed.<br>
<br>
<blockquote
 cite="mid:2831fecf0912221417p34f52068oa14b8a8265ae80ed@mail.gmail.com"
 type="cite">
  <div class="gmail_quote">
  <div>Acked-by: Myles Watson <<a moz-do-not-send="true"
 href="mailto:mylesgw@gmail.com">mylesgw@gmail.com</a>> <br>
  </div>
  </div>
</blockquote>
Thanks, r4989<br>
</body>
</html>