x86, efi: change name of efi_no_storage_paranoia parameter to efi_storage_paranoia
Subsystems (3)
PATCH 1/1 x86, efi: change name of efi_no_storage_paranoia parameter to efi_storage_paranoia
By following works, my system very often fails set_variable() to set new variable to efi variable storage and shows "efivars: set_variable() failed:
status=-28" message.
- commit 31ff2f20d9003e74991d135f56e503fe776c127c
efi: Distinguish between "remaining space" and actually used space
- commit 8c58bf3eec3b8fc8162fe557e9361891c20758f2
x86,efi: Implement efi_no_storage_paranoia parameter
- commit f8b8404337de4e2466e2e1139ea68b1f8295974f
Modify UEFI anti-bricking code
When booting my system, remaining space of efi variable storage is about 5KB. So there is no room that sets a new variable to the storage.
According to above works, efi_no_storage_paranoia parameter was prepared for sane UEFI which can do gc and fulfills spec. But why need a system with a sane UEFI set the parameter? It is wrong. A system with a broken UEFI should set the parameter.
This patch changes name of the parameter to efi_storage_paranoia and uses all efi variable storage with no parameter.
--- Documentation/kernel-parameters.txt | 10 +++++----- arch/x86/platform/efi/efi.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-)
Documentation/kernel-parameters.txt +5 -5
@@ -888,11 +888,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. edd= [EDD] Format: {"off" | "on" | "skip[mbr]"} - efi_no_storage_paranoia [EFI; X86] - Using this parameter you can use more than 50% of - your efi variable storage. Use this parameter only if - you are really sure that your UEFI does sane gc and - fulfills the spec otherwise your board may brick. + efi_storage_paranoia [EFI; X86] + Using this parameter you cannot use your efi variable + storage when the remaining space of the storage becomes + less than 5KB. Use this parameter if your UEFI does + not sane gc and fulfills the spec. eisa_irq_edge= [PARISC,HW] See header of drivers/parisc/eisa.c.
arch/x86/platform/efi/efi.c +4 -4
@@ -107,14 +107,14 @@ static int __init setup_add_efi_memmap(char *arg) }early_param ("add_efi_memmap" , setup_add_efi_memmap); -static bool efi_no_storage_paranoia; +static bool efi_storage_paranoia;static int __init setup_storage_paranoia (char *arg) { - efi_no_storage_paranoia = true; + efi_storage_paranoia = true;return 0 ; } -early_param ("efi_no_storage_paranoia" , setup_storage_paranoia); +early_param ("efi_storage_paranoia" , setup_storage_paranoia);static efi_status_t virt_efi_get_time (efi_time_t *tm,efi_time_cap_t *tc)
@@ -1066,7 +1066,7 @@ efi_status_t efi_query_variable_store(u32 attributes, unsigned long size)* 5KB. This figure was provided by Samsung, so should be safe. */ if ((remaining_size - size <EFI_MIN_RESERVE ) && - !efi_no_storage_paranoia) { + efi_storage_paranoia) {/* * Triggering garbage collection may require that the firmware
Am 08.11.2013 08:33, schrieb Yasuaki Ishimatsu:
Quoted 11 lines
By following works, my system very often fails
set_variable()to set new variable to efi variable storage and shows "efivars:set_variable()failed:
status=-28" message.- commit
31ff2f20d9003e74991d135f56e503fe776c127c
efi: Distinguish between "remaining space" and actually used space
- commit8c58bf3eec3b8fc8162fe557e9361891c20758f2
x86,efi: Implementefi_no_storage_paranoiaparameter
- commitf8b8404337de4e2466e2e1139ea68b1f8295974f
Modify UEFI anti-bricking code
Quoted 7 lines
When booting my system, remaining space of efi variable storage is about 5KB. So there is no room that sets a new variable to the storage.
According to above works,
efi_no_storage_paranoiaparameter was prepared for sane UEFI which can do gc and fulfills spec. But why need a system with a sane UEFI set the parameter? It is wrong. A system with a broken UEFI should set the parameter.
And how does one know that his UEFI is broken?
"Oh my board is briked because I wrote too much into a variable, maybe setting efi_storage_paranoia would have saved me. Let's try with the next board..." ;)
Thanks,
//richard
Quoted 11 lines · richard-/[email protected] writes:
Am 08.11.2013 08:33, schrieb Yasuaki Ishimatsu:
Quoted 5 lines
According to above works,
efi_no_storage_paranoiaparameter was prepared for sane UEFI which can do gc and fulfills spec. But why need a system with a sane UEFI set the parameter? It is wrong. A system with a broken UEFI should set the parameter.And how does one know that his UEFI is broken?
"Oh my board is briked because I wrote too much into a variable, maybe settingefi_storage_paranoiawould have saved me. Let's try with the next board..." ;)
Agreed. It's hard for people to fix their briked motherboard. At least it's hard for someone who is the first time meet this issue like me. :-( and IMO, at least 51% of uefi firmwares on the world is buggy... ;) However, if we simply make all buggy firmware become a brick, the vendors will more careful in their next generation of products... But it's painful for everyone, both customers and vendors.
Quoted 6 lines
Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Best, Madper Xie.
Quoted 15 lines · Richard Weinberger
Am 08.11.2013 08:33, schrieb Yasuaki Ishimatsu:
Quoted 14 lines
By following works, my system very often fails
set_variable()to set new variable to efi variable storage and shows "efivars:set_variable()failed:
status=-28" message.- commit
31ff2f20d9003e74991d135f56e503fe776c127c
efi: Distinguish between "remaining space" and actually used space
- commit8c58bf3eec3b8fc8162fe557e9361891c20758f2
x86,efi: Implementefi_no_storage_paranoiaparameter
- commitf8b8404337de4e2466e2e1139ea68b1f8295974f
Modify UEFI anti-bricking codeWhen booting my system, remaining space of efi variable storage is about 5KB. So there is no room that sets a new variable to the storage.
Quoted 6 lines
Quoted 4 lines
According to above works,
efi_no_storage_paranoiaparameter was prepared for sane UEFI which can do gc and fulfills spec. But why need a system with a sane UEFI set the parameter? It is wrong. A system with a broken UEFI should set the parameter.And how does one know that his UEFI is broken?
I have no idea. But at least, bricked board is broken UEFI. Do you know the issue occurs on several boards or specific board?
Thanks,
Yasuaki Ishimatsu
Quoted 6 lines
"Oh my board is briked because I wrote too much into a variable, maybe setting
efi_storage_paranoiawould have saved me. Let's try with the next board..." ;)Thanks,
//richard
Am 08.11.2013 10:34, schrieb Yasuaki Ishimatsu:
Quoted 21 lines
Quoted 20 lines · Richard Weinberger
Am 08.11.2013 08:33, schrieb Yasuaki Ishimatsu:
Quoted 18 lines
By following works, my system very often fails
set_variable()to set new variable to efi variable storage and shows "efivars:set_variable()failed:
status=-28" message.- commit
31ff2f20d9003e74991d135f56e503fe776c127c
efi: Distinguish between "remaining space" and actually used space
- commit8c58bf3eec3b8fc8162fe557e9361891c20758f2
x86,efi: Implementefi_no_storage_paranoiaparameter
- commitf8b8404337de4e2466e2e1139ea68b1f8295974f
Modify UEFI anti-bricking codeWhen booting my system, remaining space of efi variable storage is about 5KB. So there is no room that sets a new variable to the storage.
According to above works,
efi_no_storage_paranoiaparameter was prepared for sane UEFI which can do gc and fulfills spec. But why need a system with a sane UEFI set the parameter? It is wrong. A system with a broken UEFI should set the parameter.
Quoted 4 lines
Quoted 1 line
And how does one know that his UEFI is broken?
I have no idea. But at least, bricked board is broken UEFI. Do you know the issue occurs on several boards or specific board?
On *many* boards including laptops....
Please read the history of the whole issue.
Thanks,
//richard
Quoted 22 lines · Richard Weinberger
Am 08.11.2013 10:34, schrieb Yasuaki Ishimatsu:
Quoted 21 lines
Quoted 20 lines · Richard Weinberger
Am 08.11.2013 08:33, schrieb Yasuaki Ishimatsu:
Quoted 18 lines
By following works, my system very often fails
set_variable()to set new variable to efi variable storage and shows "efivars:set_variable()failed:
status=-28" message.- commit
31ff2f20d9003e74991d135f56e503fe776c127c
efi: Distinguish between "remaining space" and actually used space
- commit8c58bf3eec3b8fc8162fe557e9361891c20758f2
x86,efi: Implementefi_no_storage_paranoiaparameter
- commitf8b8404337de4e2466e2e1139ea68b1f8295974f
Modify UEFI anti-bricking codeWhen booting my system, remaining space of efi variable storage is about 5KB. So there is no room that sets a new variable to the storage.
According to above works,
efi_no_storage_paranoiaparameter was prepared for sane UEFI which can do gc and fulfills spec. But why need a system with a sane UEFI set the parameter? It is wrong. A system with a broken UEFI should set the parameter.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
And how does one know that his UEFI is broken?
I have no idea. But at least, bricked board is broken UEFI. Do you know the issue occurs on several boards or specific board?
On *many* boards including laptops....
Please read the history of the whole issue.
Thank you for your comment.
I has read git log. But there is no information like this. So I will read them of related threads again. Do you know good threads to know the history of the issue?
Thanks,
Yasuaki Ishimatsu
Quoted 4 lines
Thanks,
//richard
Am 08.11.2013 11:25, schrieb Yasuaki Ishimatsu:
Quoted 28 lines
Quoted 27 lines · Richard Weinberger
Am 08.11.2013 10:34, schrieb Yasuaki Ishimatsu:
Quoted 25 lines
Quoted 15 lines · Richard Weinberger
Am 08.11.2013 08:33, schrieb Yasuaki Ishimatsu:
Quoted 14 lines
By following works, my system very often fails
set_variable()to set new variable to efi variable storage and shows "efivars:set_variable()failed:
status=-28" message.- commit
31ff2f20d9003e74991d135f56e503fe776c127c
efi: Distinguish between "remaining space" and actually used space
- commit8c58bf3eec3b8fc8162fe557e9361891c20758f2
x86,efi: Implementefi_no_storage_paranoiaparameter
- commitf8b8404337de4e2466e2e1139ea68b1f8295974f
Modify UEFI anti-bricking codeWhen booting my system, remaining space of efi variable storage is about 5KB. So there is no room that sets a new variable to the storage.
Quoted 6 lines
Quoted 4 lines
According to above works,
efi_no_storage_paranoiaparameter was prepared for sane UEFI which can do gc and fulfills spec. But why need a system with a sane UEFI set the parameter? It is wrong. A system with a broken UEFI should set the parameter.And how does one know that his UEFI is broken?
I have no idea. But at least, bricked board is broken UEFI. Do you know the issue occurs on several boards or specific board?
Quoted 7 lines
Quoted 2 lines
On *many* boards including laptops....
Please read the history of the whole issue.Thank you for your comment.
I has read git log. But there is no information like this. So I will read them of related threads again. Do you know good threads to know the history of the issue?
Everything started with an issue that killed Samsung laptops:
http://mjg59.dreamwidth.org/22855.html
Later it was found that if you write too much into UEFI variables many UEFI implementations will do bad things.
Thanks,
//richard
Quoted 38 lines · Richard Weinberger
Am 08.11.2013 11:25, schrieb Yasuaki Ishimatsu:
Quoted 28 lines
Quoted 27 lines · Richard Weinberger
Am 08.11.2013 10:34, schrieb Yasuaki Ishimatsu:
Quoted 25 lines
Quoted 15 lines · Richard Weinberger
Am 08.11.2013 08:33, schrieb Yasuaki Ishimatsu:
Quoted 14 lines
By following works, my system very often fails
set_variable()to set new variable to efi variable storage and shows "efivars:set_variable()failed:
status=-28" message.- commit
31ff2f20d9003e74991d135f56e503fe776c127c
efi: Distinguish between "remaining space" and actually used space
- commit8c58bf3eec3b8fc8162fe557e9361891c20758f2
x86,efi: Implementefi_no_storage_paranoiaparameter
- commitf8b8404337de4e2466e2e1139ea68b1f8295974f
Modify UEFI anti-bricking codeWhen booting my system, remaining space of efi variable storage is about 5KB. So there is no room that sets a new variable to the storage.
Quoted 6 lines
Quoted 4 lines
According to above works,
efi_no_storage_paranoiaparameter was prepared for sane UEFI which can do gc and fulfills spec. But why need a system with a sane UEFI set the parameter? It is wrong. A system with a broken UEFI should set the parameter.And how does one know that his UEFI is broken?
I have no idea. But at least, bricked board is broken UEFI. Do you know the issue occurs on several boards or specific board?
Quoted 7 lines
Quoted 2 lines
On *many* boards including laptops....
Please read the history of the whole issue.Thank you for your comment.
I has read git log. But there is no information like this. So I will read them of related threads again. Do you know good threads to know the history of the issue?
Quoted 5 lines
Everything started with an issue that killed Samsung laptops:
http://mjg59.dreamwidth.org/22855.htmlLater it was found that if you write too much into UEFI variables many UEFI implementations will do bad things.
Thanks for the information.
I will read it.
Thanks,
Yasuaki Ishimatsu
Quoted 4 lines
Thanks,
//richard
Quoted 8 lines · Yasuaki Ishimatsu
Quoted 5 lines
Everything started with an issue that killed Samsung laptops:
http://mjg59.dreamwidth.org/22855.htmlLater it was found that if you write too much into UEFI variables many UEFI implementations will do bad things.
Thanks for the information.
I will read it.
Out of curiosity, what hardware are you using?
Signature · 1 line
Matt Fleming, Intel Open Source Technology Center
Hi Matt,
I uses FUJITSU's x86 box.
This does not become bricked even if I use all efi variable storage. Thus I want a way to not need to specify efi_no_storage_paranoia parameter.
Thanks,
Yasuaki Ishimatsu
Quoted 12 lines · Matt Fleming
Quoted 8 lines · Yasuaki Ishimatsu
Quoted 5 lines
Everything started with an issue that killed Samsung laptops:
http://mjg59.dreamwidth.org/22855.htmlLater it was found that if you write too much into UEFI variables many UEFI implementations will do bad things.
Thanks for the information.
I will read it.Out of curiosity, what hardware are you using?
Howdy Yasuaki,
I know some boxes with small NVRAM (less than 64kb?) will meet many issues if we always keep ~5kb free space.
But if we really do not keep some free space as default, many box will become a brick. (In fact, I just fixed a bricked dell xps 8500 last week. 5kb is not enough for dell xps...)
So maybe the better way is: we check the size of nvram and decide how many space we retain.
Quoted 30 lines · [email protected] writes:
Hi Matt,
I uses FUJITSU's x86 box.
This does not become bricked even if I use all efi variable storage. Thus I want a way to not need to specifyefi_no_storage_paranoiaparameter.Thanks,
Yasuaki IshimatsuQuoted 4 lines · Matt Fleming
Quoted 3 lines · Yasuaki Ishimatsu
Quoted 3 lines
Everything started with an issue that killed Samsung laptops:
http://mjg59.dreamwidth.org/22855.htmlQuoted 8 lines
Quoted 5 lines
Quoted 2 lines
Later it was found that if you write too much into UEFI variables many UEFI implementations will do bad things.
Thanks for the information.
I will read it.Out of curiosity, what hardware are you using?
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Best, Madper Xie.
Quoted 6 lines · Yasuaki Ishimatsu
Hi Matt,
I uses FUJITSU's x86 box.
This does not become bricked even if I use all efi variable storage. Thus I want a way to not need to specifyefi_no_storage_paranoiaparameter.
The efi_no_storage_paranoia parameter was introduced because some machines do not initiate garbage collection of the NVRAM until you allocate all space - basically it's a switch to turn off the "save 5KB of stoarge at all times" workaround that is needed to avoid bricking some machines.
The intention of the switch is not to allow you to fill your NVRAM just because you can. If that is something you want to do then I think it's fair to require you to explicitly turn on efi_no_storage_paranoia. But I'm assuming here that you are doing something like writing lots and lots of pstore entries and just want to write as many as your variable storage will allow? Or are you doing something more fundamental like creating BootXXXX entries?
What are you doing to run into the 5KB reserve? How much NVRAM does your machine come with?
Signature · 1 line
Matt Fleming, Intel Open Source Technology Center
Hi Matt,
Sorry for late the reply.
Quoted 22 lines · Matt Fleming
Quoted 6 lines · Yasuaki Ishimatsu
Hi Matt,
I uses FUJITSU's x86 box.
This does not become bricked even if I use all efi variable storage. Thus I want a way to not need to specifyefi_no_storage_paranoiaparameter.The
efi_no_storage_paranoiaparameter was introduced because some machines do not initiate garbage collection of the NVRAM until you allocate all space - basically it's a switch to turn off the "save 5KB of stoarge at all times" workaround that is needed to avoid bricking some machines.The intention of the switch is not to allow you to fill your NVRAM just because you can. If that is something you want to do then I think it's fair to require you to explicitly turn on
efi_no_storage_paranoia. But I'm assuming here that you are doing something like writing lots and lots of pstore entries and just want to write as many as your variable storage will allow? Or are you doing something more fundamental like creating BootXXXX entries?
Quoted 2 lines
What are you doing to run into the 5KB reserve? How much NVRAM does your machine come with?
I just add boot entry to NVRAM by efibootmgr command. But when Linux boots up, the remaining NVRAM is less than 5Kbyte. So I cannnot add new entry.
Thanks,
Yasuaki Ishimatsu
Quoted 28 lines · [email protected] writes:
Hi Matt,
Sorry for late the reply.
Quoted 22 lines · Matt Fleming
Quoted 6 lines · Yasuaki Ishimatsu
Hi Matt,
I uses FUJITSU's x86 box.
This does not become bricked even if I use all efi variable storage. Thus I want a way to not need to specifyefi_no_storage_paranoiaparameter.The
efi_no_storage_paranoiaparameter was introduced because some machines do not initiate garbage collection of the NVRAM until you allocate all space - basically it's a switch to turn off the "save 5KB of stoarge at all times" workaround that is needed to avoid bricking some machines.The intention of the switch is not to allow you to fill your NVRAM just because you can. If that is something you want to do then I think it's fair to require you to explicitly turn on
efi_no_storage_paranoia. But I'm assuming here that you are doing something like writing lots and lots of pstore entries and just want to write as many as your variable storage will allow? Or are you doing something more fundamental like creating BootXXXX entries?
Quoted 6 lines
Quoted 2 lines
What are you doing to run into the 5KB reserve? How much NVRAM does your machine come with?
I just add boot entry to NVRAM by efibootmgr command. But when Linux boots up, the remaining NVRAM is less than 5Kbyte. So I cannnot add new entry.
Howdy Yasuaki,
If the remaining NVRAM is less than 5Kb, your writing will trigger a NVRAM storage reclamation. However you still failed creating entry. So I'm just curious what itmes occupy lots of nvram storage space.
Quoted 2 lines
Thanks,
Yasuaki Ishimatsu
--
Best,
Madper
Quoted 34 lines · Madper Xie
Quoted 31 lines · [email protected] writes:
Hi Matt,
Sorry for late the reply.
Quoted 24 lines · Matt Fleming
Quoted 6 lines · Yasuaki Ishimatsu
Hi Matt,
I uses FUJITSU's x86 box.
This does not become bricked even if I use all efi variable storage. Thus I want a way to not need to specifyefi_no_storage_paranoiaparameter.The
efi_no_storage_paranoiaparameter was introduced because some machines do not initiate garbage collection of the NVRAM until you allocate all space - basically it's a switch to turn off the "save 5KB of stoarge at all times" workaround that is needed to avoid bricking some machines.The intention of the switch is not to allow you to fill your NVRAM just because you can. If that is something you want to do then I think it's fair to require you to explicitly turn on
efi_no_storage_paranoia. But I'm assuming here that you are doing something like writing lots and lots of pstore entries and just want to write as many as your variable storage will allow? Or are you doing something more fundamental like creating BootXXXX entries?What are you doing to run into the 5KB reserve? How much NVRAM does your machine come with?
Quoted 7 lines
Quoted 3 lines
I just add boot entry to NVRAM by efibootmgr command. But when Linux boots up, the remaining NVRAM is less than 5Kbyte. So I cannnot add new entry.
Howdy Yasuaki,
If the remaining NVRAM is less than 5Kb, your writing will trigger a NVRAM storage reclamation. However you still failed creating entry. So I'm just curious what itmes occupy lots of nvram storage space.
Even if we got EFI_OUT_OF_RESOURCES while running Linux, gc does not run. Trigger of gc is when EFI_OUT_OF_RESOURCES occurs on pre OS environment with UEFI. So on my system, if EFI_OUT_OF_RESOURCES occurs by the 5Kbyte threshold, we cannot use nvram storage until EFI_OUT_OF_RESOURCES occurs on pre OS environment with UEFI.
Thanks,
Yasuaki Ishimatsu
Quoted 8 lines
Quoted 3 lines
Thanks,
Yasuaki Ishimatsu--
Best,
Madper
於 三,2013-11-20 於 15:26 +0900,Yasuaki Ishimatsu 提到:
Quoted 43 lines
Quoted 34 lines · Madper Xie
Quoted 31 lines · [email protected] writes:
Hi Matt,
Sorry for late the reply.
Quoted 24 lines · Matt Fleming
Quoted 6 lines · Yasuaki Ishimatsu
Hi Matt,
I uses FUJITSU's x86 box.
This does not become bricked even if I use all efi variable storage. Thus I want a way to not need to specifyefi_no_storage_paranoiaparameter.The
efi_no_storage_paranoiaparameter was introduced because some machines do not initiate garbage collection of the NVRAM until you allocate all space - basically it's a switch to turn off the "save 5KB of stoarge at all times" workaround that is needed to avoid bricking some machines.The intention of the switch is not to allow you to fill your NVRAM just because you can. If that is something you want to do then I think it's fair to require you to explicitly turn on
efi_no_storage_paranoia. But I'm assuming here that you are doing something like writing lots and lots of pstore entries and just want to write as many as your variable storage will allow? Or are you doing something more fundamental like creating BootXXXX entries?What are you doing to run into the 5KB reserve? How much NVRAM does your machine come with?
Quoted 7 lines
Quoted 3 lines
I just add boot entry to NVRAM by efibootmgr command. But when Linux boots up, the remaining NVRAM is less than 5Kbyte. So I cannnot add new entry.
Howdy Yasuaki,
If the remaining NVRAM is less than 5Kb, your writing will trigger a NVRAM storage reclamation. However you still failed creating entry. So I'm just curious what itmes occupy lots of nvram storage space.
Quoted 8 lines
Even if we got
EFI_OUT_OF_RESOURCESwhile running Linux, gc does not run. Trigger of gc is whenEFI_OUT_OF_RESOURCESoccurs on pre OS environment with UEFI. So on my system, ifEFI_OUT_OF_RESOURCESoccurs by the 5Kbyte threshold, we cannot use nvram storage untilEFI_OUT_OF_RESOURCESoccurs on pre OS environment with UEFI.Thanks,
Yasuaki Ishimatsu
Can we try to trigger gc by EFI_OUT_OF_RESOURCE in EFI stub kernel or EFI boot loader to recover NVRAM space? Does work with the BIOS on this machine?
Thanks a lot!
Joey Lee
Quoted 50 lines · joeyli
於 三,2013-11-20 於 15:26 +0900,Yasuaki Ishimatsu 提到:
Quoted 49 lines
Quoted 34 lines · Madper Xie
Quoted 31 lines · [email protected] writes:
Hi Matt,
Sorry for late the reply.
Quoted 24 lines · Matt Fleming
Quoted 6 lines · Yasuaki Ishimatsu
Hi Matt,
I uses FUJITSU's x86 box.
This does not become bricked even if I use all efi variable storage. Thus I want a way to not need to specifyefi_no_storage_paranoiaparameter.The
efi_no_storage_paranoiaparameter was introduced because some machines do not initiate garbage collection of the NVRAM until you allocate all space - basically it's a switch to turn off the "save 5KB of stoarge at all times" workaround that is needed to avoid bricking some machines.The intention of the switch is not to allow you to fill your NVRAM just because you can. If that is something you want to do then I think it's fair to require you to explicitly turn on
efi_no_storage_paranoia. But I'm assuming here that you are doing something like writing lots and lots of pstore entries and just want to write as many as your variable storage will allow? Or are you doing something more fundamental like creating BootXXXX entries?What are you doing to run into the 5KB reserve? How much NVRAM does your machine come with?
Quoted 7 lines
Quoted 3 lines
I just add boot entry to NVRAM by efibootmgr command. But when Linux boots up, the remaining NVRAM is less than 5Kbyte. So I cannnot add new entry.
Howdy Yasuaki,
If the remaining NVRAM is less than 5Kb, your writing will trigger a NVRAM storage reclamation. However you still failed creating entry. So I'm just curious what itmes occupy lots of nvram storage space.Even if we got
EFI_OUT_OF_RESOURCESwhile running Linux, gc does not run. Trigger of gc is whenEFI_OUT_OF_RESOURCESoccurs on pre OS environment with UEFI. So on my system, ifEFI_OUT_OF_RESOURCESoccurs by the 5Kbyte threshold, we cannot use nvram storage untilEFI_OUT_OF_RESOURCESoccurs on pre OS environment with UEFI.
Quoted 6 lines
Quoted 2 lines
Thanks,
Yasuaki IshimatsuCan we try to trigger gc by
EFI_OUT_OF_RESOURCEin EFI stub kernel or EFI boot loader to recover NVRAM space? Does work with the BIOS on this machine?
Yes. I can trigger gc by EFI_OUT_OF_RESOUCE in EFI shell on my machine.
Thanks,
Yasuaki Ishimatu
Quoted 5 lines
Thanks a lot!
Joey Lee
於 四,2013-11-21 於 18:13 +0900,Yasuaki Ishimatsu 提到:
Quoted 54 lines
Quoted 53 lines · joeyli
於 三,2013-11-20 於 15:26 +0900,Yasuaki Ishimatsu 提到:
Quoted 51 lines
Quoted 34 lines · Madper Xie
Quoted 31 lines · [email protected] writes:
Hi Matt,
Sorry for late the reply.
Quoted 24 lines · Matt Fleming
Quoted 6 lines · Yasuaki Ishimatsu
Hi Matt,
I uses FUJITSU's x86 box.
This does not become bricked even if I use all efi variable storage. Thus I want a way to not need to specifyefi_no_storage_paranoiaparameter.The
efi_no_storage_paranoiaparameter was introduced because some machines do not initiate garbage collection of the NVRAM until you allocate all space - basically it's a switch to turn off the "save 5KB of stoarge at all times" workaround that is needed to avoid bricking some machines.The intention of the switch is not to allow you to fill your NVRAM just because you can. If that is something you want to do then I think it's fair to require you to explicitly turn on
efi_no_storage_paranoia. But I'm assuming here that you are doing something like writing lots and lots of pstore entries and just want to write as many as your variable storage will allow? Or are you doing something more fundamental like creating BootXXXX entries?What are you doing to run into the 5KB reserve? How much NVRAM does your machine come with?
Quoted 7 lines
Quoted 3 lines
I just add boot entry to NVRAM by efibootmgr command. But when Linux boots up, the remaining NVRAM is less than 5Kbyte. So I cannnot add new entry.
Howdy Yasuaki,
If the remaining NVRAM is less than 5Kb, your writing will trigger a NVRAM storage reclamation. However you still failed creating entry. So I'm just curious what itmes occupy lots of nvram storage space.Even if we got
EFI_OUT_OF_RESOURCESwhile running Linux, gc does not run. Trigger of gc is whenEFI_OUT_OF_RESOURCESoccurs on pre OS environment with UEFI. So on my system, ifEFI_OUT_OF_RESOURCESoccurs by the 5Kbyte threshold, we cannot use nvram storage untilEFI_OUT_OF_RESOURCESoccurs on pre OS environment with UEFI.Thanks,
Yasuaki Ishimatsu
Quoted 9 lines
Quoted 3 lines
Can we try to trigger gc by
EFI_OUT_OF_RESOURCEin EFI stub kernel or EFI boot loader to recover NVRAM space? Does work with the BIOS on this machine?Yes. I can trigger gc by
EFI_OUT_OF_RESOUCEin EFI shell on my machine.Thanks,
Yasuaki Ishimatu
OK, then maybe can try to trigger gc in EFI stub before ExitBootService().
Another problem is what's the reasonable threshold. The threshold should bigger then 5Kbyte, then we write a dummy BootTime NV variable to trigger gc.
Thanks
Joey Lee
於 四,2013-11-21 於 17:53 +0800,joeyli 提到:
Quoted 68 lines
於 四,2013-11-21 於 18:13 +0900,Yasuaki Ishimatsu 提到:
Quoted 54 lines
Quoted 53 lines · joeyli
於 三,2013-11-20 於 15:26 +0900,Yasuaki Ishimatsu 提到:
Quoted 51 lines
Quoted 34 lines · Madper Xie
Quoted 31 lines · [email protected] writes:
Hi Matt,
Sorry for late the reply.
Quoted 24 lines · Matt Fleming
Quoted 6 lines · Yasuaki Ishimatsu
Hi Matt,
I uses FUJITSU's x86 box.
This does not become bricked even if I use all efi variable storage. Thus I want a way to not need to specifyefi_no_storage_paranoiaparameter.The
efi_no_storage_paranoiaparameter was introduced because some machines do not initiate garbage collection of the NVRAM until you allocate all space - basically it's a switch to turn off the "save 5KB of stoarge at all times" workaround that is needed to avoid bricking some machines.The intention of the switch is not to allow you to fill your NVRAM just because you can. If that is something you want to do then I think it's fair to require you to explicitly turn on
efi_no_storage_paranoia. But I'm assuming here that you are doing something like writing lots and lots of pstore entries and just want to write as many as your variable storage will allow? Or are you doing something more fundamental like creating BootXXXX entries?What are you doing to run into the 5KB reserve? How much NVRAM does your machine come with?
Quoted 7 lines
Quoted 3 lines
I just add boot entry to NVRAM by efibootmgr command. But when Linux boots up, the remaining NVRAM is less than 5Kbyte. So I cannnot add new entry.
Howdy Yasuaki,
If the remaining NVRAM is less than 5Kb, your writing will trigger a NVRAM storage reclamation. However you still failed creating entry. So I'm just curious what itmes occupy lots of nvram storage space.Even if we got
EFI_OUT_OF_RESOURCESwhile running Linux, gc does not run. Trigger of gc is whenEFI_OUT_OF_RESOURCESoccurs on pre OS environment with UEFI. So on my system, ifEFI_OUT_OF_RESOURCESoccurs by the 5Kbyte threshold, we cannot use nvram storage untilEFI_OUT_OF_RESOURCESoccurs on pre OS environment with UEFI.Thanks,
Yasuaki IshimatsuQuoted 9 lines
Quoted 3 lines
Can we try to trigger gc by
EFI_OUT_OF_RESOURCEin EFI stub kernel or EFI boot loader to recover NVRAM space? Does work with the BIOS on this machine?Yes. I can trigger gc by
EFI_OUT_OF_RESOUCEin EFI shell on my machine.Thanks,
Yasuaki IshimatuOK, then maybe can try to trigger gc in EFI stub before
ExitBootService().
Quoted 7 lines
Another problem is what's the reasonable threshold. The threshold should bigger then 5Kbyte, then we write a dummy BootTime NV variable to trigger gc.
Thanks
Joey Lee
hm... after review your mail, if the free NVRAM space of issue machine is REALLY less then 5K even after gc. Then there have no way to write any variable unless user remove some NV variable.
Thanks
Joey Lee