1.Now have two typestorage in browser:
1.BrowserStorage
1.Thistype maintain the storage used by browser level, more than one form sets mayshare the same storage.
2.FormsetStorage
1.Thistype maintain the storage used by current form set, it has a pointer membernest in it and pointer to the Browser Storage.
2.How to find abrowser storage?
1.Varstore
Basedon the input varstore name and guid, also need to know the device path for thisvarstore (Driver handle also ok, what about HiiHandle?)
2.EfiVarstore
Basedon the input varstore name and guid, can find the efi varstore.
3.Name/Valuevarstore
Basedon the input varstore name and guid, also need to know the device path for thisvarstore.
3.Global variableused:
1.gBrowserStorageList
1.Usedto record the browser_storage
4.The process forBrowser_storage and Formset_storage
1.Create
1.Whenparse ifr binary data, it will create storage for this form set. It will first create Formset_storage.
1.Wheninitialize the Browser_storage member nest in Formset_storage, it will checkthe global list gBrowserStorageList, Ifit not found it in the list, browser will create Browser_storage for thisstorage and insert it to gBrowserStorageList.
2.Itwill create the configrequest string for this storage, store it nest in theformset_storage.
2.Initialize
1.InInitializeCurrentSetting( ) -> LoadStorage() function, Storage Type is:
1.EFI_HII_VARSTORE_EFI_VARIABLE
1.Notget storage value for this type.
2.EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER
1.Ifthe ConfigRequest string nest inbrowser_stroage is NULL, call GetVariable to get value for this storage.
2.Else,Update the ConfigRequest string saved in Browser_storage, add new elements notin Browser_storage but in Formset_storage.
3.EFI_HII_VARSTORE_BUFFER / EFI_HII_VARSTORE_NAME_VALUE
1.Comparethe ConfigRequst element in Formset_storage and Browser_storage,, just getvalue for the elements in Formset_storage and not in Browser_storage.
2.Afterget value for these elements, add these ConfigRequest strings to theBrowser_storage.
3.Remove
1.Whenbrowser exit from one form set and this form set not has data changed, browserwill remove this storage. It will removemake the ReferenceCount inBrowser_storage -1. Also it will removethe elements in ConfigRequest saved in Browser_storage, belong to this formset.