Commit 852efbf5bd3047b12c1926564d792a7a1cea9eac

Authored by Stefan Brüns
Committed by Alexander Graf
1 parent d5a815327d

efi_loader: Update description of internal efi_mem_carve_out

In 74c16acce30bb882ad5951829d8dafef8eea564c the return values where
changed, but the description was kept.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

Showing 1 changed file with 11 additions and 3 deletions Side-by-side Diff

lib/efi_loader/efi_memory.c
... ... @@ -62,9 +62,17 @@
62 62 * Unmaps all memory occupied by the carve_desc region from the
63 63 * list entry pointed to by map.
64 64 *
65   - * Returns 1 if carving was performed or 0 if the regions don't overlap.
66   - * Returns -1 if it would affect non-RAM regions but overlap_only_ram is set.
67   - * Carving is only guaranteed to complete when all regions return 0.
  65 + * Returns EFI_CARVE_NO_OVERLAP if the regions don't overlap.
  66 + * Returns EFI_CARVE_OVERLAPS_NONRAM if the carve and map overlap,
  67 + * and the map contains anything but free ram.
  68 + * (only when overlap_only_ram is true)
  69 + * Returns EFI_CARVE_LOOP_AGAIN if the mapping list should be traversed
  70 + * again, as it has been altered
  71 + * Returns the number of overlapping pages. The pages are removed from
  72 + * the mapping list.
  73 + *
  74 + * In case of EFI_CARVE_OVERLAPS_NONRAM it is the callers responsibility
  75 + * to readd the already carved out pages to the mapping.
68 76 */
69 77 static int efi_mem_carve_out(struct efi_mem_list *map,
70 78 struct efi_mem_desc *carve_desc,