Introduce a simple test for Platform Firmware Runtime Update and Telemetry
drivers. It is based on ioctl to either update firmware driver or code injection,
and read corresponding PFRU Telemetry log into user space.
+}
+
+int main(int argc, char *argv[])
+{
+ int fd_update, fd_log, fd_capsule;
+ struct telem_data_info data_info;
+ struct telem_info info;
+ struct update_cap_info cap;
+ void *addr_map_capsule;
+ struct stat st;
+ char *log_buf;
+ int ret = 0;
+
+ parse_options(argc, argv);
+
+ fd_log = open("/dev/pfru/telemetry", O_RDWR);
+ if (fd_log < 0) {
+ perror("Cannot open telemetry device...");
+ return 1;
+ }
+ fd_update = open("/dev/pfru/update", O_RDWR);
+ if (fd_update < 0) {
+ perror("Cannot open code injection device...");
+ return 1;
+ }
+