intel/broadwell,lynxpoint: Change formula around 4 GiB

Let's not rely on the type to get the correct result,
casting 0 to 0ull made the result wrong.

Change-Id: I6dfba3800170fdd4267e3bb74c55b05533c101fc
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65266
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Kyösti Mälkki 2022-06-19 18:08:31 +03:00
parent eae983161e
commit 37b161fb96
2 changed files with 2 additions and 2 deletions

View File

@ -470,7 +470,7 @@ static void pch_lpc_add_mmio_resources(struct device *dev)
*/ */
res = new_resource(dev, OIC); res = new_resource(dev, OIC);
res->base = default_decode_base; res->base = default_decode_base;
res->size = 0 - default_decode_base; res->size = 4ull * GiB - default_decode_base;
res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
/* RCBA */ /* RCBA */

View File

@ -624,7 +624,7 @@ static void pch_lpc_add_mmio_resources(struct device *dev)
*/ */
res = new_resource(dev, OIC); res = new_resource(dev, OIC);
res->base = default_decode_base; res->base = default_decode_base;
res->size = 0 - default_decode_base; res->size = 4ull * GiB - default_decode_base;
res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
/* RCBA */ /* RCBA */