[PATCH master 2/3] efi: efi-iomem: don't add EFI loader code/data as memory banks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The loader code and data memory descriptors describe code used by the
currently running barebox instance. This is already used memory, so
registering it as available SDRAM is wrong. Instead, just reserve the
IO MEM region for informational purposes.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 common/efi/efi-iomem.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/common/efi/efi-iomem.c b/common/efi/efi-iomem.c
index e223c595c478..11ea94f6a2a6 100644
--- a/common/efi/efi-iomem.c
+++ b/common/efi/efi-iomem.c
@@ -36,9 +36,13 @@ static int efi_parse_mmap(struct efi_memory_desc *desc)
 		flags = IORESOURCE_MEM | IORESOURCE_DISABLED;
 		break;
 	case EFI_LOADER_CODE:
-		return barebox_add_memory_bank("loader code", va_base, va_size);
+		name = "loader code";
+		flags = IORESOURCE_MEM | IORESOURCE_READONLY;
+		break;
 	case EFI_LOADER_DATA:
-		return barebox_add_memory_bank("loader data", va_base, va_size);
+		name = "loader data";
+		flags = IORESOURCE_MEM;
+		break;
 	case EFI_BOOT_SERVICES_CODE:
 		if (!IS_ENABLED(DEBUG))
 			return 0;
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux