Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
boot.h File Reference
#include <stdarg.h>
#include <linux/types.h>
#include <linux/edd.h>
#include <asm/boot.h>
#include <asm/setup.h>
#include "bitops.h"
#include <asm/cpufeature.h>
#include <asm/processor-flags.h>
#include "ctype.h"

Go to the source code of this file.

Data Structures

struct  biosregs
 
struct  cpu_features
 

Macros

#define STACK_SIZE   512 /* Minimum number of bytes for stack */
 
#define BUILD_BUG_ON(condition)   ((void)sizeof(char[1 - 2*!!(condition)]))
 
#define ARRAY_SIZE(x)   (sizeof(x) / sizeof(*(x)))
 
#define cpu_relax()   asm volatile("rep; nop")
 
#define RESET_HEAP()   ((void *)( HEAP = _end ))
 
#define GET_HEAP(type, n)   ((type *)__get_heap(sizeof(type),__alignof__(type),(n)))
 
#define memcpy(d, s, l)   __builtin_memcpy(d,s,l)
 
#define memset(d, c, l)   __builtin_memset(d,c,l)
 

Typedefs

typedef unsigned int addr_t
 

Functions

void copy_to_fs (addr_t dst, void *src, size_t len)
 
voidcopy_from_fs (void *dst, addr_t src, size_t len)
 
void copy_to_gs (addr_t dst, void *src, size_t len)
 
voidcopy_from_gs (void *dst, addr_t src, size_t len)
 
voidmemcpy (void *dst, void *src, size_t len)
 
voidmemset (void *dst, int c, size_t len)
 
int enable_a20 (void)
 
int query_apm_bios (void)
 
void intcall (u8 int_no, const struct biosregs *ireg, struct biosregs *oreg)
 
int __cmdline_find_option (u32 cmdline_ptr, const char *option, char *buffer, int bufsize)
 
int __cmdline_find_option_bool (u32 cmdline_ptr, const char *option)
 
int check_cpu (int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr)
 
int validate_cpu (void)
 
void console_init (void)
 
void query_edd (void)
 
void __attribute__ ((noreturn)) die(void)
 
int query_mca (void)
 
int detect_memory (void)
 
int sprintf (char *buf, const char *fmt,...)
 
int vsprintf (char *buf, const char *fmt, va_list args)
 
int printf (const char *fmt,...)
 
void initregs (struct biosregs *regs)
 
int strcmp (const char *str1, const char *str2)
 
int strncmp (const char *cs, const char *ct, size_t count)
 
size_t strnlen (const char *s, size_t maxlen)
 
unsigned int atou (const char *s)
 
unsigned long long simple_strtoull (const char *cp, char **endp, unsigned int base)
 
void puts (const char *)
 
void putchar (int)
 
int getchar (void)
 
void kbd_flush (void)
 
int getchar_timeout (void)
 
void set_video (void)
 
int set_mode (u16 mode)
 
int mode_defined (u16 mode)
 
void probe_cards (int unsafe)
 
void vesa_store_edid (void)
 

Variables

struct setup_header hdr
 
struct boot_params boot_params
 
char _end []
 
charHEAP
 
charheap_end
 
struct cpu_features cpu
 
int early_serial_base
 
void u32 bootparams
 

Macro Definition Documentation

#define ARRAY_SIZE (   x)    (sizeof(x) / sizeof(*(x)))

Definition at line 36 of file boot.h.

#define BUILD_BUG_ON (   condition)    ((void)sizeof(char[1 - 2*!!(condition)]))

Definition at line 34 of file boot.h.

#define cpu_relax (   void)    asm volatile("rep; nop")

Definition at line 41 of file boot.h.

#define GET_HEAP (   type,
  n 
)    ((type *)__get_heap(sizeof(type),__alignof__(type),(n)))

Definition at line 218 of file boot.h.

#define memcpy (   d,
  s,
  l 
)    __builtin_memcpy(d,s,l)

Definition at line 235 of file boot.h.

#define memset (   d,
  c,
  l 
)    __builtin_memset(d,c,l)

Definition at line 236 of file boot.h.

#define RESET_HEAP ( )    ((void *)( HEAP = _end ))

Definition at line 208 of file boot.h.

#define STACK_SIZE   512 /* Minimum number of bytes for stack */

Definition at line 19 of file boot.h.

Typedef Documentation

typedef unsigned int addr_t

Definition at line 114 of file boot.h.

Function Documentation

int __cmdline_find_option ( u32  cmdline_ptr,
const char option,
char buffer,
int  bufsize 
)

Definition at line 30 of file cmdline.c.

int __cmdline_find_option_bool ( u32  cmdline_ptr,
const char option 
)

