/* Set/clear local enable bit */
dr7 &= ~( 0x3 << 2 * regnum );
- dr7 |= bp->enabled << 2 * regnum;
+ dr7 |= bp->enabled << 2 * regnum;
}
int gdbmach_set_breakpoint ( int type, unsigned long addr, size_t len, int enable ) {
struct hwbp *bp;
-
+
/* Check and convert breakpoint type to x86 type */
switch ( type ) {
case GDBMACH_WATCH:
int status;
for (;;) {
status = uart_readb(UART_BASE + UART_LSR);
- if (status & UART_LSR_THRE) {
+ if (status & UART_LSR_THRE) {
/* TX buffer emtpy */
uart_writeb(ch, UART_BASE + UART_TBR);
break;
goto out;
}
uart_writeb(lcs, UART_BASE + UART_LCR);
-
+
/* disable interrupts */
uart_writeb(0x0, UART_BASE + UART_IER);
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2006-2009 Erwan Velu - All Rights Reserved
*
* Portions of this file taken from the Linux kernel,
"Board is replaceable",
"Board is hot swappable" /* 4 */
};
-
else
sprintf(error,"%u%%", code);
}
-
"Function key-initiated network boot is supported",
"Targeted content distribution is supported" /* 2 */
};
-
ipmi->base_address = QWORD(p);
}
}
-
else
sprintf(speed,"%u MHz", code);
}
-
"IA64 (IA64 capabilities)", /* 30 */
"PBE (Pending break enabled)" /* 31 */
};
-
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2002-2009 H. Peter Anvin - All Rights Reserved
* Copyright 2009 Intel Corporation; author: H. Peter Anvin
*
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
static inline __constfunc bool cpu_has_eflag(uint32_t flag)
{
uint32_t f1, f2;
-
+
asm("pushfl\n\t"
"pushfl\n\t"
"popl %0\n\t"
"popfl\n\t"
: "=&r" (f1), "=&r" (f2)
: "ir" (flag));
-
+
return ((f1^f2) & flag) != 0;
}
#include <inttypes.h>
#include <sys/io.h>
-#define MAX_PCI_FUNC 8
-#define MAX_PCI_DEVICES 32
-#define MAX_PCI_BUSES 256
+#define MAX_PCI_FUNC 8
+#define MAX_PCI_DEVICES 32
+#define MAX_PCI_BUSES 256
#define LINUX_KERNEL_MODULE_SIZE 64
-#define PCI_VENDOR_NAME_SIZE 256
-#define PCI_PRODUCT_NAME_SIZE 256
-#define PCI_CLASS_NAME_SIZE 256
+#define PCI_VENDOR_NAME_SIZE 256
+#define PCI_PRODUCT_NAME_SIZE 256
+#define PCI_CLASS_NAME_SIZE 256
#define MAX_KERNEL_MODULES_PER_PCI_DEVICE 10
#define MAX_PCI_CLASSES 256
}
#endif /* _SYSLINUX_KEYBOARD_H */
-
extern struct free_arena_header __malloc_head;
void __inject_free_block(struct free_arena_header *ah);
-
popl %eax /* Return value */
popl %edi
popl %esi
-1:
+1:
ret
.size memcpy, .-memcpy
pushl %esi
pushl %edi
pushl %eax /* Return value */
-
+
movl %eax,%edi
movl %edx,%esi
movl %edi,%eax /* Return value */
popl %edi
popl %esi
-1:
+1:
ret
.size mempcpy, .-mempcpy
movzwl %dx,%eax
shll $16,%edx
orl %edx,%eax
-
+
/* Initial alignment */
movl %edi,%edx
shrl $1,%edx
*
* The jmp_buf is assumed to contain the following, in order:
* %ebx
- * %esp
+ * %esp
* %ebp
* %esi
* %edi
void __ansicon_beep(void)
{
static com32sys_t ireg;
-
+
ireg.eax.w[0] = 0x0e07;
ireg.ebx.b[1] = BIOS_PAGE;
__intcall(0x10, &ireg, NULL);
/* Prevent "ghost typing" and keyboard buffer snooping */
volatile char junk;
int rv;
-
+
do {
rv = read(0, (char *)&junk, 1);
} while (rv > 0);
memset((void *)0x41e, 0, 32); /* Clear the actual keyboard buffer */
sti();
}
-
-
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2008 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
/* If this returns, something went bad; return to menu */
}
-
*/
void rosh_console_raw()
{
-// struct termios itio, ntio;
-// tcgetattr(0, &itio);
-// rosh_print_tc(&itio);
+// struct termios itio, ntio;
+// tcgetattr(0, &itio);
+// rosh_print_tc(&itio);
/* ntio = itio;
ntio.c_lflag &= ~(ICANON|ECHO);
tcsetattr(0, TCSAFLUSH, &ntio);*/
console_ansi_raw(); /* Allows get_key to get just 1 key sequence
(w/o delay or display */
-// tcgetattr(0, &ntio);
-// rosh_print_tc(&ntio);
+// tcgetattr(0, &ntio);
+// rosh_print_tc(&ntio);
}
/*
*/
void rosh_console_std()
{
-// struct termios itio, ntio;
+// struct termios itio, ntio;
console_ansi_std();
-// tcsetattr(0, TCSANOW, &itio);
+// tcsetattr(0, TCSANOW, &itio);
}
/*
int inc;
inc = KEY_NONE;
-// rosh_console_raw();
+// rosh_console_raw();
while (inc == KEY_NONE){
inc = get_key(stdin, 6000);
}
-// rosh_console_std();
+// rosh_console_std();
return inc;
} /* rosh_getkey */
char filestr2[ROSH_PATH_SZ + 1];
int fd2, file2pos;
#ifdef __COM32__
-// int inchar;
+// int inchar;
char ty;
#endif /* __COM32__ */
#endif /* DO_DEBUG */
}
printf("@%8d:%8d:%4d ", (int)de->d_ino, (int)de->d_size, de->d_mode);
#endif /* DO_DEBUG */
-// printf("%s\n", de->d_name);
+// printf("%s\n", de->d_name);
printf("'%s'\n", de->d_name);
#ifdef DO_DEBUG
// inchar = fgetc(stdin);
bufpos = buflen; break;
case ' ':
numln = rows - 1;
-// default:
+// default:
}
}
/*tcgetattr(0, &tio);
int rv;
char cmdstr[ROSH_CMD_SZ];
char pwdstr[ROSH_PATH_SZ + 1], ipwdstr[ROSH_PATH_SZ + 1];
-/* int numchar;
+/* int numchar;
*/ char do_exit;
char *c;
/* Initialization */
rv = 0;
console_ansi_std();
-// console_ansi_raw();
+// console_ansi_raw();
if (argc != 1) {
rv = rosh_argcat(cmdstr, argc, argv, 1);
} else {
;
; Clobbers ESI, EDI, ECX.
;
-
+
pm_bcopy:
push ebx
push edx
jmp edi ; Protected mode entry
; We have a real-mode entry point, so we need to return
- ; to real mode...
+ ; to real mode...
pm_shuffle_real_mode:
call .here
.here: pop ebx
dd bcopy_gdt ; pointer for LGDT instruction
dw 0
- ; TSS segment to keep Intel VT happy. Intel VT is
+ ; TSS segment to keep Intel VT happy. Intel VT is
; unhappy about anything that doesn't smell like a
; full-blown 32-bit OS.
desc TSS
desc DS32
dd 0000ffffh ; 28h Data segment, use32, read/write,
dd 00cf9300h ; present, dpl 0, cover all 4G
-
+
bcopy_gdt_size: equ $-bcopy_gdt
alignz 4
mov si,__replacestub_lma
mov cx,__replacestub_dwords
rep movsd
-
+
xor ecx,ecx
pop cx ; ECX <- length of list
; Make sure we are at EOF now...
call getc
jnc .done ; We should be at EOF now!
-
+
; It was okay, we can now move it into the KbdMap
mov si,trackbuf
mov di,KbdMap
add si,ax
loop .parseanswer
-.badness:
+.badness:
; We got back no data from this server.
; Unfortunately, for a recursive, non-authoritative
; query there is no such thing as an NXDOMAIN reply,
;
test byte [E820Buf+20],1 ; AddressRangeEnabled
jz .not_ram
-.no_ext_attr:
+.no_ext_attr:
;
; Look for a memory block starting at <= 1 MB and continuing upward
;
; Custom entry point for the hybrid-mode disk.
; The following values will have been pushed onto the
; entry stack:
- ; - CBIOS Heads
+ ; - CBIOS Heads
; - CBIOS Sectors
; - EBIOS flag
; - DX (including drive number)
getlinsec_ebios:
xor edx,edx
shld edx,eax,2
- shl eax,2 ; Convert to HDD sectors
+ shl eax,2 ; Convert to HDD sectors
shl bp,2
.loop:
; getlinsec implementation for legacy CBIOS
;
getlinsec_cbios:
- shl eax,2 ; Convert to HDD sectors
+ shl eax,2 ; Convert to HDD sectors
shl bp,2
.loop:
; append statement
cmp byte [InitRD+NULLOFFSET],NULLFILE
je .noinitrd
-
+
mov si,str_initrd
mov cx,7 ; "initrd="
rep movsb
if ( !hd_geometry.h || !hd_geometry.s ) {
int h, s, max_h, max_s;
-
+
max_h = hd_geometry.h;
max_s = hd_geometry.s;
unsigned int xsectors = sectors;
hd_geometry.driveno = 0; /* Assume floppy */
-
+
while (!ok) {
/* Assume it's a floppy drive, guess a geometry */
unsigned int type, track;
int c, h, s;
-
+
if (xsectors < 320*2) {
c = 40; h = 1; type = 1;
} else if (xsectors < 640*2) {
/* Assume it is a hard disk image and scan for a partition table */
const struct ptab_entry *ptab = (const struct ptab_entry *)
((char *)where+hd_geometry.offset+(512-2-4*16));
-
+
hd_geometry.driveno = 0x80; /* Assume hard disk */
-
+
if (*(uint16_t *)((char *)where+512-2) == 0xaa55) {
for ( i = 0 ; i < 4 ; i++ ) {
if ( ptab[i].type && !(ptab[i].active & 0x7f) ) {
s = (ptab[i].start_s & 0x3f);
h = ptab[i].start_h + 1;
-
+
if ( max_h < h ) max_h = h;
if ( max_s < s ) max_s = s;
-
+
s = (ptab[i].end_s & 0x3f);
h = ptab[i].end_h + 1;
-
+
if ( max_h < h ) {
max_h = h;
hd_geometry.hsrc = "MBR";
max_h = xsectors > 2097152 ? 255 : 64;
if (!max_s)
max_s = xsectors > 2097152 ? 63 : 32;
-
+
hd_geometry.h = max_h;
hd_geometry.s = max_s;
}
/* -----------------------------------------------------------------------
- *
+ *
* Copyright 2003-2009 H. Peter Anvin - All Rights Reserved
* Copyright 2009 Intel Corporation; author: H. Peter Anvin
*
%ifdef DEBUG
%macro MARK 1.nolist
- mov ah,0x02
- mov dl,%1&0xff
- int 0x21
+ mov ah,0x02
+ mov dl,%1&0xff
+ int 0x21
%if (%1 >> 8) & 0xff
mov dl,(%1 >> 8) & 0xff
- int 0x21
+ int 0x21
%if (%1 >> 16) & 0xff
mov dl,(%1 >> 16) & 0xff
- int 0x21
+ int 0x21
%if (%1 >> 24) & 0xff
mov dl,(%1 >> 24) & 0xff
- int 0x21
+ int 0x21
%endif
%endif
%endif
mov dl,' '
- int 0x21
+ int 0x21
%endmacro
%macro SHOWD 1.nolist
mov al,%1
call print_dec
mov ah,0x02
mov dl,' '
- int 0x21
+ int 0x21
%endmacro
%macro SHOWX 1.nolist
mov bx,%1
call print_hex
mov ah,0x02
mov dl,' '
- int 0x21
+ int 0x21
%endmacro
%else
%macro MARK 1.nolist
; print_dotquad
;
-; Take an IP address (in network byte order) in EBX and print it
+; Take an IP address (in network byte order) in EBX and print it
; as a dotted quad.
; Destroys EAX, EBX, ECX, EDX
;