Re: [coreboot] [v2] r4238 - in trunk/coreboot-v2/src/northbridge: amd/amdfam10 amd/gx1 amd/gx2 amd/lx intel/e7501 intel/e7520 intel/e7525 intel/i3100 intel/i440bx intel/i82810 intel/i82830 intel/i855gme intel/i855pm via/cn700 via/cx700 via/vt8601 via/vt8623
On Thu, Apr 30, 2009 at 03:58:42PM +0200, svn@coreboot.org wrote:
Author: stepan Date: 2009-04-30 15:58:42 +0200 (Thu, 30 Apr 2009) New Revision: 4238 [...] Modified: trunk/coreboot-v2/src/northbridge/via/cn700/northbridge.c =================================================================== --- trunk/coreboot-v2/src/northbridge/via/cn700/northbridge.c 2009-04-30 12:53:00 UTC (rev 4237) +++ trunk/coreboot-v2/src/northbridge/via/cn700/northbridge.c 2009-04-30 13:58:42 UTC (rev 4238) @@ -163,6 +163,12 @@ return tolm; }
+#if HAVE_HIGH_TABLES==1 +/* maximum size of high tables in KB */ +#define HIGH_TABLES_SIZE 64 +extern uint64_t high_tables_base, high_tables_size; +#endif + static void pci_domain_set_resources(device_t dev) { /* The order is important to find the correct RAM size. */ @@ -199,6 +205,13 @@ /* The PCI hole does does not overlap the memory. */ tolmk = tomk; } + +#if HAVE_HIGH_TABLES == 1 + high_tables_base = (tolmk - HIGH_TABLES_SIZE) * 1024; + high_tables_size = HIGH_TABLES_SIZE* 1024; + printk_debug("tom: %lx, high_tables_base: %llx, high_tables_size: %llx\n", tomk*1024, high_tables_base, high_tables_size); +#endif +
The above is not correct. It places the high tables over the vga memory. -Kevin
Am 16.05.2009 04:01, schrieb Kevin O'Connor:
+ +#if HAVE_HIGH_TABLES == 1 + high_tables_base = (tolmk - HIGH_TABLES_SIZE) * 1024; + high_tables_size = HIGH_TABLES_SIZE* 1024; + printk_debug("tom: %lx, high_tables_base: %llx, high_tables_size: %llx\n", tomk*1024, high_tables_base, high_tables_size); +#endif +
The above is not correct. It places the high tables over the vga memory. Shouldn't VGA memory be excluded from tolmk, too?
Patrick
On Sat, May 16, 2009 at 08:34:12AM +0200, Patrick Georgi wrote:
Am 16.05.2009 04:01, schrieb Kevin O'Connor:
+ +#if HAVE_HIGH_TABLES == 1 + high_tables_base = (tolmk - HIGH_TABLES_SIZE) * 1024; + high_tables_size = HIGH_TABLES_SIZE* 1024; + printk_debug("tom: %lx, high_tables_base: %llx, high_tables_size: %llx\n", tomk*1024, high_tables_base, high_tables_size); +#endif +
The above is not correct. It places the high tables over the vga memory. Shouldn't VGA memory be excluded from tolmk, too?
IT should already have been excluded from there. On the cle266 (vt8263), it is counted off right before this blob. This makes me wonder... why is this HIGH_TABLES stuff done in the ram controller code and not general? Is this just a transitional phase and will this be done generally? Luc Verhaegen.
Am 16.05.2009 13:06, schrieb Luc Verhaegen:
This makes me wonder... why is this HIGH_TABLES stuff done in the ram controller code and not general? Is this just a transitional phase and will this be done generally? It's a matter of finding the right location. That location must have access to tolmk and high_tables_base, at a time between the last modification of tolmk and the first use of high_tables_base.
The northbridge code is already an improvement to before, where it was in the mainboard code. I _think_, tolmk is only available in the northbridge (and mainboard code called from there), so this code moved there instead of some truly generic place. I'm very open to a more generic solution. Patrick
On Sat, May 16, 2009 at 02:07:34PM +0200, Patrick Georgi wrote:
The northbridge code is already an improvement to before, where it was in the mainboard code. I _think_, tolmk is only available in the northbridge (and mainboard code called from there), so this code moved there instead of some truly generic place.
I'm very open to a more generic solution.
In the same file, right below the HIGH_TABLES stuff is: /* TODO: Hole needed? */ ram_resource(dev, idx++, 0, 640); /* First 640k */ /* Leave a hole for VGA, 0xa0000 - 0xc0000 */ ram_resource(dev, idx++, 768, (tolmk - 768 - CONFIG_VIDEO_MB * 1024)); The high table stuff should just read through the "ram_resource" data structures. (It should find the highest 64KiB of ram that is less than 4GiB.) This can be done without any chipset or mainboard specific code. -Kevin
On Sat, 16 May 2009 08:34:12 +0200, Patrick Georgi <patrick@georgi-clan.de> wrote:
Am 16.05.2009 04:01, schrieb Kevin O'Connor:
+ +#if HAVE_HIGH_TABLES == 1 + high_tables_base = (tolmk - HIGH_TABLES_SIZE) * 1024; + high_tables_size = HIGH_TABLES_SIZE* 1024; + printk_debug("tom: %lx, high_tables_base: %llx, high_tables_size: %llx\n", tomk*1024, high_tables_base, high_tables_size); +#endif +
The above is not correct. It places the high tables over the vga memory. Shouldn't VGA memory be excluded from tolmk, too?
Yes, this HAS to be done before anything else, and then if you have SMM enabled you have to allocate TSEG space just under VGA memory. Otherwise I think the the High Tables can go any where under that. -- Thanks, Joseph Smith Set-Top-Linux www.settoplinux.org
participants (4)
-
Joseph Smith -
Kevin O'Connor -
Luc Verhaegen -
Patrick Georgi