This commit is contained in:
SergeySlice 2022-01-22 13:39:41 +03:00
commit 7ffa4d6bf8
12 changed files with 267 additions and 311 deletions

View File

@ -74,9 +74,7 @@ CoreConnectController (
//
// Make sure ControllerHandle is valid
//
CoreAcquireProtocolLock ();
Status = CoreValidateHandle (ControllerHandle);
CoreReleaseProtocolLock ();
if (EFI_ERROR(Status)) {
return Status;
}
@ -161,9 +159,7 @@ CoreConnectController (
//
// Make sure the DriverBindingHandle is valid
//
CoreAcquireProtocolLock ();
Status = CoreValidateHandle (ControllerHandle);
CoreReleaseProtocolLock ();
if (EFI_ERROR(Status)) {
//
// Release the protocol lock on the handle database
@ -277,9 +273,7 @@ AddSortedDriverBindingProtocol (
//
// Make sure the DriverBindingHandle is valid
//
CoreAcquireProtocolLock ();
Status = CoreValidateHandle (DriverBindingHandle);
CoreReleaseProtocolLock ();
if (EFI_ERROR(Status)) {
return;
}
@ -788,10 +782,8 @@ CoreDisconnectController (
//
// Make sure ControllerHandle is valid
//
CoreAcquireProtocolLock ();
Status = CoreValidateHandle (ControllerHandle);
if (EFI_ERROR(Status)) {
CoreReleaseProtocolLock ();
return Status;
}
@ -801,12 +793,10 @@ CoreDisconnectController (
if (ChildHandle != NULL) {
Status = CoreValidateHandle (ChildHandle);
if (EFI_ERROR(Status)) {
CoreReleaseProtocolLock ();
return Status;
}
}
CoreReleaseProtocolLock ();
Handle = ControllerHandle;
//

View File

@ -727,24 +727,18 @@ CoreUninstallProtocolInterface (
return EFI_INVALID_PARAMETER;
}
//
// Lock the protocol database
//
CoreAcquireProtocolLock ();
//
// Check that UserHandle is a valid handle
//
Status = CoreValidateHandle (UserHandle);
if (EFI_ERROR(Status)) {
// return Status;
goto Done;
return Status;
}
//
// Lock the protocol database
//
// CoreAcquireProtocolLock ();
CoreAcquireProtocolLock ();
//
// Check that Protocol exists on UserHandle, and Interface matches the interface in the database
@ -1019,18 +1013,12 @@ CoreOpenProtocol (
}
}
//
// Lock the protocol database
//
CoreAcquireProtocolLock ();
//
// Check for invalid UserHandle
//
Status = CoreValidateHandle (UserHandle);
if (EFI_ERROR(Status)) {
// return Status;
goto Done;
return Status;
}
//
@ -1040,26 +1028,21 @@ CoreOpenProtocol (
case EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER :
Status = CoreValidateHandle (ImageHandle);
if (EFI_ERROR(Status)) {
// return Status;
goto Done;
return Status;
}
Status = CoreValidateHandle (ControllerHandle);
if (EFI_ERROR(Status)) {
// return Status;
goto Done;
return Status;
}
if (UserHandle == ControllerHandle) {
// return EFI_INVALID_PARAMETER;
Status = EFI_INVALID_PARAMETER;
goto Done;
return EFI_INVALID_PARAMETER;
}
break;
case EFI_OPEN_PROTOCOL_BY_DRIVER :
case EFI_OPEN_PROTOCOL_BY_DRIVER | EFI_OPEN_PROTOCOL_EXCLUSIVE :
Status = CoreValidateHandle (ImageHandle);
if (EFI_ERROR(Status)) {
// return Status;
goto Done;
return Status;
}
Status = CoreValidateHandle (ControllerHandle);
if (EFI_ERROR(Status)) {
@ -1069,8 +1052,7 @@ CoreOpenProtocol (
case EFI_OPEN_PROTOCOL_EXCLUSIVE :
Status = CoreValidateHandle (ImageHandle);
if (EFI_ERROR(Status)) {
// return Status;
goto Done;
return Status;
}
break;
case EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL :
@ -1078,15 +1060,13 @@ CoreOpenProtocol (
case EFI_OPEN_PROTOCOL_TEST_PROTOCOL :
break;
default:
// return EFI_INVALID_PARAMETER;
Status = EFI_INVALID_PARAMETER;
goto Done;
return EFI_INVALID_PARAMETER;
}
//
// Lock the protocol database
//
//CoreAcquireProtocolLock ();
CoreAcquireProtocolLock ();
//
// Look at each protocol interface for a match
@ -1244,37 +1224,31 @@ CoreCloseProtocol (
LIST_ENTRY *Link;
OPEN_PROTOCOL_DATA *OpenData;
//
// Lock the protocol database
//
CoreAcquireProtocolLock ();
//
// Check for invalid parameters
//
Status = CoreValidateHandle (UserHandle);
if (EFI_ERROR(Status)) {
goto Done;
return Status;
}
Status = CoreValidateHandle (AgentHandle);
if (EFI_ERROR(Status)) {
goto Done;
return Status;
}
if (ControllerHandle != NULL) {
Status = CoreValidateHandle (ControllerHandle);
if (EFI_ERROR(Status)) {
goto Done;
return Status;
}
}
if (Protocol == NULL) {
Status = EFI_INVALID_PARAMETER;
goto Done;
return EFI_INVALID_PARAMETER;
}
//
// Lock the protocol database
//
//CoreAcquireProtocolLock ();
CoreAcquireProtocolLock ();
//
// Look at each protocol interface for a match
@ -1468,14 +1442,6 @@ CoreProtocolsPerHandle (
CoreAcquireProtocolLock ();
Status = CoreValidateHandle (UserHandle);
if (EFI_ERROR (Status)) {
goto Done;
}
Handle = (IHANDLE *)UserHandle;
for (Link = Handle->Protocols.ForwardLink; Link != &Handle->Protocols; Link = Link->ForwardLink) {
ProtocolCount++;
}

View File

@ -248,7 +248,6 @@ CoreReleaseProtocolLock (
/**
Check whether a handle is a valid EFI_HANDLE
The gProtocolDatabaseLock must be owned
@param UserHandle The handle to check

View File

@ -193,28 +193,22 @@ CoreReinstallProtocolInterface (
PROTOCOL_INTERFACE *Prot;
PROTOCOL_ENTRY *ProtEntry;
// Status = CoreValidateHandle (UserHandle);
// if (EFI_ERROR(Status)) {
// return Status;
// }
Status = CoreValidateHandle (UserHandle);
if (EFI_ERROR(Status)) {
return Status;
}
if (Protocol == NULL) {
return EFI_INVALID_PARAMETER;
}
// Handle = (IHANDLE *) UserHandle;
Handle = (IHANDLE *) UserHandle;
//
// Lock the protocol database
//
CoreAcquireProtocolLock ();
Status = CoreValidateHandle (UserHandle);
if (EFI_ERROR (Status)) {
goto Done;
}
Handle = (IHANDLE *) UserHandle;
//
// Check that Protocol exists on UserHandle, and Interface matches the interface in the database
//

View File

@ -68,9 +68,7 @@ CoreConnectController (
//
// Make sure ControllerHandle is valid
//
CoreAcquireProtocolLock ();
Status = CoreValidateHandle (ControllerHandle);
CoreReleaseProtocolLock ();
if (EFI_ERROR(Status)) {
return Status;
}
@ -270,9 +268,7 @@ AddSortedDriverBindingProtocol (
//
// Make sure the DriverBindingHandle is valid
//
CoreAcquireProtocolLock ();
Status = CoreValidateHandle (DriverBindingHandle);
CoreReleaseProtocolLock ();
if (EFI_ERROR(Status)) {
return;
}
@ -750,10 +746,8 @@ CoreDisconnectController (
//
// Make sure ControllerHandle is valid
//
CoreAcquireProtocolLock ();
Status = CoreValidateHandle (ControllerHandle);
if (EFI_ERROR(Status)) {
CoreReleaseProtocolLock ();
return Status;
}
@ -763,11 +757,10 @@ CoreDisconnectController (
if (ChildHandle != NULL) {
Status = CoreValidateHandle (ChildHandle);
if (EFI_ERROR(Status)) {
CoreReleaseProtocolLock ();
return Status;
}
}
CoreReleaseProtocolLock ();
Handle = ControllerHandle;
//

View File

@ -1002,17 +1002,12 @@ CoreOpenProtocol (
return EFI_INVALID_PARAMETER;
}
//
// Lock the protocol database
//
CoreAcquireProtocolLock ();
//
// Check for invalid UserHandle
//
Status = CoreValidateHandle (UserHandle);
if (EFI_ERROR(Status)) {
goto Done;
return Status;
}
//
@ -1022,32 +1017,31 @@ CoreOpenProtocol (
case EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER :
Status = CoreValidateHandle (ImageHandle);
if (EFI_ERROR(Status)) {
goto Done;
return Status;
}
Status = CoreValidateHandle (ControllerHandle);
if (EFI_ERROR(Status)) {
goto Done;
return Status;
}
if (UserHandle == ControllerHandle) {
Status = EFI_INVALID_PARAMETER;
goto Done;
return EFI_INVALID_PARAMETER;
}
break;
case EFI_OPEN_PROTOCOL_BY_DRIVER :
case EFI_OPEN_PROTOCOL_BY_DRIVER | EFI_OPEN_PROTOCOL_EXCLUSIVE :
Status = CoreValidateHandle (ImageHandle);
if (EFI_ERROR(Status)) {
goto Done;
return Status;
}
Status = CoreValidateHandle (ControllerHandle);
if (EFI_ERROR(Status)) {
goto Done;
return Status;
}
break;
case EFI_OPEN_PROTOCOL_EXCLUSIVE :
Status = CoreValidateHandle (ImageHandle);
if (EFI_ERROR(Status)) {
goto Done;
return Status;
}
break;
case EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL :
@ -1055,14 +1049,13 @@ CoreOpenProtocol (
case EFI_OPEN_PROTOCOL_TEST_PROTOCOL :
break;
default:
Status = EFI_INVALID_PARAMETER;
goto Done;
return EFI_INVALID_PARAMETER;
}
//
// Lock the protocol database
//
//CoreAcquireProtocolLock ();
CoreAcquireProtocolLock ();
//
// Look at each protocol interface for a match
@ -1245,37 +1238,31 @@ CoreCloseProtocol (
LIST_ENTRY *Link;
OPEN_PROTOCOL_DATA *OpenData;
//
// Lock the protocol database
//
CoreAcquireProtocolLock ();
//
// Check for invalid parameters
//
Status = CoreValidateHandle (UserHandle);
if (EFI_ERROR(Status)) {
goto Done;
return Status;
}
Status = CoreValidateHandle (AgentHandle);
if (EFI_ERROR(Status)) {
goto Done;
return Status;
}
if (ControllerHandle != NULL) {
Status = CoreValidateHandle (ControllerHandle);
if (EFI_ERROR(Status)) {
goto Done;
return Status;
}
}
if (Protocol == NULL) {
Status = EFI_INVALID_PARAMETER;
goto Done;
return EFI_INVALID_PARAMETER;
}
//
// Lock the protocol database
//
//CoreAcquireProtocolLock ();
CoreAcquireProtocolLock ();
//
// Look at each protocol interface for a match
@ -1448,6 +1435,12 @@ CoreProtocolsPerHandle (
UINTN ProtocolCount;
EFI_GUID **Buffer;
Status = CoreValidateHandle (UserHandle);
if (EFI_ERROR(Status)) {
return Status;
}
Handle = (IHANDLE *)UserHandle;
if (ProtocolBuffer == NULL) {
return EFI_INVALID_PARAMETER;
@ -1463,14 +1456,6 @@ CoreProtocolsPerHandle (
CoreAcquireProtocolLock ();
Status = CoreValidateHandle (UserHandle);
if (EFI_ERROR(Status)) {
goto Done;
}
Handle = (IHANDLE *)UserHandle;
for (Link = Handle->Protocols.ForwardLink; Link != &Handle->Protocols; Link = Link->ForwardLink) {
ProtocolCount++;
}

View File

@ -242,7 +242,6 @@ CoreReleaseProtocolLock (
/**
Check whether a handle is a valid EFI_HANDLE
The gProtocolDatabaseLock must be owned
@param UserHandle The handle to check

View File

@ -188,22 +188,22 @@ CoreReinstallProtocolInterface (
PROTOCOL_INTERFACE *Prot;
PROTOCOL_ENTRY *ProtEntry;
Status = CoreValidateHandle (UserHandle);
if (EFI_ERROR(Status)) {
return Status;
}
if (Protocol == NULL) {
return EFI_INVALID_PARAMETER;
}
Handle = (IHANDLE *) UserHandle;
//
// Lock the protocol database
//
CoreAcquireProtocolLock ();
Status = CoreValidateHandle (UserHandle);
if (EFI_ERROR (Status)) {
goto Done;
}
Handle = (IHANDLE *) UserHandle;
//
// Check that Protocol exists on UserHandle, and Interface matches the interface in the database
//

View File

@ -6,149 +6,158 @@
#endif
static char data [] =
#define opts_z 1
#define opts ((&data[0]))
"\102"
#define msg1_z 42
#define msg1 ((&data[8]))
"\025\221\071\316\116\233\141\214\057\073\145\044\175\153\330\142"
"\344\163\335\125\225\266\117\250\031\045\015\300\332\253\270\321"
"\325\260\153\204\313\040\236\202\276\075\116\341\130\017\035\360"
"\300\303\375\160\035\054"
#define tst1_z 22
#define tst1 ((&data[56]))
"\106\073\316\334\075\075\326\355\230\335\173\272\221\276\022\334"
"\225\126\100\231\225\313\171\210\315"
#define date_z 1
#define date ((&data[80]))
"\164"
#define shll_z 8
#define shll ((&data[81]))
"\376\235\305\106\162\111\355\220\204\132"
#define chk2_z 19
#define chk2 ((&data[92]))
"\151\150\120\311\004\140\040\025\376\371\155\272\071\270\377\055"
"\374\335\277\375\121\207\332\152"
#define chk1_z 22
#define chk1 ((&data[120]))
"\350\252\061\032\161\203\205\116\325\053\205\276\172\325\300\345"
"\202\320\003\337\054\061\244\177\063\041\252\216\035\046\366"
#define pswd_z 256
#define pswd ((&data[210]))
"\216\220\154\264\217\216\151\017\073\100\150\171\342\245\305\051"
"\162\074\351\377\031\115\321\165\234\223\137\057\240\134\071\314"
"\153\011\262\367\242\134\331\201\325\105\001\311\001\117\162\172"
"\010\111\322\004\151\226\006\145\246\224\020\241\073\125\310\124"
"\023\046\374\061\313\317\363\374\066\161\361\223\323\255\131\231"
"\205\164\340\006\164\045\036\247\303\066\270\235\300\242\161\357"
"\325\015\206\177\152\245\140\116\161\135\011\240\341\371\030\052"
"\174\362\102\104\326\274\060\006\165\344\371\341\235\126\003\326"
"\245\353\327\354\045\161\323\110\010\102\204\347\155\153\145\235"
"\317\154\122\222\101\211\170\141\357\370\212\312\267\164\361\067"
"\250\312\153\325\342\031\174\130\030\253\315\236\236\140\243\071"
"\202\047\065\311\223\312\012\362\023\005\347\052\336\130\165\275"
"\226\312\165\121\112\250\177\060\303\127\257\024\151\252\326\262"
"\176\313\342\374\166\015\123\046\154\350\106\231\004\302\335\332"
"\371\372\372\070\012\017\221\376\030\324\351\372\137\047\370\234"
"\325\316\312\347\223\202\065\142\333\242\353\114\025\026\276\037"
"\220\177\374\053\200\054\365\360\142\131\367\061\337\250\141\363"
"\030\365\152\070\232\020\162\011\235\027\175\367\113\027\364\310"
"\327\037\201\027\301\334\025\225\004\310\201\374\061\303\272\352"
"\026\362\072\205\261\202\000\231\350\343\041\110\277\021\233\164"
"\316\041\302\205\135\350\146\034\067\267\355\050\231\354\003\044"
"\146\070\063\262\241\351\025\065\247\022\165\336\060\364\234\174"
"\064\165\247\132\315\011\222\004\124\346\257\271\036\054\342"
#define inlo_z 3
#define inlo ((&data[513]))
"\157\156\277"
#define xecc_z 15
#define xecc ((&data[518]))
"\027\007\034\073\164\060\077\160\101\353\035\345\071\303\236\016"
"\077\161"
#define lsto_z 1
#define lsto ((&data[534]))
"\232"
#define text_z 907
#define text ((&data[593]))
"\365\122\074\013\064\001\307\213\145\245\031\261\306\313\032\032"
"\261\062\247\215\006\326\245\162\137\326\153\370\100\052\335\006"
"\263\324\061\343\142\217\312\057\076\264\365\007\112\001\334\072"
"\307\057\266\120\010\001\150\040\161\115\256\253\160\330\062\350"
"\330\162\110\231\113\031\227\167\352\027\034\202\114\040\155\057"
"\174\306\022\052\371\275\363\243\246\216\345\166\332\001\343\232"
"\004\232\215\273\063\013\071\261\364\243\067\331\157\110\143\232"
"\143\152\065\305\346\101\000\326\057\241\213\364\321\124\267\310"
"\306\370\117\333\221\146\356\326\313\066\257\074\350\275\135\210"
"\125\276\025\265\151\166\231\201\017\032\355\026\141\164\360\322"
"\072\344\074\222\001\334\114\124\355\233\271\353\006\332\005\214"
"\055\152\132\223\356\177\303\047\241\366\252\233\301\330\241\302"
"\021\361\344\033\326\123\224\275\346\177\170\323\075\076\352\335"
"\231\200\126\021\013\362\153\011\062\357\077\343\040\364\131\007"
"\267\202\315\226\221\145\310\103\142\364\067\125\270\036\043\314"
"\016\367\001\073\233\103\321\271\357\360\063\343\134\300\141\243"
"\236\176\134\013\234\041\004\043\317\217\175\212\213\051\201\125"
"\257\342\222\130\147\061\240\115\340\306\050\063\101\204\350\204"
"\334\315\261\214\325\041\001\172\312\153\224\177\144\153\301\134"
"\220\172\011\306\113\371\366\150\032\251\347\304\173\262\223\174"
"\210\123\157\011\323\367\023\172\172\376\341\320\275\227\066\200"
"\156\007\017\344\035\210\037\042\266\030\101\307\100\311\220\054"
"\322\074\231\045\306\114\130\376\056\232\254\255\206\374\213\066"
"\160\304\103\311\166\211\144\104\317\267\303\020\103\331\026\061"
"\005\306\326\220\031\122\255\016\337\153\257\126\165\032\171\311"
"\276\270\222\176\226\134\111\041\047\166\214\132\130\341\304\315"
"\324\162\377\002\214\045\077\005\014\035\106\122\051\120\027\123"
"\344\174\013\050\324\102\321\203\171\254\017\154\316\170\326\211"
"\202\327\337\040\243\324\207\326\246\033\220\342\040\330\375\106"
"\265\163\251\240\241\234\005\110\357\051\121\113\317\117\376\330"
"\204\055\340\006\006\365\355\045\222\300\077\165\206\253\314\335"
"\373\106\073\334\206\013\353\270\035\372\356\156\060\266\174\074"
"\112\331\316\215\260\104\021\250\050\237\250\231\313\325\066\232"
"\042\350\112\216\054\030\236\063\234\170\324\364\224\273\366\332"
"\366\274\220\035\143\122\273\032\154\031\051\262\125\140\016\345"
"\155\375\205\246\071\373\211\010\173\261\231\361\156\334\133\224"
"\211\060\145\342\342\207\033\324\070\263\001\151\072\022\131\145"
"\015\012\316\247\365\115\314\163\062\035\022\363\102\213\070\222"
"\365\201\235\271\110\343\274\315\357\270\213\007\360\163\024\065"
"\310\263\040\100\233\361\322\241\264\145\333\063\122\141\072\056"
"\226\121\273\222\047\272\262\023\256\276\222\030\003\350\300\227"
"\106\362\110\102\130\370\346\030\322\314\267\244\327\377\347\172"
"\266\044\376\170\024\200\042\072\132\051\331\312\011\355\053\115"
"\224\274\142\007\125\215\035\304\005\216\162\133\377\107\221\063"
"\053\312\310\276\116\371\217\026\045\206\002\353\333\175\144\127"
"\337\331\127\030\321\202\161\170\201\127\303\255\112\035\106\371"
"\212\013\166\311\100\317\113\206\243\235\233\317\234\132\152\266"
"\271\037\140\104\143\000\151\070\056\064\051\260\055\232\117\101"
"\205\071\336\176\313\143\077\112\101\321\231\302\332\034\151\124"
"\021\112\142\044\041\157\357\322\220\165\026\204\037\251\216\244"
"\170\214\027\153\005\032\047\206\042\153\125\325\250\325\126\043"
"\124\001\373\232\344\342\067\201\242\250\200\125\216\075\117\160"
"\100\375\061\111\230\154\337\243\130\116\032\062\071\312\120\004"
"\243\055\116\251\256\343\101\271\164\322\102\050\101\106\145\221"
"\027\151\105\122\132\230\110\310\251\237\173\104\037\030\233\276"
"\066\270\177\161\174\127\274\107\350\204\302\146\212\071\006\137"
"\145\045\264\174\120\015\015\067\125\343\356\323\037\070\026\060"
"\302\234\321\323\264\315\006\325\066\256\135\177\123\233\004\210"
"\077\335\112\275\347\252\316\022\015\064\201\171\361\170\300\122"
"\121\137\275\261\055\251\205\215\254\135\213\143\366\055\317\053"
"\241\013\246\130\066\320\347\134\255\272\370\126\230\306\200\371"
"\300\262\347\020\200\256\062\006\207\071\355\356\141\324\112\024"
"\034\333\217\110\016\036\336\026\024\225\026\320\070\033\063\152"
"\236\325\110\277\154\014\033\261\056\317\223\177\025\146\163\364"
"\261\320\070\056\230\137\243\354\255\161\375\245\150\232\163\233"
"\356\250\165\037\255\072\370\232\210\366\267\212\123\232\117\045"
"\020\046\365\053\145\323\173\031\332\131\176\173\332\202\045\355"
"\116\021\025\215\326\214\123\064\346\100\214\004\302"
#define msg2_z 19
#define msg2 ((&data[1621]))
"\023\233\272\342\336\217\161\370\301\011\222\351\277\302\045\100"
"\257\321\325\321\375"
#define msg2 ((&data[0]))
"\073\057\031\325\140\002\027\264\142\242\317\153\205\200\012\374"
"\200\102\313\260\252\035\025"
#define date_z 1
#define date ((&data[23]))
"\025"
#define tst1_z 22
#define tst1 ((&data[29]))
"\332\322\333\016\217\341\062\141\246\137\012\376\060\323\125\266"
"\200\200\252\212\076\013\316\240\376\200\241"
#define rlax_z 1
#define rlax ((&data[1641]))
"\367"
#define rlax ((&data[51]))
"\373"
#define msg1_z 42
#define msg1 ((&data[62]))
"\012\140\274\102\361\237\127\310\172\114\152\132\057\012\147\254"
"\265\031\350\333\267\210\167\146\336\334\105\061\354\106\032\172"
"\102\154\122\157\302\212\023\075\053\370\217\064\156\253\103\113"
"\002\367\124\075\032\213\351\145\265\155"
#define chk1_z 22
#define chk1 ((&data[112]))
"\144\112\000\347\101\050\266\262\246\042\352\107\007\261\312\166"
"\213\070\312\056\361\205\270\121\037\032\243\216"
#define tst2_z 19
#define tst2 ((&data[1644]))
"\003\037\223\233\335\274\246\150\254\165\113\332\252\000\246\011"
"\201\022\112\001\213\146"/* End of data[] */;
#define tst2 ((&data[140]))
"\354\136\321\236\224\340\222\141\061\041\216\000\103\164\377\207"
"\010\031\123\111\147\144\307"
#define shll_z 8
#define shll ((&data[163]))
"\377\344\012\332\034\152\240\354\112\154"
#define opts_z 1
#define opts ((&data[171]))
"\367"
#define xecc_z 15
#define xecc ((&data[175]))
"\065\050\062\273\057\367\363\125\374\322\373\224\343\275\230\112"
"\001\044\304\047"
#define chk2_z 19
#define chk2 ((&data[192]))
"\257\000\077\207\001\217\251\035\351\267\312\100\063\265\026\076"
"\000\205\373\165\114\067\160"
#define inlo_z 3
#define inlo ((&data[215]))
"\321\141\005"
#define text_z 903
#define text ((&data[359]))
"\260\163\253\150\344\124\111\145\057\122\016\331\256\167\011\243"
"\176\156\307\070\161\341\355\010\066\141\132\024\165\327\362\375"
"\224\272\114\050\000\051\204\361\312\362\127\234\323\066\230\224"
"\353\005\037\103\021\365\144\200\111\023\152\121\241\140\126\363"
"\316\300\176\213\026\361\345\277\004\352\106\222\324\256\074\006"
"\225\147\036\362\106\267\037\016\343\355\256\126\160\002\223\372"
"\223\236\065\140\127\105\264\273\071\363\061\052\167\313\145\260"
"\343\163\174\117\331\351\156\160\360\173\036\232\041\170\032\325"
"\017\145\336\052\166\177\115\300\332\060\165\360\376\352\270\343"
"\272\021\343\233\211\355\343\167\266\171\041\171\264\103\277\212"
"\261\066\314\335\102\170\232\236\332\332\374\305\356\057\377\002"
"\262\134\336\010\371\000\132\371\254\211\215\204\043\273\311\224"
"\067\315\277\157\252\341\375\361\071\004\255\172\073\355\072\115"
"\304\233\144\012\027\225\147\145\217\005\141\104\166\234\241\345"
"\311\317\274\017\162\202\310\224\034\212\144\226\140\005\007\202"
"\131\265\170\305\337\242\214\367\072\104\105\243\026\273\330\056"
"\236\200\364\002\001\163\112\336\106\173\306\353\303\330\374\357"
"\231\265\025\074\154\210\346\066\272\024\046\256\327\017\137\316"
"\307\241\020\057\051\121\037\222\341\270\036\113\325\350\011\011"
"\023\123\234\173\137\117\143\075\141\357\021\125\334\315\371\007"
"\206\037\234\174\312\167\157\104\233\366\045\277\357\023\141\077"
"\244\076\032\122\307\123\131\300\052\237\266\221\231\205\336\171"
"\365\162\015\374\161\254\162\337\201\073\215\026\136\243\074\252"
"\155\134\035\270\314\006\074\135\132\372\024\236\063\010\174\066"
"\175\122\360\015\032\310\206\136\321\260\226\132\102\304\302\073"
"\256\221\240\002\165\127\070\023\247\012\335\162\203\152\230\015"
"\347\165\171\232\260\172\033\070\233\044\276\030\034\374\222\342"
"\012\247\261\130\111\213\265\000\055\063\161\313\130\003\350\360"
"\065\163\127\143\235\042\032\044\261\334\116\016\115\124\120\357"
"\064\201\073\040\266\123\014\116\366\366\242\310\234\004\332\066"
"\142\041\003\131\207\336\275\025\360\055\305\154\066\132\253\275"
"\300\064\360\363\360\342\373\263\375\105\256\172\175\067\217\252"
"\110\254\173\207\210\324\025\043\225\155\301\053\140\014\017\041"
"\010\223\124\316\023\277\016\153\307\314\223\313\206\173\050\042"
"\213\230\366\166\047\345\302\156\142\132\260\342\203\371\063\023"
"\044\170\233\313\363\003\135\325\062\241\300\365\361\343\067\141"
"\342\075\154\234\330\015\033\105\061\345\332\012\050\341\351\151"
"\375\134\252\262\251\252\205\173\242\203\166\141\160\270\322\221"
"\154\270\176\230\374\101\237\115\223\037\302\073\206\137\316\241"
"\051\214\206\237\220\202\114\252\060\256\032\340\040\123\376\256"
"\243\354\120\132\374\164\017\262\366\342\274\240\175\340\355\343"
"\030\260\065\131\161\132\010\062\002\322\115\035\271\204\004\301"
"\260\073\362\176\372\140\245\146\100\157\020\101\005\277\254\227"
"\241\215\220\144\102\262\226\252\027\337\166\073\146\255\051\217"
"\265\011\012\204\054\102\005\057\021\155\133\215\306\125\265\227"
"\323\032\270\020\162\160\330\363\146\254\171\244\340\302\246\375"
"\024\354\373\336\067\204\016\001\360\003\042\033\153\372\007\052"
"\252\163\272\363\331\215\354\303\131\210\077\327\144\245\302\030"
"\166\003\240\254\251\343\233\003\177\211\306\311\056\344\144\016"
"\356\123\375\172\006\000\252\121\272\100\145\145\331\313\023\222"
"\040\205\216\035\051\004\057\145\142\332\370\311\376\235\114\124"
"\161\363\211\074\345\127\324\032\377\141\107\322\332\346\075\360"
"\161\102\345\077\212\225\265\305\117\344\233\023\360\345\026\066"
"\054\000\301\207\067\131\214\072\077\277\202\045\321\031\112\372"
"\012\041\112\225\347\112\306\043\061\022\057\305\231\171\347\110"
"\051\376\355\353\340\134\255\375\354\015\145\275\004\127\370\146"
"\202\141\066\276\316\010\140\123\234\344\107\056\122\326\274\106"
"\262\153\341\105\277\336\342\311\246\231\307\243\263\325\374\235"
"\162\157\152\346\371\220\273\272\225\145\365\217\044\342\374\204"
"\314\300\157\247\360\063\323\376\227\370\272\105\271\260\362\275"
"\060\073\105\175\055\243\275\112\055\055\001\027\155\216\011\366"
"\326\226\353\014\321\162\225\313\021\202\154\130\116\047\071\343"
"\016\007\137\103\244\315\146\056\065\027\201\333\143\174\006\174"
"\352\017\174\266\062\276\176\231\220\105\171\155\137\156\134\015"
"\077\352\165\253\372\211\333\314\072\070\035\222\070\272\347\140"
"\007\333\002\022\042\073\253\064\221\270\255\110\101\140\303\205"
"\005\276\051\351\372\334\277\220\316\272\210\351\130\352\350\110"
"\377\060\325\154\341\042\011\100\221\057\234\344\207\222\056\016"
"\113\146\333\113\224\262\221\034\343\160\013\116\163\173\024\360"
"\177\307\050\116\046\230\024\367\340\221\001\103\036\236\201\154"
"\231\242\370\177\133\207\240\302\043\351\053\060\230\376\017\360"
"\330\030\311\347\123\136\261\243\240\344\123\026\016\366\123\045"
"\147\243\032\220\015\114\225\103\344\362\357\076\150\337\265\346"
"\172\016\034\257\360\222\022\140\365\332\162\016\317\230\074\260"
"\371\064\227\224\124\027\004\343\012\252\347\003\170\016\001\260"
"\032\363\000\336\162\051\131\370\150\104\074\013\073\110\111\341"
"\260\071\177\044\041\027\314\312\221\315\325\154\172\201\175\203"
"\067\143\105\151\005\121\126\107\031\262\065\126\103\356\227\302"
"\141\366\246\267"
#define lsto_z 1
#define lsto ((&data[1470]))
"\171"
#define pswd_z 256
#define pswd ((&data[1516]))
"\217\117\231\075\362\367\141\076\056\125\215\177\102\163\326\351"
"\142\250\147\342\347\132\322\257\104\166\020\337\027\330\317\165"
"\016\330\230\176\023\236\321\312\253\261\106\205\133\064\224\370"
"\277\154\050\130\167\137\031\154\231\336\220\174\317\046\061\046"
"\014\213\375\150\143\145\242\124\053\041\242\037\006\314\050\321"
"\205\327\016\234\212\270\326\231\277\211\164\355\236\211\375\101"
"\255\026\046\375\115\164\325\334\071\112\307\045\313\043\073\012"
"\363\171\141\335\217\244\343\307\352\326\310\374\310\275\232\315"
"\006\200\325\125\224\345\327\223\111\065\211\236\335\164\045\244"
"\024\264\121\345\240\352\177\303\377\357\333\135\175\110\110\055"
"\025\154\227\070\051\015\226\343\150\163\327\151\143\266\136\264"
"\164\045\113\251\152\313\142\306\224\231\377\002\175\305\354\326"
"\352\176\337\315\033\255\347\075\215\007\237\166\215\243\236\027"
"\346\325\346\003\244\070\213\337\000\373\360\226\272\141\054\240"
"\227\310\272\073\302\170\141\166\004\040\157\357\144\315\151\332"
"\361\362\324\363\231\035\025\360\031\160\165\040\121\240\260\372"
"\242\053\325\123\043\061\134\214\153\311\346\270\016\370\162\133"
"\300\312\370\072\046\060\235\150\027\132\160\070\244\222\024\014"
"\073\301\307\263\160\275\362\113\276\377\107\274\366\326\237\127"
"\114\051\330\303\326\221\104\231\153\304\247\144\317\132\152\102"
"\365\360\246\042\101\003\101\130\305\013\020\365\060"/* End of data[] */;
#define hide_z 4096
#define DEBUGEXEC 0 /* Define as 1 to debug execvp calls */
#define TRACEABLE 1 /* Define as 1 to enable ptrace the executable */
@ -353,8 +362,7 @@ char * xsh(int argc, char ** argv)
char * scrpt;
int ret, i, j;
char ** varg;
char * me = getenv("_");
if (me == NULL) { me = argv[0]; }
char * me = argv[0];
stte_0();
key(pswd, pswd_z);

View File

@ -1497,7 +1497,7 @@ MacModel GetDefaultModel()
case CPU_MODEL_HASWELL_ULT:
case CPU_MODEL_CRYSTALWELL:
case CPU_MODEL_BROADWELL_HQ:
DefaultType = MacBookPro111;
DefaultType = MacBookPro114;
break;
case CPU_MODEL_HASWELL_U5: // Broadwell Mobile
if ( gCPUStructure.BrandString.contains("M") ) {
@ -1607,6 +1607,10 @@ MacModel GetDefaultModel()
DefaultType = MacPro41;
break;
case CPU_MODEL_HASWELL_U5:
if ( gConf.GfxPropertiesArray.isCardAtPosIntel(0) ) {
DefaultType = MacMini71;
break;
}
DefaultType = iMac151;
break;
case CPU_MODEL_SKYLAKE_D:

View File

@ -2335,13 +2335,13 @@ XBool setup_gma_devprop(const MacOsVersion& macOSVersion, const XString8& BuildV
}
break;
}
switch (MacModel) {
case MacBook81:
// switch (MacModel) {
// case MacBook81:
//devprop_add_value(device, "AAPL,ig-tcon-scaler", broadwell_hd_vals[0], 4);
break;
default:
break;
}
// break;
// default:
// break;
// }
//devprop_add_value(device, "graphic-options", broadwell_hd_vals[1], 4);
break;
@ -2513,25 +2513,25 @@ XBool setup_gma_devprop(const MacOsVersion& macOSVersion, const XString8& BuildV
}
break;
}
switch (GlobalConfig.IgPlatform) {
case (UINT32)0x19020001:
case (UINT32)0x19120001:
case (UINT32)0x19170001:
case (UINT32)0x19320001:
break;
default:
switch (MacModel) {
case MacBook91:
// switch (GlobalConfig.IgPlatform) {
// case (UINT32)0x19020001:
// case (UINT32)0x19120001:
// case (UINT32)0x19170001:
// case (UINT32)0x19320001:
// break;
// default:
// switch (MacModel) {
// case MacBook91:
//devprop_add_value(device, "AAPL00,PanelCycleDelay", skylake_hd_vals[2], 4);
//devprop_add_value(device, "AAPL00,PanelPowerDown", skylake_hd_vals[3], 4);
//devprop_add_value(device, "AAPL00,PanelPowerOff", skylake_hd_vals[4], 4);
//devprop_add_value(device, "AAPL00,PanelPowerOn", skylake_hd_vals[5], 4);
//devprop_add_value(device, "AAPL00,PanelPowerUp", skylake_hd_vals[6], 4);
//devprop_add_value(device, "graphic-options", skylake_hd_vals[11], 4);
break;
case MacBookPro131:
case MacBookPro132:
case MacBookPro133: // it has only the "graphic-options" value. However, we use built-in graphics.
// break;
// case MacBookPro131:
// case MacBookPro132:
// case MacBookPro133: // it has only the "graphic-options" value. However, we use built-in graphics.
//devprop_add_value(device, "AAPL,Gfx324", skylake_hd_vals[0], 4);
//devprop_add_value(device, "AAPL00,PanelCycleDelay", skylake_hd_vals[2], 4);
//devprop_add_value(device, "AAPL00,PanelPowerDown", skylake_hd_vals[7], 4);
@ -2539,12 +2539,12 @@ XBool setup_gma_devprop(const MacOsVersion& macOSVersion, const XString8& BuildV
//devprop_add_value(device, "AAPL00,PanelPowerOn", skylake_hd_vals[9], 4);
//devprop_add_value(device, "AAPL00,PanelPowerUp", skylake_hd_vals[10], 4);
//devprop_add_value(device, "graphic-options", skylake_hd_vals[11], 4);
break;
default:
break;
}
break;
}
// break;
// default:
// break;
// }
// break;
// }
// if wakes up with an HDMI connected, sometimes this value causes force reboot in 10.14+
if ( macOSVersion.notEmpty() && macOSVersion < MacOsVersion("10.14"_XS8) ) {
@ -2871,24 +2871,24 @@ XBool setup_gma_devprop(const MacOsVersion& macOSVersion, const XString8& BuildV
}
break;
}
switch (GlobalConfig.IgPlatform) {
case (UINT32)0x59120003:
case (UINT32)0x59180002:
break;
default:
switch (MacModel) {
case MacBook101:
case MacBookAir81:
// switch (GlobalConfig.IgPlatform) {
// case (UINT32)0x59120003:
// case (UINT32)0x59180002:
// break;
// default:
// switch (MacModel) {
// case MacBook101:
// case MacBookAir81:
//devprop_add_value(device, "AAPL00,PanelCycleDelay", kabylake_hd_vals[2], 4);
//devprop_add_value(device, "AAPL00,PanelPowerDown", kabylake_hd_vals[3], 4);
//devprop_add_value(device, "AAPL00,PanelPowerOff", kabylake_hd_vals[4], 4);
//devprop_add_value(device, "AAPL00,PanelPowerOn", kabylake_hd_vals[5], 4);
//devprop_add_value(device, "AAPL00,PanelPowerUp", kabylake_hd_vals[6], 4);
//devprop_add_value(device, "graphic-options", kabylake_hd_vals[11], 4);
break;
case MacBookPro141:
case MacBookPro142:
case MacBookPro143: // it has only the "graphic-options" value. However, we use built-in graphics.
// break;
// case MacBookPro141:
// case MacBookPro142:
// case MacBookPro143: // it has only the "graphic-options" value. However, we use built-in graphics.
//devprop_add_value(device, "AAPL,Gfx324", kabylake_hd_vals[0], 4);
//devprop_add_value(device, "AAPL00,PanelCycleDelay", kabylake_hd_vals[2], 4);
//devprop_add_value(device, "AAPL00,PanelPowerDown", kabylake_hd_vals[7], 4);
@ -2896,14 +2896,14 @@ XBool setup_gma_devprop(const MacOsVersion& macOSVersion, const XString8& BuildV
//devprop_add_value(device, "AAPL00,PanelPowerOn", kabylake_hd_vals[9], 4);
//devprop_add_value(device, "AAPL00,PanelPowerUp", kabylake_hd_vals[10], 4);
//devprop_add_value(device, "graphic-options", kabylake_hd_vals[11], 4);
break;
default:
break;
}
break;
}
// break;
// default:
// break;
// }
// break;
// }
// if wakes up with an HDMI connected, somtimes this value causes force reboot in 10.14+
// if wakes up with an HDMI connected, sometimes this value causes force reboot in 10.14+
if ( macOSVersion.notEmpty() && macOSVersion < MacOsVersion("10.14"_XS8)) {
devprop_add_value(device, "AAPL,GfxYTile", kabylake_hd_vals[1], 4);
}

View File

@ -271,9 +271,11 @@ uint32_t GetFwFeatures(MacModel Model)
uint64_t GetExtFwFeatures(MacModel Model)
{
// FirmwareFeatures for 12+
// (Extended)FirmwareFeatures for 12+
switch ( Model )
{
case MacBookPro114:
case MacBookPro115:
case MacBookPro131:
case MacBookPro132:
case MacBookPro141:
@ -282,6 +284,11 @@ uint64_t GetExtFwFeatures(MacModel Model)
case iMac181:
case iMac182:
case iMac183:
case iMac191:
case iMac192:
case iMac201:
case iMac202:
case iMacPro11:
return 0x8FC0FE177ull;
break;
case MacBook91:
@ -298,15 +305,26 @@ uint64_t GetExtFwFeatures(MacModel Model)
case MacBookPro161:
case MacBookAir81:
case MacBookAir82:
case MacBookAir91:
case MacBookPro162:
case MacBookPro163:
case MacBookPro164:
case iMac161:
case iMac162:
case MacMini71:
case MacMini81:
return 0x8FC0FE137ull;
break;
case MacBook61:
case MacBook71:
case MacBook81:
return 0x8FC0FE13Full;
break;
case MacPro61:
return 0x8E80FE177ull;
break;
case MacPro71:
return 0x8FD8FF53Full;
break;
default:
return (uint64_t)GetFwFeatures(Model); //unknown - use oem SMBIOS value to be default
break;