<commit_before>/**
 * @file
 *
 * @brief
 *
 * @date 10.11.10
 * @author <NAME>
 */

#include <string.h> /* for memcpy */
#include <asm/multiboot.h>
#include <kernel/printk.h>
#include <kernel/panic.h>

/* Check if the bit BIT in FLAGS is set. */
#define CHECK_FLAG(flags, bit) ((flags) & (1 << (bit)))

static struct multiboot_info multiboot_info;

void multiboot_save_info(unsigned long magic, struct multiboot_info *mbi) {
	void *dst = &multiboot_info;
	void *src = mbi;
	size_t size = sizeof(struct multiboot_info);

	if (magic != MULTIBOOT_BOOTLOADER_MAGIC) {
		panic("Invalid magic number: 0x%x\n", (unsigned) magic);
		return;
	}

	memcpy(dst, src, size);

	if(multiboot_info.flags & MULTIBOOT_INFO_VIDEO_INFO) {
		/* setup video mode */
	}
}

/**
 * Check if MAGIC is valid and print the Multiboot information structure
 * pointed by ADDR.
 */<commit_msg>oops (arch/x86 reverted after 1732a6b)<commit_after>/**
 * @file
 *
 * @brief
 *
 * @date 10.11.10
 * @author <NAME>
 */

#include <asm/multiboot.h>
#include <kernel/printk.h>
#include <kernel/panic.h>

/* Check if the bit BIT in FLAGS is set. */
#define CHECK_FLAG(flags, bit) ((flags) & (1 << (bit)))

static struct multiboot_info *multiboot_info;

void multiboot_save_info(unsigned long magic, struct multiboot_info *mbi) {
	if (magic != MULTIBOOT_BOOTLOADER_MAGIC) {
		panic("Invalid magic number: 0x%x\n", (unsigned) magic);
		return;
	}

	multiboot_info = mbi;

	if(multiboot_info->flags & MULTIBOOT_INFO_VIDEO_INFO) {
		/* setup video mode */
	}
}

/**
 * Check if MAGIC is valid and print the Multiboot information structure
 * pointed by ADDR.
 */
{'fraction_non_alphanumeric': 0.14268066707844348, 'fraction_numerical': 0.014206300185299567, 'mean_word_length': 4.09433962264151, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 13, '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': '1980794', 'n_tokens_mistral': 643, 'n_tokens_neox': 613, 'n_words': 159}