mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 10:14:55 +00:00
With this change, the kernel signature is a part of the preamble block (and therefore, used during preamble signature verification). BUG=670 TEST=image verification tests still pass. corrected splicing test expectations (and it passes). Review URL: http://codereview.chromium.org/2292001
57 lines
1.2 KiB
C
57 lines
1.2 KiB
C
#include <stdio.h>
|
|
|
|
#include "firmware_image_fw.h"
|
|
#include "kernel_image_fw.h"
|
|
#include "load_kernel_fw.h"
|
|
#include "rollback_index.h"
|
|
#include "tlcl.h"
|
|
|
|
int main(void)
|
|
{
|
|
|
|
// firmware_image_fw.h
|
|
VerifyFirmwareHeader(0, 0, 0, 0);
|
|
VerifyFirmwarePreamble(0, 0, 0, 0);
|
|
VerifyFirmwareData(0, 0, 0, 0, 0);
|
|
VerifyFirmware(0, 0, 0);
|
|
GetLogicalFirmwareVersion(0);
|
|
VerifyFirmwareDriver_f(0, 0, 0, 0, 0);
|
|
|
|
// kernel_image_fw.h
|
|
VerifyKernelKeyHeader(0, 0, 0, 0, 0, 0);
|
|
VerifyKernelPreamble(0, 0, 0, 0);
|
|
VerifyKernelData(0, 0, 0, 0, 0);
|
|
VerifyKernelHeader(0, 0, 0, 0, 0, 0, 0);
|
|
VerifyKernel(0, 0, 0);
|
|
GetLogicalKernelVersion(0);
|
|
VerifyKernelDriver_f(0, 0, 0, 0);
|
|
|
|
// load_kernel_fw.h
|
|
// FIXME: LoadKernel(0);
|
|
|
|
// rollback_index.h
|
|
SetupTPM();
|
|
GetStoredVersion(0);
|
|
WriteStoredVersion(0, 0);
|
|
LockStoredVersion(0);
|
|
|
|
// tlcl.h
|
|
TlclLibinit();
|
|
TlclStartup();
|
|
TlclSelftestfull();
|
|
TlclDefineSpace(0, 0, 0);
|
|
TlclWrite(0, 0, 0);
|
|
TlclRead(0, 0, 0);
|
|
TlclWriteLock(0);
|
|
TlclReadLock(0);
|
|
TlclAssertPhysicalPresence();
|
|
TlclSetNvLocked();
|
|
TlclIsOwned();
|
|
TlclForceClear();
|
|
TlclPhysicalEnable();
|
|
TlclPhysicalSetDeactivated(0);
|
|
TlclGetFlags(0, 0);
|
|
|
|
return 0;
|
|
}
|