<commit_before>/*
 * @file opal-dump-parse.h
 *
 * Copyright (C) 2014 IBM Corporation
 */

#ifndef __OPAL_DUMP_PARSE_H
#define __OPAL_DUMP_PARSE_H

#include <stdint.h>
#include <linux/types.h>

/* Error codes */
#define E_SUCCESS	0
#define E_USAGE		-1
#define E_INVALID	-2
#define E_FILE		-3
#define E_OPAL_TABLE	-4
#define E_OPAL_DATA	-5
#define E_SECTION	-6

/* MDST section defination
 *
 * Note:
 *   Any change in OPAL dump MDST structure (adding/removing section)
 *   requires update to this table
 */
#define DUMP_SECTION_DESC	\
	{0, "Unknown"}, \
	{1, "Opal-log"}, \
	{2, "HostBoot-Runtime-log"}

#define MDST_SECTION_DESC_LEN	128

struct mdst_section
{
	int	id;
	char	desc[MDST_SECTION_DESC_LEN];
};

/* MDST structure */
typedef struct _mdsttable
{
	__be64	addr;
	__be32	type; /* DUMP_SECTION_* */
	__be32	size;
} mdst_table;

/*
 * Following section defines dump header structure used to
 * retrieve OPAL dump.
 *
 * Note that we only define structures/macros required to
 * validate/retrieve OPAL dump section.
 */

/* Skiboot signature */
#define SKIBOOT_SIGNATURE              "SkiBoot"
#define SKIBOOT_SIGNATURE_LENGTH        7	/* Excluding NULL */

/* skiboot header size
 * skiboot offset + SKIBOOT_HEADER_SIZE gives actual skiboot start address<commit_msg>opal-dump-parse: Add printk log in the list of dump sections<commit_after>/*
 * @file opal-dump-parse.h
 *
 * Copyright (C) 2014 IBM Corporation
 */

#ifndef __OPAL_DUMP_PARSE_H
#define __OPAL_DUMP_PARSE_H

#include <stdint.h>
#include <linux/types.h>

/* Error codes */
#define E_SUCCESS	0
#define E_USAGE		-1
#define E_INVALID	-2
#define E_FILE		-3
#define E_OPAL_TABLE	-4
#define E_OPAL_DATA	-5
#define E_SECTION	-6

/* MDST section defination
 *
 * Note:
 *   Any change in OPAL dump MDST structure (adding/removing section)
 *   requires update to this table
 */
#define DUMP_SECTION_DESC	\
	{0, "Unknown"}, \
	{1, "Opal-log"}, \
	{2, "HostBoot-Runtime-log"}, \
	{128, "printk"}

#define MDST_SECTION_DESC_LEN	128

struct mdst_section
{
	int	id;
	char	desc[MDST_SECTION_DESC_LEN];
};

/* MDST structure */
typedef struct _mdsttable
{
	__be64	addr;
	__be32	type; /* DUMP_SECTION_* */
	__be32	size;
} mdst_table;

/*
 * Following section defines dump header structure used to
 * retrieve OPAL dump.
 *
 * Note that we only define structures/macros required to
 * validate/retrieve OPAL dump section.
 */

/* Skiboot signature */
#define SKIBOOT_SIGNATURE              "SkiBoot"
#define SKIBOOT_SIGNATURE_LENGTH        7	/* Excluding NULL */

/* skiboot header size
 * skiboot offset + SKIBOOT_HEADER_SIZE gives actual skiboot start address
{'fraction_non_alphanumeric': 0.10470003821169278, 'fraction_numerical': 0.019487963316774933, 'mean_word_length': 3.751361161524501, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4990840', 'n_tokens_mistral': 1006, 'n_tokens_neox': 978, 'n_words': 272}