xref: /aosp_15_r20/external/vboot_reference/tests/tpm_lite/lock.c (revision 8617a60d3594060b7ecbd21bc622a7c14f3cf2bc)
1 /* Copyright 2010 The ChromiumOS Authors
2  * Use of this source code is governed by a BSD-style license that can be
3  * found in the LICENSE file.
4  */
5 
6 /* Test of locking, to see if locks count as writes.  (They should.)
7  */
8 
9 #include <stdio.h>
10 #include <stdlib.h>
11 
12 #include "tlcl.h"
13 
14 #define INDEX0 0xda70
15 
16 
main(int argc,char ** argv)17 int main(int argc, char** argv) {
18 	TlclLibInit();
19 
20 	TlclStartup();
21 	TlclSelfTestFull();
22 
23 	TlclAssertPhysicalPresence();
24 
25 	TlclWriteLock(INDEX0);
26 
27 	printf("Locked %#x\n", INDEX0);
28 	exit(0);
29 }
30