loader/apple.c
EFI_STATUS GetCsrStatus(UINT32 *CsrStatus) {
    UINT32     *ReturnValue = NULL;
    UINTN      CsrLength;
    EFI_GUID   CsrGuid = CSR_GUID;
    EFI_STATUS Status = EFI_INVALID_PARAMETER;

    if (CsrStatus) {
        Status = EfivarGetRaw(&CsrGuid, L"csr-active-config", (CHAR8**) &ReturnValue, &CsrLength);
        if (Status == EFI_SUCCESS) {
            if (CsrLength == 4) {
                *CsrStatus = *ReturnValue;
            } else {
                Status = EFI_BAD_BUFFER_SIZE;
                SPrint(gCsrStatus, 255, L" Unknown System Integrity Protection version");
            }
            MyFreePool(ReturnValue);
        } else if ((Status == EFI_NOT_FOUND) && (StriSubCmp(L"Apple", ST->FirmwareVendor))) {
            *CsrStatus = SIP_ENABLED;
            Status = EFI_SUCCESS;
        } // if (Status == EFI_SUCCESS)
    } // if (CsrStatus)
    return Status;
}
// Get CSR (Apple's System Integrity Protection [SIP], or "rootless") status
// information. If the variable is not present and the firmware is Apple, fake
// it and claim it's enabled, since that's how OS X 10.11 treats a system with
// the variable absent.
Get CSR (Apple's System Integrity Protection [SIP], or "rootless") status
information. If the variable is not present and the firmware is Apple, fake
it and claim it's enabled, since that's how OS X 10.11 treats a system with
the variable absent.
Get CSR ( Apple ' s System Integrity Protection [ SIP ] or " rootless " ) status information . If the variable is not present and the firmware is Apple fake it and claim it ' s enabled since that ' s how OS X 10 . 11 treats a system with the variable absent .
EFI_STATUS GetCsrStatus(UINT32 *CsrStatus) {
    UINT32     *ReturnValue = NULL;
    UINTN      CsrLength;
    EFI_GUID   CsrGuid = CSR_GUID;
    EFI_STATUS Status = EFI_INVALID_PARAMETER;
    if (CsrStatus) {
        Status = EfivarGetRaw(&CsrGuid, L"csr-active-config", (CHAR8**) &ReturnValue, &CsrLength);
        if (Status == EFI_SUCCESS) {
            if (CsrLength == 4) {
                *CsrStatus = *ReturnValue;
            } else {
                Status = EFI_BAD_BUFFER_SIZE;
                SPrint(gCsrStatus, 255, L" Unknown System Integrity Protection version");
            }
            MyFreePool(ReturnValue);
        } else if ((Status == EFI_NOT_FOUND) && (StriSubCmp(L"Apple", ST->FirmwareVendor))) {
            *CsrStatus = SIP_ENABLED;
            Status = EFI_SUCCESS;
        } 
    } 
    return Status;
}
EFI_STATUS GetCsrStatus ( UINT32 * CsrStatus ) { UINT32 * ReturnValue = NULL ; UINTN CsrLength ; EFI_GUID CsrGuid = CSR_GUID ; EFI_STATUS Status = EFI_INVALID_PARAMETER ; if ( CsrStatus ) { Status = EfivarGetRaw ( & CsrGuid , L" " , ( CHAR8 * * ) & ReturnValue , & CsrLength ) ; if ( Status == EFI_SUCCESS ) { if ( CsrLength == 4 ) { * CsrStatus = * ReturnValue ; } else { Status = EFI_BAD_BUFFER_SIZE ; SPrint ( gCsrStatus , 255 , L" " ) ; } MyFreePool ( ReturnValue ) ; } else if ( ( Status == EFI_NOT_FOUND ) && ( StriSubCmp ( L" " , ST -> FirmwareVendor ) ) ) { * CsrStatus = SIP_ENABLED ; Status = EFI_SUCCESS ; } } return Status ; }
Get CSR (Apple's System Integrity Protection [SIP], or "rootless") status
information.
Get CSR ( Apple ' s System Integrity Protection [ SIP ] or " rootless " ) status information .
// if (Status == EFI_SUCCESS) // if (CsrStatus)