summaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/prefix/mromprefix.S18
-rw-r--r--src/arch/x86/prefix/undiloader.S16
2 files changed, 33 insertions, 1 deletions
diff --git a/src/arch/x86/prefix/mromprefix.S b/src/arch/x86/prefix/mromprefix.S
index b636b92a..568d1c00 100644
--- a/src/arch/x86/prefix/mromprefix.S
+++ b/src/arch/x86/prefix/mromprefix.S
@@ -456,6 +456,24 @@ pci_set_mem_access:
ret
.size pci_set_mem_access, . - pci_set_mem_access
+/* Update image source address for UNDI loader
+ *
+ * Parameters:
+ * %esi : Image source address
+ * Returns:
+ * %esi : Image source address
+ */
+ .section ".prefix", "ax", @progbits
+ .globl undiloader_source
+undiloader_source:
+ /* Always use expansion ROM BAR directly when installing via
+ * the UNDI loader entry point, since the PMM-allocated block
+ * may collide with whatever is calling the UNDI loader entry
+ * point.
+ */
+ xorl %esi, %esi
+ ret
+
/* Payload prefix
*
* We include a dummy ROM header to cover the "hidden" portion of the
diff --git a/src/arch/x86/prefix/undiloader.S b/src/arch/x86/prefix/undiloader.S
index 530b48e8..1d77110e 100644
--- a/src/arch/x86/prefix/undiloader.S
+++ b/src/arch/x86/prefix/undiloader.S
@@ -35,7 +35,8 @@ undiloader:
movw %es:12(%di), %bx
movw %es:14(%di), %ax
movl image_source, %esi
- movl decompress_to, %edi
+ call undiloader_source
+ xorl %edi, %edi
orl $0xffffffff, %ebp /* Allow arbitrary relocation */
call install_prealloc
popw %di
@@ -57,3 +58,16 @@ undiloader:
popl %edi
popl %esi
lret
+
+/* Update image source address for UNDI loader
+ *
+ * Parameters:
+ * %esi : Image source address
+ * Returns:
+ * %esi : Image source address
+ */
+ .section ".prefix", "ax", @progbits
+ .globl undiloader_source
+ .weak undiloader_source
+undiloader_source:
+ ret