On Mon, Jul 20, 2009 at 8:14 AM, Rudolf Marek <[email protected]> wrote:

> Hi Myles,
>
>> That's the way the rest of the boards did it.  I'm sorry I missed this
>> southbridge.  I thought I got them all.
>>
>
> Ok. Please prepare the patch.

Attached.

Signed-off-by: Myles Watson <[email protected]>

I noticed in your patch that you're setting the limit = base+size-1.  The
>> limit is not the same as the end of the resource.  For most I/O, the limit
>> should be 0xffff.
>>
>
> aha true. This was cut and paste from k8t890 where it was used to setup
> APIC resource. For mem resource it should be how? I don't understand the
> gran too.

The limit should always be the upper bound that a type of resource could be
set to.  For I/O 0xffff, for MEM, 0xffffffff...

gran sets the granularity of an allocation.  For example, on K8 you have to
allocate I/O to links at least 4K at a time, so the granularity is 12.  gran
and align should never matter for fixed resources.


> For this SB (the VT8237S) we will definitely need to dynamically allocate a
> mmio BAR for SPI controller. I will prepare a patch, but cannot test.
>
> I would like to ask if you care about the decoding range for flashes - if I
> need some other resource for that and also about 0xfee... for MSI.


Anything above 0xfec... doesn't matter, since you have an APIC resource
there.

Thanks,
Myles
Index: svn/src/southbridge/via/vt8237r/vt8237r_lpc.c
===================================================================
--- svn.orig/src/southbridge/via/vt8237r/vt8237r_lpc.c
+++ svn/src/southbridge/via/vt8237r/vt8237r_lpc.c
@@ -426,11 +426,15 @@ static void vt8237r_read_resources(devic
 	res = new_resource(dev, 0x44);
 	res->base = VT8237R_APIC_BASE;
 	res->size = 256;
-	res->limit = res->base + res->size - 1;
-	res->align = 8;
-	res->gran = 8;
+	res->limit = 0xffffffffUL;
 	res->flags = IORESOURCE_MEM | IORESOURCE_FIXED |
 		     IORESOURCE_STORED | IORESOURCE_ASSIGNED;
+
+	res = new_resource(dev, 1);
+	res->base = 0x0UL;
+	res->size = 0x1000UL;
+	res->limit = 0xffffUL;
+	res->flags = IORESOURCE_IO | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
 }
 
 /**
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to