Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/41419 )
Change subject: device: Allocate memory in top-down fashion for child resources
......................................................................
device: Allocate memory in top-down fashion for child resources
This change updates the resource allocator to allocate resources for
children in a top-down fashion in the address space by using
memranges_steal_last() to get the last range that can satisy the
resource request.
This is done to maintain consistency with the old resource
allocator. There are some AMD chipsets in the tree that do not really
work well with the dynamic resource assignment since their resources are
not all defined correctly before the allocator runs.
Change-Id: If631b0d1fed445723ef506a2c7671faee0326d37
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
---
M src/device/device.c
1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/41419/1
diff --git a/src/device/device.c b/src/device/device.c
index d3102bb..b3f3a6e 100644
--- a/src/device/device.c
+++ b/src/device/device.c
@@ -839,8 +839,14 @@
continue;
}
- if (memranges_steal(ranges, resource->limit, resource->size, resource->align,
- type_match, &resource->base) == false) {
+ /*
+ * Steal memory from the last available range in the list so that the allocation
+ * happens in top-down fashion in the address space. This is done to maintain
+ * consistency with old resource allocator.
+ */
+ if (memranges_steal_last(ranges, resource->limit, resource->size,
+ resource->align, type_match,
+ &resource->base) == false) {
printk(BIOS_ERR, "ERROR: Resource didn't fit!!! ");
printk(BIOS_SPEW, "%s %02lx * size: 0x%llx limit: %llx %s\n",
dev_path(dev), resource->index,
--
To view, visit https://review.coreboot.org/c/coreboot/+/41419
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If631b0d1fed445723ef506a2c7671faee0326d37
Gerrit-Change-Number: 41419
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan(a)google.com>
Gerrit-MessageType: newchange
Name of user not set #1002959 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/41689 )
Change subject: added a new fmap for the qemu-q35 emulation that contains only a read-only section
......................................................................
added a new fmap for the qemu-q35 emulation
that contains only a read-only section
Change-Id: Ie7c977ab3513be974e1e2ab39f6e05f068121df8
Signed-off-by: A. Bach <zeit(a)manchmal-nie.de>
---
A src/mainboard/emulation/qemu-q35/vboot-ro-16M.fmd
1 file changed, 14 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/41689/1
diff --git a/src/mainboard/emulation/qemu-q35/vboot-ro-16M.fmd b/src/mainboard/emulation/qemu-q35/vboot-ro-16M.fmd
new file mode 100644
index 0000000..4d4fcd6
--- /dev/null
+++ b/src/mainboard/emulation/qemu-q35/vboot-ro-16M.fmd
@@ -0,0 +1,14 @@
+FLASH@0xff000000 0x1000000 {
+ SI_BIOS 0x1000000 {
+ RW_VPD(PRESERVE) 0x1000
+
+ WP_RO {
+ FMAP 0x800
+ RO_FRID 0x40
+ RO_PADDING 0x7c0
+ RO_VPD(PRESERVE) 0x1000
+ GBB 0x1e000
+ COREBOOT(CBFS)
+ }
+ }
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/41689
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie7c977ab3513be974e1e2ab39f6e05f068121df8
Gerrit-Change-Number: 41689
Gerrit-PatchSet: 1
Gerrit-Owner: Name of user not set #1002959
Gerrit-MessageType: newchange