[LinuxBIOS] patch for making system run past disable_car

ron minnich rminnich at gmail.com
Thu Dec 13 06:11:14 CET 2007


On Dec 12, 2007 6:00 PM, Marc Jones <marc.jones at amd.com> wrote:

> There are a couple ways to address this.
> 1. copy the stack to a new location.
> 2. Set the tags dirty with by writing the way MSRs.
> 3. enable the cache and copy the stack back on it's self to dirty the tags.
>
> I am least sure about number three.

Here is one idea.

Copy the stack to "somewhere" in real memory, not "CAR memory".
Disable CAR. Enable the cache. Copy the stack  back.

in fact, we could define disable_car as follows:
void disable_car(void *savestack)
{
  memcpy(savestack, &savestack, 4096);  /* copy stack to "savestack"
in real memory */
  /* turn off car */
  /* enable cache */
  /* problem: how do we invd without losing savestack variable? */
  /* one option is to ALWAYS save the stack to page 0 */
  memcopy(&savestack, savestack, 4096);

Something like this might work. We're saving the stack to memory,
enabling cache, and copying it back. What do you think?

ron




More information about the coreboot mailing list