[SeaBIOS] [PATCH v2 1/9] seabios: make mttr UC area setup dynamic

Gerd Hoffmann kraxel at redhat.com
Tue Oct 9 08:48:38 CEST 2012


On 10/09/12 05:35, Jason Baron wrote:
> From: Jason Baron <jbaron at redhat.com>
> 
> Set up the UC area of mtrr dynamically based on mtrr_base. This allows
> the bios to work for other chipsets that might want to set the mtrr.

Nice catch, didn't notice the mtrr thing when making the pci window dynamic.

> +u64 mtrr_base = BUILD_PCIMEM_START;
> +
>  u64 pcimem_start   = BUILD_PCIMEM_START;

Any reason you add a new variable instead of just using pcimem_start
directly?

I guess when pcimem_start is updated mtrr_base should be updated too.
And we probably should make sure pcimem_start has a value mtrr can
handle.  Which pretty much implies pcimem_start can be one of
0x80000000, 0xc0000000 or 0xe000000 depending on the amout of memory the
guest has if we want stick to a single mtrr register.

cheers,
  Gerd




More information about the SeaBIOS mailing list