embed AppleKeyAggregator

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2022-08-18 19:27:04 +03:00
parent 616dbbe140
commit a65f244b2a
7 changed files with 1239 additions and 1386 deletions

View File

@ -775,7 +775,7 @@
#Protocols/AppleImageCodec/AppleImageCodec.inf
#Protocols/AppleUITheme/AppleUITheme.inf
Protocols/HashServiceFix/HashServiceFix.inf
Protocols/AppleKeyAggregator/AppleKeyAggregator.inf
#Protocols/AppleKeyAggregator/AppleKeyAggregator.inf
Protocols/AppleKeyFeeder/AppleKeyFeeder.inf
Protocols/AptioInputFix/AptioInputFix.inf

File diff suppressed because it is too large Load Diff

@ -1 +1 @@
Subproject commit ac03fdb3174877a17da5b3834104bd5034eea0c8
Subproject commit c3b81619a9dd9e1cfcf7b85f2f3107c6517840ea

View File

@ -17,9 +17,6 @@
#include <Library/DebugLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/AppleKeyState.h>
#include <Protocol/AppleKeyMapDatabase.h>
#include <Protocol/AppleEvent.h>
#include "AppleKeyAggregator.h"
extern EFI_GUID gAppleEventProtocolGuid;
@ -380,12 +377,16 @@ SearchKeyStroke (APPLE_KEY_STATE_PROTOCOL* This,
@retval EFI_SUCCESS The entry point is executed successfully.
@retval EFI_ALREADY_STARTED The protocol has already been installed.
**/
#if SEP_AGGREG
EFI_STATUS
EFIAPI
AggregatorEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
) // start
#else
EFI_STATUS InstallAggregator()
#endif
{
EFI_STATUS Status;
@ -432,11 +433,7 @@ AggregatorEntryPoint (
&mAppleEventProtocol,
NULL
);
/*
if (!EFI_ERROR(Status)) {
Status = gBS->InstallProtocolInterface(ImageHandle, &gAppleEventProtocolGuid, EFI_NATIVE_INTERFACE, &mAppleEventProtocol);
}
*/
}
return Status;

View File

@ -9,6 +9,11 @@
#ifndef _AppleKeyMapAggregator_h
#define _AppleKeyMapAggregator_h
#include <Protocol/AppleKeyState.h>
#include <Protocol/AppleKeyMapDatabase.h>
#include <Protocol/AppleEvent.h>
#define APPLE_KEY_MAP_PROTOCOLS_REVISION 0x010000
#define APPLE_KEY_MAP_AGGREGATOR_SIGNATURE SIGNATURE_32 ('K', 'e', 'y', 'A')
@ -76,6 +81,6 @@ typedef struct {
APPLE_KEY_STATE_PROTOCOL AggregatorProtocol; ///<0x50 size=8*3
} APPLE_KEY_MAP_AGGREGATOR; //size=0x68
EFI_STATUS InstallAggregator();
#endif

View File

@ -29,6 +29,9 @@
#include <Protocol/AppleSMC.h>
#include <Protocol/AppleSystemInfo.h>
#include <Protocol/AppleImageCodecProtocol.h>
extern "C" {
#include "../../Protocols/AppleKeyAggregator/AppleKeyAggregator.h"
}
#ifndef DEBUG_ALL
#define DEBUG_PRO 1
@ -434,6 +437,12 @@ SetPrivateVarProto(void)
DBG("AppleImageCodec: error installing protocol, Status = %s\n", efiStrError(Status));
}
Status = InstallAggregator();
if (EFI_ERROR(Status)) {
DBG("AppleKeyAggregator: error installing protocol, Status = %s\n", efiStrError(Status));
}
//obligatory protocol
Status = gBS->InstallProtocolInterface (&gImageHandle,
&gEfiDevicePathPropertyDatabaseProtocolGuid,

View File

@ -397,6 +397,8 @@
Settings/SelfOem.h
../Protocols/FirmwareVolume/FirmwareVolume.c
../Protocols/SMCHelper/SMCHelper.c
../Protocols/AppleKeyAggregator/AppleKeyAggregator.h
../Protocols/AppleKeyAggregator/AppleKeyAggregator.c
[Sources.IA32]
PlatformIA32/ftol.asm | MSFT
@ -536,6 +538,8 @@
gAppleSMCProtocolGuid ## PRODUCES and CONSUMES
gAppleSMCStateProtocolGuid ## PRODUCES and CONSUMES
gAppleSystemInfoProtocolGuid
gAppleKeyStateProtocolGuid
gAppleKeyMapDatabaseProtocolGuid
gFSInjectProtocolGuid
gMsgLogProtocolGuid