#include <linux/kobject.h>
#include <linux/string.h>
#include <linux/sysfs.h>
#include <linux/init.h>
#include <linux/stat.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/io.h>
#include <asm/setup.h>
static ssize_t version_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{ … }
static struct kobj_attribute boot_params_version_attr = …;
static ssize_t boot_params_data_read(struct file *fp, struct kobject *kobj,
struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t count)
{ … }
static struct bin_attribute boot_params_data_attr = …;
static struct attribute *boot_params_version_attrs[] = …;
static struct bin_attribute *boot_params_data_attrs[] = …;
static const struct attribute_group boot_params_attr_group = …;
static int kobj_to_setup_data_nr(struct kobject *kobj, int *nr)
{ … }
static int get_setup_data_paddr(int nr, u64 *paddr)
{ … }
static int __init get_setup_data_size(int nr, size_t *size)
{ … }
static ssize_t type_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{ … }
static ssize_t setup_data_data_read(struct file *fp,
struct kobject *kobj,
struct bin_attribute *bin_attr,
char *buf,
loff_t off, size_t count)
{ … }
static struct kobj_attribute type_attr = …;
static struct bin_attribute data_attr __ro_after_init = …;
static struct attribute *setup_data_type_attrs[] = …;
static struct bin_attribute *setup_data_data_attrs[] = …;
static const struct attribute_group setup_data_attr_group = …;
static int __init create_setup_data_node(struct kobject *parent,
struct kobject **kobjp, int nr)
{ … }
static void __init cleanup_setup_data_node(struct kobject *kobj)
{ … }
static int __init get_setup_data_total_num(u64 pa_data, int *nr)
{ … }
static int __init create_setup_data_nodes(struct kobject *parent)
{ … }
static int __init boot_params_ksysfs_init(void)
{ … }
arch_initcall(boot_params_ksysfs_init);