// SPDX-License-Identifier: GPL-2.0 /* * Functions corresponding to sure start object type attributes under * BIOS for use with hp-bioscfg driver * * Copyright (c) 2022 HP Development Company, L.P. */ #include "bioscfg.h" #include <linux/types.h> /* Maximum number of log entries supported when log entry size is 16 * bytes. This value is calculated by dividing 4096 (page size) by * log entry size. */ #define LOG_MAX_ENTRIES … /* * Current Log entry size. This value size will change in the * future. The driver reads a total of 128 bytes for each log entry * provided by BIOS but only the first 16 bytes are used/read. */ #define LOG_ENTRY_SIZE … /* * audit_log_entry_count_show - Reports the number of * existing audit log entries available * to be read */ static ssize_t audit_log_entry_count_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { … } /* * audit_log_entries_show() - Return all entries found in log file */ static ssize_t audit_log_entries_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { … } static struct kobj_attribute sure_start_audit_log_entry_count = …; static struct kobj_attribute sure_start_audit_log_entries = …; static struct attribute *sure_start_attrs[] = …; static const struct attribute_group sure_start_attr_group = …; void hp_exit_sure_start_attributes(void) { … } int hp_populate_sure_start_data(struct kobject *attr_name_kobj) { … }