Definition at line 102 of file cmdline.c.

unsigned int atou ( const char s)

Definition at line 60 of file string.c.

int check_cpu ( int cpu_level_ptr,
int req_level_ptr,
u32 **  err_flags_ptr 
)

Definition at line 180 of file cpucheck.c.

void console_init ( void  )

Definition at line 145 of file early_serial_console.c.

void* copy_from_fs ( void dst,
addr_t  src,
size_t  len 
)
void* copy_from_gs ( void dst,
addr_t  src,
size_t  len 
)
void copy_to_fs ( addr_t  dst,
void src,
size_t  len 
)
void copy_to_gs ( addr_t  dst,
void src,
size_t  len 
)
int detect_memory ( void  )

Definition at line 122 of file memory.c.

int enable_a20 ( void  )

Definition at line 130 of file a20.c.

int getchar ( void  )

Definition at line 88 of file tty.c.

int getchar_timeout ( void  )

Definition at line 119 of file tty.c.

void initregs ( struct biosregs regs)

Definition at line 21 of file regs.c.

void intcall ( u8  int_no,
const struct biosregs ireg,
struct biosregs oreg 
)
void kbd_flush ( void  )

Definition at line 110 of file tty.c.

void* memcpy ( void dst,
void src,
size_t  len 
)
void* memset ( void s,
int  c,
size_t  count 
)

memset - Fill a region of memory with the given value : Pointer to the start of the area. : The byte to fill the area with : The size of the area.

Do not use memset() to access IO space, use memset_io() instead.

Definition at line 116 of file string.c.

int mode_defined ( u16  mode)

Definition at line 54 of file video-mode.c.

int printf ( const char fmt,
  ... 
)

Definition at line 323 of file stdio.c.

void probe_cards ( int  unsafe)

Definition at line 33 of file video-mode.c.

void putchar ( int  )
void puts ( const char )

Definition at line 95 of file misc.c.

int query_apm_bios ( void  )

Definition at line 21 of file apm.c.

void query_edd ( void  )
int query_mca ( void  )

Definition at line 18 of file mca.c.

int set_mode ( u16  mode)

Definition at line 147 of file video-mode.c.

void set_video ( void  )

Definition at line 315 of file video.c.

unsigned long long simple_strtoull ( const char cp,
char **  endp,
unsigned int  base 
)

simple_strtoull - convert a string to an unsigned long long : The start of the string : A pointer to the end of the parsed string will be placed here : The number base to use

Definition at line 90 of file string.c.

int sprintf ( char buf,
const char fmt,
  ... 
)

sprintf - Format a string and place it in a buffer : The buffer to place the result into : The format string to use ..: Arguments for the format string

The function returns the number of characters written into . Use snprintf() or scnprintf() in order to avoid buffer overflows.

See the vsnprintf() documentation for format string extensions over C99.

Definition at line 309 of file stdio.c.

int strcmp ( const char cs,
const char ct 
)

strcmp - Compare two strings : One string : Another string

returns 0 if and are equal, < 0 if is less than > 0 if is greater than

strcmp - Compare two strings : One string : Another string

Definition at line 81 of file string.c.

int strncmp ( const char cs,
const char ct,
size_t  count 
)

strncmp - Compare two length-limited strings : One string : Another string : The maximum number of bytes to compare

Definition at line 33 of file string.c.

size_t strnlen ( const char s,
size_t  count 
)

strnlen - Find the length of a length-limited string : The string to be sized
: The maximum number of bytes to search

returns the minimum of the length of and

strnlen - Find the length of a length-limited string : The string to be sized : The maximum number of bytes to search

Definition at line 15 of file stdio.c.

int validate_cpu ( void  )

Definition at line 35 of file cpu.c.

void vesa_store_edid ( void  )

Definition at line 237 of file video-vesa.c.

int vsprintf ( char buf,
const char fmt,
va_list  args 
)

vsprintf - Format a string and place it in a buffer : The buffer to place the result into : The format string to use : Arguments for the format string

The function returns the number of characters written into . Use vsnprintf() or vscnprintf() in order to avoid buffer overflows.

If you're not already dealing with a va_list consider using sprintf().

See the vsnprintf() documentation for format string extensions over C99.

Definition at line 126 of file stdio.c.

Variable Documentation

char _end[]

Definition at line 147 of file setup.c.

void u32 bootparams

Definition at line 332 of file boot.h.

Definition at line 46 of file kvm_host.h.

int early_serial_base

Definition at line 18 of file tty.c.

Definition at line 35 of file hvsi.h.

char* HEAP

Definition at line 20 of file main.c.

char* heap_end

Definition at line 21 of file main.c.