From 6665da81ef289e9ba478e93b6c41928fa19f7d28 Mon Sep 17 00:00:00 2001 From: Frans Hendriks Date: Thu, 25 Apr 2019 11:17:05 +0200 Subject: soc/intel/braswell/acpi/lpc.asl: Allocate used ROM size only Fixed ROM area is allocated. Reduce the ROM size using CONFIG_COREBOOT_ROMSIZE. BUG=N/A TEST=Facebook FBG-1701 booting Embedded Linux Change-Id: I7a47bf2600f546271c5a65641d29f868ff2748bf Signed-off-by: Frans Hendriks Reviewed-on: https://review.coreboot.org/c/coreboot/+/31822 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/soc/intel/braswell/acpi/lpc.asl | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/soc/intel/braswell/acpi') diff --git a/src/soc/intel/braswell/acpi/lpc.asl b/src/soc/intel/braswell/acpi/lpc.asl index 6b2ececc40..9caa8f17eb 100644 --- a/src/soc/intel/braswell/acpi/lpc.asl +++ b/src/soc/intel/braswell/acpi/lpc.asl @@ -3,7 +3,7 @@ * * Copyright (C) 2007-2009 coresystems GmbH * Copyright (C) 2013 Google Inc. - * Copyright (C) 2018 Eltan B.V. + * Copyright (C) 2018-2019 Eltan B.V. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -42,10 +42,20 @@ Device (LPCB) Device (FWH) /* Firmware Hub */ { Name (_HID, EISAID("INT0800")) - Name (_CRS, ResourceTemplate() + Name (RBUF, ResourceTemplate() { - Memory32Fixed(ReadOnly, 0xff000000, 0x01000000) + Memory32Fixed(ReadOnly, 0, 0, FBAR) }) + + Method (_CRS) + { + CreateDwordField (^RBUF, ^FBAR._BAS, FBAS) + CreateDwordField (^RBUF, ^FBAR._LEN, FLEN) + Multiply(CONFIG_COREBOOT_ROMSIZE_KB, 1024, Local0) + Store(Local0, FLEN) + Add(Subtract(0xffffffff, Local0), 1, FBAS) + Return (^RBUF) + } } #if !CONFIG(DISABLE_HPET) -- cgit v1.2.3