boot.h (fa97bdf92709adaaf8b9a5164a895e262a4fcf60) | boot.h (f4ed2877b16e8146427306aea8819adac5c88374) |
---|---|
1/* -*- linux-c -*- ------------------------------------------------------- * 2 * 3 * Copyright (C) 1991, 1992 Linus Torvalds 4 * Copyright 2007 rPath, Inc. - All Rights Reserved 5 * Copyright 2009 Intel Corporation; author H. Peter Anvin 6 * 7 * This file is part of the Linux kernel, and is made available under 8 * the terms of the GNU General Public License version 2. --- 186 unchanged lines hidden (view full) --- 195static inline int memcmp_gs(const void *s1, addr_t s2, size_t len) 196{ 197 u8 diff; 198 asm volatile("gs; repe; cmpsb; setnz %0" 199 : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len)); 200 return diff; 201} 202 | 1/* -*- linux-c -*- ------------------------------------------------------- * 2 * 3 * Copyright (C) 1991, 1992 Linus Torvalds 4 * Copyright 2007 rPath, Inc. - All Rights Reserved 5 * Copyright 2009 Intel Corporation; author H. Peter Anvin 6 * 7 * This file is part of the Linux kernel, and is made available under 8 * the terms of the GNU General Public License version 2. --- 186 unchanged lines hidden (view full) --- 195static inline int memcmp_gs(const void *s1, addr_t s2, size_t len) 196{ 197 u8 diff; 198 asm volatile("gs; repe; cmpsb; setnz %0" 199 : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len)); 200 return diff; 201} 202 |
203static inline int isdigit(int ch) 204{ 205 return (ch >= '0') && (ch <= '9'); 206} | 203#include "isdigit.h" |
207 | 204 |
208static inline int isxdigit(int ch) 209{ 210 if (isdigit(ch)) 211 return true; 212 213 if ((ch >= 'a') && (ch <= 'f')) 214 return true; 215 216 return (ch >= 'A') && (ch <= 'F'); 217} 218 | |
219/* Heap -- available for dynamic lists. */ 220extern char _end[]; 221extern char *HEAP; 222extern char *heap_end; 223#define RESET_HEAP() ((void *)( HEAP = _end )) 224static inline char *__get_heap(size_t s, size_t a, size_t n) 225{ 226 char *tmp; --- 68 unchanged lines hidden (view full) --- 295 u8 cl, ch, ecx2, ecx3; 296 u8 al, ah, eax2, eax3; 297 }; 298 }; 299}; 300void intcall(u8 int_no, const struct biosregs *ireg, struct biosregs *oreg); 301 302/* cmdline.c */ | 205/* Heap -- available for dynamic lists. */ 206extern char _end[]; 207extern char *HEAP; 208extern char *heap_end; 209#define RESET_HEAP() ((void *)( HEAP = _end )) 210static inline char *__get_heap(size_t s, size_t a, size_t n) 211{ 212 char *tmp; --- 68 unchanged lines hidden (view full) --- 281 u8 cl, ch, ecx2, ecx3; 282 u8 al, ah, eax2, eax3; 283 }; 284 }; 285}; 286void intcall(u8 int_no, const struct biosregs *ireg, struct biosregs *oreg); 287 288/* cmdline.c */ |
303int cmdline_find_option(const char *option, char *buffer, int bufsize); 304int cmdline_find_option_bool(const char *option); | 289int __cmdline_find_option(u32 cmdline_ptr, const char *option, char *buffer, int bufsize); 290int __cmdline_find_option_bool(u32 cmdline_ptr, const char *option); 291static inline int cmdline_find_option(const char *option, char *buffer, int bufsize) 292{ 293 return __cmdline_find_option(boot_params.hdr.cmd_line_ptr, option, buffer, bufsize); 294} |
305 | 295 |
296static inline int cmdline_find_option_bool(const char *option) 297{ 298 return __cmdline_find_option_bool(boot_params.hdr.cmd_line_ptr, option); 299} 300 301 |
|
306/* cpu.c, cpucheck.c */ 307struct cpu_features { 308 int level; /* Family, or 64 for x86-64 */ 309 int model; 310 u32 flags[NCAPINTS]; 311}; 312extern struct cpu_features cpu; 313int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr); 314int validate_cpu(void); 315 | 302/* cpu.c, cpucheck.c */ 303struct cpu_features { 304 int level; /* Family, or 64 for x86-64 */ 305 int model; 306 u32 flags[NCAPINTS]; 307}; 308extern struct cpu_features cpu; 309int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr); 310int validate_cpu(void); 311 |
312/* early_serial_console.c */ 313extern int early_serial_base; 314void console_init(void); 315 |
|
316/* edd.c */ 317void query_edd(void); 318 319/* header.S */ 320void __attribute__((noreturn)) die(void); 321 322/* mca.c */ 323int query_mca(void); --- 19 unchanged lines hidden (view full) --- 343/* string.c */ 344int strcmp(const char *str1, const char *str2); 345int strncmp(const char *cs, const char *ct, size_t count); 346size_t strnlen(const char *s, size_t maxlen); 347unsigned int atou(const char *s); 348unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base); 349 350/* tty.c */ | 316/* edd.c */ 317void query_edd(void); 318 319/* header.S */ 320void __attribute__((noreturn)) die(void); 321 322/* mca.c */ 323int query_mca(void); --- 19 unchanged lines hidden (view full) --- 343/* string.c */ 344int strcmp(const char *str1, const char *str2); 345int strncmp(const char *cs, const char *ct, size_t count); 346size_t strnlen(const char *s, size_t maxlen); 347unsigned int atou(const char *s); 348unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base); 349 350/* tty.c */ |
351void console_init(void); | |
352void puts(const char *); 353void putchar(int); 354int getchar(void); 355void kbd_flush(void); 356int getchar_timeout(void); 357 358/* video.c */ 359void set_video(void); --- 12 unchanged lines hidden --- | 351void puts(const char *); 352void putchar(int); 353int getchar(void); 354void kbd_flush(void); 355int getchar_timeout(void); 356 357/* video.c */ 358void set_video(void); --- 12 unchanged lines hidden --- |