aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMadper Xie <cxie@redhat.com>2013-11-10 09:15:11 -0500
committerMatt Fleming <matt.fleming@intel.com>2014-03-04 11:16:17 -0500
commit5db80c65140c6502d5c2345d0b0fa166eecedc61 (patch)
tree113509b211e53616417cdf4411f12ed38dcf987d /arch
parentaca32b5768bb314f5f3f42e26822424468412f5a (diff)
x86/efi: Delete out-of-date comments of efi_query_variable_store
For now we only ensure about 5kb free space for avoiding our board refusing boot. But the comment lies that we retain 50% space. Signed-off-by: Madper Xie <cxie@redhat.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/platform/efi/efi.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 541e7db26c15..dc1dd6d09dec 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -1110,9 +1110,8 @@ u64 efi_mem_attributes(unsigned long phys_addr)
1110} 1110}
1111 1111
1112/* 1112/*
1113 * Some firmware has serious problems when using more than 50% of the EFI 1113 * Some firmware implementations refuse to boot if there's insufficient space
1114 * variable store, i.e. it triggers bugs that can brick machines. Ensure that 1114 * in the variable store. Ensure that we never use more than a safe limit.
1115 * we never use more than this safe limit.
1116 * 1115 *
1117 * Return EFI_SUCCESS if it is safe to write 'size' bytes to the variable 1116 * Return EFI_SUCCESS if it is safe to write 'size' bytes to the variable
1118 * store. 1117 * store.
@@ -1131,10 +1130,9 @@ efi_status_t efi_query_variable_store(u32 attributes, unsigned long size)
1131 return status; 1130 return status;
1132 1131
1133 /* 1132 /*
1134 * Some firmware implementations refuse to boot if there's insufficient 1133 * We account for that by refusing the write if permitting it would
1135 * space in the variable store. We account for that by refusing the 1134 * reduce the available space to under 5KB. This figure was provided by
1136 * write if permitting it would reduce the available space to under 1135 * Samsung, so should be safe.
1137 * 5KB. This figure was provided by Samsung, so should be safe.
1138 */ 1136 */
1139 if ((remaining_size - size < EFI_MIN_RESERVE) && 1137 if ((remaining_size - size < EFI_MIN_RESERVE) &&
1140 !efi_no_storage_paranoia) { 1138 !efi_no_storage_paranoia) {