Changes in / [b0beb9b1:bcd4dd4] in mainline
- Files:
-
- 8 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/boot/multiboot.S
rb0beb9b1 rbcd4dd4 38 38 #include <arch/cpu.h> 39 39 40 // TODO: most of this file can be rewritten in C41 42 // TODO: FB state should be checked dynamically from provided multiboot info.43 // Currently we only enable EGA statically, which forces us to rebuild44 // the image to get very early debug output.45 46 40 #define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE) 47 41 … … 56 50 57 51 .macro pm_status msg 58 #if defined(CONFIG_EGA) && !defined(CONFIG_FB)52 #ifdef CONFIG_EGA 59 53 pushl %esi 60 54 movl \msg, %esi … … 73 67 multiboot_header: 74 68 .long MULTIBOOT_HEADER_MAGIC 75 #ifdef CONFIG_FB76 69 .long MULTIBOOT_HEADER_FLAGS 77 70 .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) /* checksum */ 78 #else79 .long MULTIBOOT_HEADER_FLAGS_NOFB80 .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS_NOFB) /* checksum */81 #endif82 71 .long multiboot_header 83 72 .long unmapped_start … … 85 74 .long 0 86 75 .long multiboot_image_start 87 #ifdef CONFIG_FB88 .long 089 .long CONFIG_BFB_WIDTH90 .long CONFIG_BFB_HEIGHT91 .long CONFIG_BFB_BPP92 #endif93 76 94 77 SYMBOL(multiboot_image_start) … … 175 158 sse2_supported: 176 159 160 #include "vesa_prot.inc" 161 177 162 pm2_status $status_prot2 178 163 … … 583 568 584 569 ret 570 571 #include "vesa_real.inc" 585 572 586 573 .section K_INI_PTLS, "aw", @progbits … … 721 708 status_prot: 722 709 .asciz "[prot] " 710 status_vesa_copy: 711 .asciz "[vesa_copy] " 723 712 status_multiboot_cmdline: 724 713 .asciz "[multiboot_cmdline] " 714 status_vesa_real: 715 .asciz "[vesa_real] " 725 716 status_prot2: 726 717 .asciz "[prot2] " -
kernel/arch/amd64/src/boot/multiboot2.S
rb0beb9b1 rbcd4dd4 35 35 #include <genarch/multiboot/multiboot2.h> 36 36 37 #define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE) 38 37 39 .section K_TEXT_START, "ax" 38 40 … … 78 80 .word MULTIBOOT2_FLAGS_REQUIRED 79 81 .long tag_entry_address_end - tag_entry_address_start 80 .long multiboot _image_start82 .long multiboot2_image_start 81 83 tag_entry_address_end: 82 84 … … 120 122 tag_terminator_end: 121 123 multiboot2_header_end: 124 125 SYMBOL(multiboot2_image_start) 126 cli 127 cld 128 129 /* Initialize stack pointer */ 130 movl $START_STACK, %esp 131 132 /* 133 * Initialize Global Descriptor Table and 134 * Interrupt Descriptor Table registers 135 */ 136 lgdtl bootstrap_gdtr 137 lidtl bootstrap_idtr 138 139 /* Kernel data + stack */ 140 movw $GDT_SELECTOR(KDATA_DES), %cx 141 movw %cx, %es 142 movw %cx, %ds 143 movw %cx, %ss 144 145 /* 146 * Simics seems to remove hidden part of GS on entering user mode 147 * when _visible_ part of GS does not point to user-mode segment. 148 */ 149 movw $GDT_SELECTOR(UDATA_DES), %cx 150 movw %cx, %fs 151 movw %cx, %gs 152 153 jmpl $GDT_SELECTOR(KTEXT32_DES), $multiboot2_meeting_point 154 multiboot2_meeting_point: 155 156 /* 157 * Protected 32-bit. We want to reuse the code-seg descriptor, 158 * the Default operand size must not be 1 when entering long mode. 159 */ 160 161 /* Save multiboot arguments */ 162 movl %eax, multiboot_eax 163 movl %ebx, multiboot_ebx 164 165 movl $(INTEL_CPUID_EXTENDED), %eax 166 cpuid 167 cmp $(INTEL_CPUID_EXTENDED), %eax 168 ja extended_cpuid_supported 169 170 jmp pm_error_halt 171 172 extended_cpuid_supported: 173 174 movl $(AMD_CPUID_EXTENDED), %eax 175 cpuid 176 bt $(AMD_EXT_LONG_MODE), %edx 177 jc long_mode_supported 178 179 jmp pm_error_halt 180 181 long_mode_supported: 182 183 bt $(AMD_EXT_NOEXECUTE), %edx 184 jc noexecute_supported 185 186 jmp pm_error_halt 187 188 noexecute_supported: 189 190 movl $(INTEL_CPUID_STANDARD), %eax 191 cpuid 192 bt $(INTEL_FXSAVE), %edx 193 jc fx_supported 194 195 jmp pm_error_halt 196 197 fx_supported: 198 199 bt $(INTEL_SSE2), %edx 200 jc sse2_supported 201 202 jmp pm_error_halt 203 204 sse2_supported: 205 206 /* 207 * Enable 64-bit page translation entries - CR4.PAE = 1. 208 * Paging is not enabled until after long mode is enabled. 209 */ 210 211 movl %cr4, %eax 212 orl $CR4_PAE, %eax 213 movl %eax, %cr4 214 215 /* Set up paging tables */ 216 leal ptl_0, %eax 217 movl %eax, %cr3 218 219 /* Enable long mode */ 220 movl $AMD_MSR_EFER, %ecx 221 rdmsr /* read EFER */ 222 orl $AMD_LME, %eax /* set LME = 1 */ 223 wrmsr 224 225 /* Enable paging to activate long mode (set CR0.PG = 1) */ 226 movl %cr0, %eax 227 orl $CR0_PG, %eax 228 movl %eax, %cr0 229 230 /* At this point we are in compatibility mode */ 231 jmpl $GDT_SELECTOR(KTEXT_DES), $start64 232 233 pm_error_halt: 234 cli 235 hlt1: 236 hlt 237 jmp hlt1 238 239 .code64 240 241 start64: 242 243 /* 244 * Long mode. 245 */ 246 247 movq $(PA2KA(START_STACK)), %rsp 248 249 /* Create the first stack frame */ 250 pushq $0 251 movq %rsp, %rbp 252 253 /* Call amd64_pre_main(multiboot_eax, multiboot_ebx) */ 254 movl multiboot_eax, %edi 255 movl multiboot_ebx, %esi 256 257 #ifdef MEMORY_MODEL_large 258 movabsq $amd64_pre_main, %rax 259 callq *%rax 260 #else 261 callq amd64_pre_main 262 #endif 263 264 /* Call main_bsp() */ 265 #ifdef MEMORY_MODEL_large 266 movabsq $main_bsp, %rax 267 callq *%rax 268 #else 269 callq main_bsp 270 #endif 271 272 /* Not reached */ 273 cli 274 hlt0: 275 hlt 276 jmp hlt0 -
kernel/arch/ia32/src/boot/multiboot.S
rb0beb9b1 rbcd4dd4 38 38 #include <arch/cpu.h> 39 39 40 // TODO: most of this file can be rewritten in C41 42 // TODO: FB state should be checked dynamically from provided multiboot info.43 // Currently we only enable EGA statically, which forces us to rebuild44 // the image to get very early debug output.45 46 40 #define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE) 47 41 … … 50 44 .code32 51 45 46 .macro pm_error msg 47 movl \msg, %esi 48 jmp pm_error_halt 49 .endm 50 52 51 .macro pm_status msg 53 #if defined(CONFIG_EGA) && !defined(CONFIG_FB)52 #ifdef CONFIG_EGA 54 53 pushl %esi 55 54 movl \msg, %esi … … 67 66 multiboot_header: 68 67 .long MULTIBOOT_HEADER_MAGIC 69 #ifdef CONFIG_FB70 68 .long MULTIBOOT_HEADER_FLAGS 71 69 .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) /* checksum */ 72 #else73 .long MULTIBOOT_HEADER_FLAGS_NOFB74 .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS_NOFB) /* checksum */75 #endif76 70 .long multiboot_header 77 71 .long unmapped_start … … 79 73 .long 0 80 74 .long multiboot_image_start 81 #ifdef CONFIG_FB82 .long 083 .long CONFIG_BFB_WIDTH84 .long CONFIG_BFB_HEIGHT85 .long CONFIG_BFB_BPP86 #endif87 75 88 76 SYMBOL(multiboot_image_start) … … 116 104 117 105 pm_status $status_prot 106 107 #include "vesa_prot.inc" 118 108 119 109 #ifndef PROCESSOR_i486 … … 366 356 ret 367 357 358 /** Print string to EGA display (in light red) and halt. 359 * 360 * Should be executed from 32 bit protected mode with paging 361 * turned off. Stack is not required. This routine is used even 362 * if CONFIG_EGA is not enabled. Since we are going to halt the 363 * CPU anyway, it is always better to at least try to print 364 * some hints. 365 * 366 * @param %esi NULL-terminated string to print. 367 * 368 */ 369 pm_error_halt: 370 movl $0xb8000, %edi /* base of EGA text mode memory */ 371 xorl %eax, %eax 372 373 /* Read bits 8 - 15 of the cursor address */ 374 movw $0x3d4, %dx 375 movb $0xe, %al 376 outb %al, %dx 377 378 movw $0x3d5, %dx 379 inb %dx, %al 380 shl $8, %ax 381 382 /* Read bits 0 - 7 of the cursor address */ 383 movw $0x3d4, %dx 384 movb $0xf, %al 385 outb %al, %dx 386 387 movw $0x3d5, %dx 388 inb %dx, %al 389 390 /* Sanity check for the cursor on screen */ 391 cmp $2000, %ax 392 jb err_cursor_ok 393 394 movw $1998, %ax 395 396 err_cursor_ok: 397 398 movw %ax, %bx 399 shl $1, %eax 400 addl %eax, %edi 401 402 err_ploop: 403 lodsb 404 405 cmp $0, %al 406 je err_ploop_end 407 408 movb $0x0c, %ah /* black background, light red foreground */ 409 stosw 410 411 /* Sanity check for the cursor on the last line */ 412 inc %bx 413 cmp $2000, %bx 414 jb err_ploop 415 416 /* Scroll the screen (24 rows) */ 417 movl %esi, %edx 418 movl $0xb80a0, %esi 419 movl $0xb8000, %edi 420 movl $960, %ecx 421 rep movsl 422 423 /* Clear the 24th row */ 424 xorl %eax, %eax 425 movl $40, %ecx 426 rep stosl 427 428 /* Go to row 24 */ 429 movl %edx, %esi 430 movl $0xb8f00, %edi 431 movw $1920, %bx 432 433 jmp err_ploop 434 err_ploop_end: 435 436 /* Write bits 8 - 15 of the cursor address */ 437 movw $0x3d4, %dx 438 movb $0xe, %al 439 outb %al, %dx 440 441 movw $0x3d5, %dx 442 movb %bh, %al 443 outb %al, %dx 444 445 /* Write bits 0 - 7 of the cursor address */ 446 movw $0x3d4, %dx 447 movb $0xf, %al 448 outb %al, %dx 449 450 movw $0x3d5, %dx 451 movb %bl, %al 452 outb %al, %dx 453 454 cli 455 hlt1: 456 hlt 457 jmp hlt1 458 368 459 /** Print string to EGA display (in light green). 369 460 * … … 594 685 ret 595 686 687 #include "vesa_real.inc" 688 596 689 .section K_DATA_START, "aw", @progbits 597 690 … … 627 720 status_non_pse: 628 721 .asciz "[non_pse] " 722 status_vesa_copy: 723 .asciz "[vesa_copy] " 629 724 status_multiboot_cmdline: 630 725 .asciz "[multiboot_cmdline] " 726 status_vesa_real: 727 .asciz "[vesa_real] " 631 728 status_prot2: 632 729 .asciz "[prot2] " -
kernel/arch/ia32/src/boot/multiboot2.S
rb0beb9b1 rbcd4dd4 32 32 #include <arch/cpuid.h> 33 33 #include <genarch/multiboot/multiboot2.h> 34 35 #define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE) 34 36 35 37 .section K_TEXT_START, "ax" … … 76 78 .word MULTIBOOT2_FLAGS_REQUIRED 77 79 .long tag_entry_address_end - tag_entry_address_start 78 .long multiboot _image_start80 .long multiboot2_image_start 79 81 tag_entry_address_end: 80 82 … … 118 120 tag_terminator_end: 119 121 multiboot2_header_end: 122 123 SYMBOL(multiboot2_image_start) 124 cli 125 cld 126 127 /* Initialize stack pointer */ 128 movl $START_STACK, %esp 129 130 /* 131 * Initialize Global Descriptor Table and 132 * Interrupt Descriptor Table registers 133 */ 134 lgdtl bootstrap_gdtr 135 lidtl bootstrap_idtr 136 137 /* Kernel data + stack */ 138 movw $GDT_SELECTOR(KDATA_DES), %cx 139 movw %cx, %es 140 movw %cx, %fs 141 movw %cx, %gs 142 movw %cx, %ds 143 movw %cx, %ss 144 145 jmpl $GDT_SELECTOR(KTEXT_DES), $multiboot2_meeting_point 146 multiboot2_meeting_point: 147 148 /* Save multiboot arguments */ 149 movl %eax, multiboot_eax 150 movl %ebx, multiboot_ebx 151 152 #ifndef PROCESSOR_i486 153 154 movl $(INTEL_CPUID_LEVEL), %eax 155 cpuid 156 cmp $0x0, %eax /* any function > 0? */ 157 jbe pse_unsupported 158 159 movl $(INTEL_CPUID_STANDARD), %eax 160 cpuid 161 bt $(INTEL_PSE), %edx 162 jnc pse_unsupported 163 164 /* Map kernel and turn paging on */ 165 call map_kernel_pse 166 jmp stack_init 167 168 #endif /* PROCESSOR_i486 */ 169 170 pse_unsupported: 171 172 /* Map kernel and turn paging on */ 173 call map_kernel_non_pse 174 175 stack_init: 176 177 /* Create the first stack frame */ 178 pushl $0 179 movl %esp, %ebp 180 181 /* Call ia32_pre_main(multiboot_eax, multiboot_ebx) */ 182 pushl multiboot_ebx 183 pushl multiboot_eax 184 call ia32_pre_main 185 186 /* Call main_bsp() */ 187 call main_bsp 188 189 /* Not reached */ 190 cli 191 hlt0: 192 hlt 193 jmp hlt0 -
kernel/genarch/include/genarch/multiboot/multiboot.h
rb0beb9b1 rbcd4dd4 39 39 #include <genarch/multiboot/multiboot_info_struct.h> 40 40 41 #define MULTIBOOT_HEADER_MAGIC 0x1badb002 42 #define MULTIBOOT_HEADER_FLAGS 0x00010007 43 #define MULTIBOOT_HEADER_FLAGS_NOFB 0x00010003 41 #define MULTIBOOT_HEADER_MAGIC 0x1badb002 42 #define MULTIBOOT_HEADER_FLAGS 0x00010003 44 43 45 44 #define MULTIBOOT_LOADER_MAGIC 0x2badb002 46 45 47 #define MULTIBOOT_INFO_FLAGS_MEM 0x0001 48 #define MULTIBOOT_INFO_FLAGS_BOOT 0x0002 49 #define MULTIBOOT_INFO_FLAGS_CMDLINE 0x0004 50 #define MULTIBOOT_INFO_FLAGS_MODS 0x0008 51 #define MULTIBOOT_INFO_FLAGS_SYMS_AOUT 0x0010 52 #define MULTIBOOT_INFO_FLAGS_SYMS_ELF 0x0020 53 #define MULTIBOOT_INFO_FLAGS_MMAP 0x0040 54 #define MULTIBOOT_INFO_FLAGS_DRIVES 0x0080 55 #define MULTIBOOT_INFO_FLAGS_CONFIG_TABLE 0x0100 56 #define MULTIBOOT_INFO_FLAGS_BOOT_LOADER_NAME 0x0200 57 #define MULTIBOOT_INFO_FLAGS_APM 0x0400 58 #define MULTIBOOT_INFO_FLAGS_VBE 0x0800 59 #define MULTIBOOT_INFO_FLAGS_FB 0x1000 46 #define MULTIBOOT_INFO_FLAGS_MEM 0x01 47 #define MULTIBOOT_INFO_FLAGS_BOOT 0x02 48 #define MULTIBOOT_INFO_FLAGS_CMDLINE 0x04 49 #define MULTIBOOT_INFO_FLAGS_MODS 0x08 50 #define MULTIBOOT_INFO_FLAGS_SYMS1 0x10 51 #define MULTIBOOT_INFO_FLAGS_SYMS2 0x20 52 #define MULTIBOOT_INFO_FLAGS_MMAP 0x40 60 53 61 54 #ifndef __ASSEMBLER__ -
kernel/genarch/include/genarch/multiboot/multiboot_info_struct.h
rb0beb9b1 rbcd4dd4 30 30 #define KERN_MULTIBOOT_INFO_STRUCT_H_ 31 31 32 #define MULTIBOOT_INFO_OFFSET_FLAGS 0x00 33 #define MULTIBOOT_INFO_OFFSET_MEM_LOWER 0x04 34 #define MULTIBOOT_INFO_OFFSET_MEM_UPPER 0x08 35 #define MULTIBOOT_INFO_OFFSET_BOOT_DEVICE 0x0c 36 #define MULTIBOOT_INFO_OFFSET_CMD_LINE 0x10 37 #define MULTIBOOT_INFO_OFFSET_MODS_COUNT 0x14 38 #define MULTIBOOT_INFO_OFFSET_MODS_ADDR 0x18 39 #define MULTIBOOT_INFO_OFFSET_SYMS 0x1c 40 #define MULTIBOOT_INFO_OFFSET_MMAP_LENGTH 0x2c 41 #define MULTIBOOT_INFO_OFFSET_MMAP_ADDR 0x30 42 #define MULTIBOOT_INFO_OFFSET_DRIVES_LENGTH 0x34 43 #define MULTIBOOT_INFO_OFFSET_DRIVES_ADDR 0x38 44 #define MULTIBOOT_INFO_OFFSET_CONFIG_TABLE 0x3c 45 #define MULTIBOOT_INFO_OFFSET_BOOT_LOADER_NAME 0x40 46 #define MULTIBOOT_INFO_OFFSET_APM_TABLE 0x44 47 #define MULTIBOOT_INFO_OFFSET_VBE_CONTROL_INFO 0x48 48 #define MULTIBOOT_INFO_OFFSET_VBE_MODE_INFO 0x4c 49 #define MULTIBOOT_INFO_OFFSET_VBE_MODE 0x50 50 #define MULTIBOOT_INFO_OFFSET_VBE_INTERFACE_SEG 0x52 51 #define MULTIBOOT_INFO_OFFSET_VBE_INTERFACE_OFF 0x54 52 #define MULTIBOOT_INFO_OFFSET_VBE_INTERFACE_LEN 0x56 53 #define MULTIBOOT_INFO_OFFSET_FRAMEBUFFER_ADDR 0x58 54 #define MULTIBOOT_INFO_OFFSET_FRAMEBUFFER_PITCH 0x60 55 #define MULTIBOOT_INFO_OFFSET_FRAMEBUFFER_WIDTH 0x64 56 #define MULTIBOOT_INFO_OFFSET_FRAMEBUFFER_HEIGHT 0x68 57 #define MULTIBOOT_INFO_OFFSET_FRAMEBUFFER_BPP 0x6c 58 #define MULTIBOOT_INFO_OFFSET_FRAMEBUFFER_TYPE 0x6d 59 60 #define MULTIBOOT_INFO_OFFSET_FRAMEBUFFER_PALETTE_ADDR 0x6e 61 #define MULTIBOOT_INFO_OFFSET_FRAMEBUFFER_PALETTE_NUM_COLORS 0x72 62 63 #define MULTIBOOT_INFO_OFFSET_FRAMEBUFFER_RED_FIELD_POSITION 0x6e 64 #define MULTIBOOT_INFO_OFFSET_FRAMEBUFFER_RED_MASK_SIZE 0x6f 65 #define MULTIBOOT_INFO_OFFSET_FRAMEBUFFER_GREEN_FIELD_POSITION 0x70 66 #define MULTIBOOT_INFO_OFFSET_FRAMEBUFFER_GREEN_MASK_SIZE 0x71 67 #define MULTIBOOT_INFO_OFFSET_FRAMEBUFFER_BLUE_FIELD_POSITION 0x72 68 #define MULTIBOOT_INFO_OFFSET_FRAMEBUFFER_BLUE_MASK_SIZE 0x73 69 70 #define MULTIBOOT_INFO_SIZE 0x76 32 #define MULTIBOOT_INFO_OFFSET_FLAGS 0x00 33 #define MULTIBOOT_INFO_OFFSET_MEM_LOWER 0x04 34 #define MULTIBOOT_INFO_OFFSET_MEM_UPPER 0x08 35 #define MULTIBOOT_INFO_OFFSET_BOOT_DEVICE 0x0c 36 #define MULTIBOOT_INFO_OFFSET_CMD_LINE 0x10 37 #define MULTIBOOT_INFO_OFFSET_MODS_COUNT 0x14 38 #define MULTIBOOT_INFO_OFFSET_MODS_ADDR 0x18 39 #define MULTIBOOT_INFO_OFFSET_SYMS 0x1c 40 #define MULTIBOOT_INFO_OFFSET_MMAP_LENGTH 0x2c 41 #define MULTIBOOT_INFO_OFFSET_MMAP_ADDR 0x30 42 #define MULTIBOOT_INFO_SIZE 0x34 71 43 72 44 #ifndef __ASSEMBLER__ … … 85 57 uint32_t mmap_length; 86 58 uint32_t mmap_addr; 87 uint32_t drives_length;88 uint32_t drives_addr;89 uint32_t config_table;90 uint32_t boot_loader_name;91 uint32_t apm_table;92 uint32_t vbe_control_info;93 uint32_t vbe_mode_info;94 uint16_t vbe_mode;95 uint16_t vbe_interface_seg;96 uint16_t vbe_interface_off;97 uint16_t vbe_interface_len;98 uint64_t framebuffer_addr;99 uint32_t framebuffer_pitch;100 uint32_t framebuffer_width;101 uint32_t framebuffer_height;102 uint8_t framebuffer_bpp;103 uint8_t framebuffer_type;104 union {105 struct {106 uint32_t framebuffer_palette_addr;107 uint32_t framebuffer_palette_num_colors;108 } __attribute__((packed));109 struct {110 uint8_t framebuffer_red_field_position;111 uint8_t framebuffer_red_mask_size;112 uint8_t framebuffer_green_field_position;113 uint8_t framebuffer_green_mask_size;114 uint8_t framebuffer_blue_field_position;115 uint8_t framebuffer_blue_mask_size;116 } __attribute__((packed));117 } __attribute__((packed));118 59 } __attribute__((packed)) multiboot_info_t; 119 60 -
kernel/genarch/src/acpi/acpi.c
rb0beb9b1 rbcd4dd4 174 174 { 175 175 for (size_t i = 0; i < len; i += 16) { 176 if ( !__builtin_memcmp(&base[i], RSDP_SIGNATURE, 8) &&176 if (__builtin_memcmp(&base[i], RSDP_SIGNATURE, 8) && 177 177 rsdp_check(&base[i])) 178 178 return &base[i]; -
kernel/genarch/src/multiboot/multiboot.c
rb0beb9b1 rbcd4dd4 35 35 #include <typedefs.h> 36 36 #include <genarch/multiboot/multiboot.h> 37 #include <genarch/fb/bfb.h>38 37 #include <config.h> 39 38 #include <stddef.h> … … 169 168 multiboot_memmap(info->mmap_length, 170 169 (multiboot_memmap_t *) MULTIBOOT_PTR(info->mmap_addr)); 171 172 #ifdef CONFIG_FB173 174 /* Initialize framebuffer. */175 if ((info->flags & MULTIBOOT_INFO_FLAGS_FB) != 0) {176 if (info->framebuffer_type != 1) {177 /* Can't use this framebuffer. */178 // FIXME: framebuffer_type == 2 is EGA mode, we should be able to use that.179 return;180 }181 182 bfb_addr = info->framebuffer_addr;183 bfb_width = info->framebuffer_width;184 bfb_height = info->framebuffer_height;185 bfb_bpp = info->framebuffer_bpp;186 bfb_scanline = info->framebuffer_pitch;187 bfb_red_pos = info->framebuffer_red_field_position;188 bfb_red_size = info->framebuffer_red_mask_size;189 bfb_green_pos = info->framebuffer_green_field_position;190 bfb_green_size = info->framebuffer_green_mask_size;191 bfb_blue_pos = info->framebuffer_blue_field_position;192 bfb_blue_size = info->framebuffer_blue_mask_size;193 }194 195 #endif196 170 } 197 171 -
tools/autocheck.awk
rb0beb9b1 rbcd4dd4 38 38 39 39 /}.*;/ { 40 pattern = "}( __attribute__\\(.*\\))? " struct_name "_t;" 41 if ($0 ~ pattern) { 42 macro_name = toupper(struct_name) "_SIZE" 43 print "_Static_assert(" macro_name " == sizeof(struct " struct_name "), \"\");" 44 struct_name = "" 40 pattern = "}( __attribute__\\(.*\\))? (" struct_name "_t)?;" 41 if ($0 !~ pattern) { 42 print("Bad struct ending: " $0) > "/dev/stderr" 43 exit 1 45 44 } 45 macro_name = toupper(struct_name) "_SIZE" 46 print "_Static_assert(" macro_name " == sizeof(struct " struct_name "), \"\");" 47 struct_name = "" 46 48 } 47 49 48 50 /;$/ { 49 if (struct_name != "" && $0 !~ "}") {51 if (struct_name != "") { 50 52 # Remove array subscript, if any. 51 53 sub("(\\[.*\\])?;", "", $0) -
tools/toolchain.sh
rb0beb9b1 rbcd4dd4 31 31 BINUTILS_GDB_GIT="https://github.com/HelenOS/binutils-gdb.git" 32 32 33 BINUTILS_BRANCH="binutils-2_3 1_1-helenos"34 BINUTILS_VERSION="2.3 1.1"35 36 GDB_BRANCH="gdb-8_ 2-helenos"37 GDB_VERSION="8. 2"33 BINUTILS_BRANCH="binutils-2_30-helenos" 34 BINUTILS_VERSION="2.30" 35 36 GDB_BRANCH="gdb-8_1-helenos" 37 GDB_VERSION="8.1" 38 38 39 39 GCC_GIT="https://github.com/HelenOS/gcc.git" -
uspace/srv/devman/driver.c
rb0beb9b1 rbcd4dd4 224 224 int cur_score; 225 225 link_t *link; 226 driver_t *drv; 226 227 227 228 fibril_mutex_lock(&drivers_list->drivers_mutex); … … 230 231 cur_score = get_match_score(node->drv, node); 231 232 232 link = list_next(& node->drv->drivers, &drivers_list->drivers);233 link = list_next(&drv->drivers, &drivers_list->drivers); 233 234 234 235 /* … … 236 237 */ 237 238 while (link != NULL) { 238 driver_t *drv = list_get_instance(link, driver_t, 239 drivers); 239 drv = list_get_instance(link, driver_t, drivers); 240 240 score = get_match_score(drv, node); 241 241 if (score == cur_score) {
Note:
See TracChangeset
for help on using the changeset viewer.