Changeset 2725 in vbox
- Timestamp:
- May 21, 2007 9:16:41 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/rombios.c
r2651 r2725 203 203 # error APM BIOS can only be used with 386+ cpu 204 204 #endif 205 206 #ifdef VBOX_SMP207 // SMP support has been removed from current Bochs BIOS. Keep it in case208 // we'll want to create a VirtualBox version that supports SMP guests.209 #ifndef BX_SMP_PROCESSORS210 #define BX_SMP_PROCESSORS 1211 # warning BX_SMP_PROCESSORS not defined, defaulting to 1212 #endif213 #endif /* VBOX_SMP */214 205 215 206 #ifndef VBOX … … 11402 11393 .org 0xcc00 11403 11394 // bcc-generated data will be placed here 11404 11405 #ifdef VBOX_SMP11406 // For documentation of this config structure, look on developer.intel.com and11407 // search for multiprocessor specification. Note that when you change anything11408 // you must update the checksum (a pain!). It would be better to construct this11409 // with C structures, or at least fill in the checksum automatically.11410 //11411 // Maybe this structs could be moved elsewhere than d00011412 11413 #if (BX_SMP_PROCESSORS==1)11414 // no structure necessary.11415 #elif (BX_SMP_PROCESSORS==2)11416 // define the Intel MP Configuration Structure for 2 processors at11417 // APIC ID 0,1. I/O APIC at ID=2.11418 .align 1611419 mp_config_table:11420 db 0x50, 0x43, 0x4d, 0x50 ;; "PCMP" signature11421 dw (mp_config_end-mp_config_table) ;; table length11422 db 4 ;; spec rev11423 db 0x65 ;; checksum11424 .ascii "BOCHSCPU" ;; OEM id = "BOCHSCPU"11425 db 0x30, 0x2e, 0x31, 0x20 ;; vendor id = "0.1 "11426 db 0x20, 0x20, 0x20, 0x2011427 db 0x20, 0x20, 0x20, 0x2011428 dw 0,0 ;; oem table ptr11429 dw 0 ;; oem table size11430 dw 20 ;; entry count11431 dw 0x0000, 0xfee0 ;; memory mapped address of local APIC11432 dw 0 ;; extended table length11433 db 0 ;; extended table checksum11434 db 0 ;; reserved11435 mp_config_proc0:11436 db 0 ;; entry type=processor11437 db 0 ;; local APIC id11438 db 0x11 ;; local APIC version number11439 db 3 ;; cpu flags: enabled, bootstrap processor11440 db 0,6,0,0 ;; cpu signature11441 dw 0x201,0 ;; feature flags11442 dw 0,0 ;; reserved11443 dw 0,0 ;; reserved11444 mp_config_proc1:11445 db 0 ;; entry type=processor11446 db 1 ;; local APIC id11447 db 0x11 ;; local APIC version number11448 db 1 ;; cpu flags: enabled11449 db 0,6,0,0 ;; cpu signature11450 dw 0x201,0 ;; feature flags11451 dw 0,0 ;; reserved11452 dw 0,0 ;; reserved11453 mp_config_isa_bus:11454 db 1 ;; entry type=bus11455 db 0 ;; bus ID11456 db 0x49, 0x53, 0x41, 0x20, 0x20, 0x20 ;; bus type="ISA "11457 mp_config_ioapic:11458 db 2 ;; entry type=I/O APIC11459 db 2 ;; apic id=2. linux will set.11460 db 0x11 ;; I/O APIC version number11461 db 1 ;; flags=1=enabled11462 dw 0x0000, 0xfec0 ;; memory mapped address of I/O APIC11463 mp_config_irqs:11464 db 3 ;; entry type=I/O interrupt11465 db 0 ;; interrupt type=vectored interrupt11466 db 0,0 ;; flags po=0, el=0 (linux uses as default)11467 db 0 ;; source bus ID is ISA11468 db 0 ;; source bus IRQ11469 db 2 ;; destination I/O APIC ID11470 db 0 ;; destination I/O APIC interrrupt in11471 ;; repeat pattern for interrupts 0-1511472 db 3,0,0,0,0,1,2,111473 db 3,0,0,0,0,2,2,211474 db 3,0,0,0,0,3,2,311475 db 3,0,0,0,0,4,2,411476 db 3,0,0,0,0,5,2,511477 db 3,0,0,0,0,6,2,611478 db 3,0,0,0,0,7,2,711479 db 3,0,0,0,0,8,2,811480 db 3,0,0,0,0,9,2,911481 db 3,0,0,0,0,10,2,1011482 db 3,0,0,0,0,11,2,1111483 db 3,0,0,0,0,12,2,1211484 db 3,0,0,0,0,13,2,1311485 db 3,0,0,0,0,14,2,1411486 db 3,0,0,0,0,15,2,1511487 #elif (BX_SMP_PROCESSORS==4)11488 // define the Intel MP Configuration Structure for 4 processors at11489 // APIC ID 0,1,2,3. I/O APIC at ID=4.11490 .align 1611491 mp_config_table:11492 db 0x50, 0x43, 0x4d, 0x50 ;; "PCMP" signature11493 dw (mp_config_end-mp_config_table) ;; table length11494 db 4 ;; spec rev11495 db 0xdd ;; checksum11496 .ascii "BOCHSCPU" ;; OEM id = "BOCHSCPU"11497 db 0x30, 0x2e, 0x31, 0x20 ;; vendor id = "0.1 "11498 db 0x20, 0x20, 0x20, 0x2011499 db 0x20, 0x20, 0x20, 0x2011500 dw 0,0 ;; oem table ptr11501 dw 0 ;; oem table size11502 dw 22 ;; entry count11503 dw 0x0000, 0xfee0 ;; memory mapped address of local APIC11504 dw 0 ;; extended table length11505 db 0 ;; extended table checksum11506 db 0 ;; reserved11507 mp_config_proc0:11508 db 0 ;; entry type=processor11509 db 0 ;; local APIC id11510 db 0x11 ;; local APIC version number11511 db 3 ;; cpu flags: enabled, bootstrap processor11512 db 0,6,0,0 ;; cpu signature11513 dw 0x201,0 ;; feature flags11514 dw 0,0 ;; reserved11515 dw 0,0 ;; reserved11516 mp_config_proc1:11517 db 0 ;; entry type=processor11518 db 1 ;; local APIC id11519 db 0x11 ;; local APIC version number11520 db 1 ;; cpu flags: enabled11521 db 0,6,0,0 ;; cpu signature11522 dw 0x201,0 ;; feature flags11523 dw 0,0 ;; reserved11524 dw 0,0 ;; reserved11525 mp_config_proc2:11526 db 0 ;; entry type=processor11527 db 2 ;; local APIC id11528 db 0x11 ;; local APIC version number11529 db 1 ;; cpu flags: enabled11530 db 0,6,0,0 ;; cpu signature11531 dw 0x201,0 ;; feature flags11532 dw 0,0 ;; reserved11533 dw 0,0 ;; reserved11534 mp_config_proc3:11535 db 0 ;; entry type=processor11536 db 3 ;; local APIC id11537 db 0x11 ;; local APIC version number11538 db 1 ;; cpu flags: enabled11539 db 0,6,0,0 ;; cpu signature11540 dw 0x201,0 ;; feature flags11541 dw 0,0 ;; reserved11542 dw 0,0 ;; reserved11543 mp_config_isa_bus:11544 db 1 ;; entry type=bus11545 db 0 ;; bus ID11546 db 0x49, 0x53, 0x41, 0x20, 0x20, 0x20 ;; bus type="ISA "11547 mp_config_ioapic:11548 db 2 ;; entry type=I/O APIC11549 db 4 ;; apic id=4. linux will set.11550 db 0x11 ;; I/O APIC version number11551 db 1 ;; flags=1=enabled11552 dw 0x0000, 0xfec0 ;; memory mapped address of I/O APIC11553 mp_config_irqs:11554 db 3 ;; entry type=I/O interrupt11555 db 0 ;; interrupt type=vectored interrupt11556 db 0,0 ;; flags po=0, el=0 (linux uses as default)11557 db 0 ;; source bus ID is ISA11558 db 0 ;; source bus IRQ11559 db 4 ;; destination I/O APIC ID11560 db 0 ;; destination I/O APIC interrrupt in11561 ;; repeat pattern for interrupts 0-1511562 db 3,0,0,0,0,1,4,111563 db 3,0,0,0,0,2,4,211564 db 3,0,0,0,0,3,4,311565 db 3,0,0,0,0,4,4,411566 db 3,0,0,0,0,5,4,511567 db 3,0,0,0,0,6,4,611568 db 3,0,0,0,0,7,4,711569 db 3,0,0,0,0,8,4,811570 db 3,0,0,0,0,9,4,911571 db 3,0,0,0,0,10,4,1011572 db 3,0,0,0,0,11,4,1111573 db 3,0,0,0,0,12,4,1211574 db 3,0,0,0,0,13,4,1311575 db 3,0,0,0,0,14,4,1411576 db 3,0,0,0,0,15,4,1511577 #elif (BX_SMP_PROCESSORS==8)11578 // define the Intel MP Configuration Structure for 8 processors at11579 // APIC ID 0,1,2,3,4,5,6,7. I/O APIC at ID=8.11580 .align 1611581 mp_config_table:11582 db 0x50, 0x43, 0x4d, 0x50 ;; "PCMP" signature11583 dw (mp_config_end-mp_config_table) ;; table length11584 db 4 ;; spec rev11585 db 0xc3 ;; checksum11586 .ascii "BOCHSCPU" ;; OEM id = "BOCHSCPU"11587 db 0x30, 0x2e, 0x31, 0x20 ;; vendor id = "0.1 "11588 db 0x20, 0x20, 0x20, 0x2011589 db 0x20, 0x20, 0x20, 0x2011590 dw 0,0 ;; oem table ptr11591 dw 0 ;; oem table size11592 dw 26 ;; entry count11593 dw 0x0000, 0xfee0 ;; memory mapped address of local APIC11594 dw 0 ;; extended table length11595 db 0 ;; extended table checksum11596 db 0 ;; reserved11597 mp_config_proc0:11598 db 0 ;; entry type=processor11599 db 0 ;; local APIC id11600 db 0x11 ;; local APIC version number11601 db 3 ;; cpu flags: enabled, bootstrap processor11602 db 0,6,0,0 ;; cpu signature11603 dw 0x201,0 ;; feature flags11604 dw 0,0 ;; reserved11605 dw 0,0 ;; reserved11606 mp_config_proc1:11607 db 0 ;; entry type=processor11608 db 1 ;; local APIC id11609 db 0x11 ;; local APIC version number11610 db 1 ;; cpu flags: enabled11611 db 0,6,0,0 ;; cpu signature11612 dw 0x201,0 ;; feature flags11613 dw 0,0 ;; reserved11614 dw 0,0 ;; reserved11615 mp_config_proc2:11616 db 0 ;; entry type=processor11617 db 2 ;; local APIC id11618 db 0x11 ;; local APIC version number11619 db 1 ;; cpu flags: enabled11620 db 0,6,0,0 ;; cpu signature11621 dw 0x201,0 ;; feature flags11622 dw 0,0 ;; reserved11623 dw 0,0 ;; reserved11624 mp_config_proc3:11625 db 0 ;; entry type=processor11626 db 3 ;; local APIC id11627 db 0x11 ;; local APIC version number11628 db 1 ;; cpu flags: enabled11629 db 0,6,0,0 ;; cpu signature11630 dw 0x201,0 ;; feature flags11631 dw 0,0 ;; reserved11632 dw 0,0 ;; reserved11633 mp_config_proc4:11634 db 0 ;; entry type=processor11635 db 4 ;; local APIC id11636 db 0x11 ;; local APIC version number11637 db 1 ;; cpu flags: enabled11638 db 0,6,0,0 ;; cpu signature11639 dw 0x201,0 ;; feature flags11640 dw 0,0 ;; reserved11641 dw 0,0 ;; reserved11642 mp_config_proc5:11643 db 0 ;; entry type=processor11644 db 5 ;; local APIC id11645 db 0x11 ;; local APIC version number11646 db 1 ;; cpu flags: enabled11647 db 0,6,0,0 ;; cpu signature11648 dw 0x201,0 ;; feature flags11649 dw 0,0 ;; reserved11650 dw 0,0 ;; reserved11651 mp_config_proc6:11652 db 0 ;; entry type=processor11653 db 6 ;; local APIC id11654 db 0x11 ;; local APIC version number11655 db 1 ;; cpu flags: enabled11656 db 0,6,0,0 ;; cpu signature11657 dw 0x201,0 ;; feature flags11658 dw 0,0 ;; reserved11659 dw 0,0 ;; reserved11660 mp_config_proc7:11661 db 0 ;; entry type=processor11662 db 7 ;; local APIC id11663 db 0x11 ;; local APIC version number11664 db 1 ;; cpu flags: enabled11665 db 0,6,0,0 ;; cpu signature11666 dw 0x201,0 ;; feature flags11667 dw 0,0 ;; reserved11668 dw 0,0 ;; reserved11669 mp_config_isa_bus:11670 db 1 ;; entry type=bus11671 db 0 ;; bus ID11672 db 0x49, 0x53, 0x41, 0x20, 0x20, 0x20 ;; bus type="ISA "11673 mp_config_ioapic:11674 db 2 ;; entry type=I/O APIC11675 db 8 ;; apic id=811676 db 0x11 ;; I/O APIC version number11677 db 1 ;; flags=1=enabled11678 dw 0x0000, 0xfec0 ;; memory mapped address of I/O APIC11679 mp_config_irqs:11680 db 3 ;; entry type=I/O interrupt11681 db 0 ;; interrupt type=vectored interrupt11682 db 0,0 ;; flags po=0, el=0 (linux uses as default)11683 db 0 ;; source bus ID is ISA11684 db 0 ;; source bus IRQ11685 db 8 ;; destination I/O APIC ID11686 db 0 ;; destination I/O APIC interrrupt in11687 ;; repeat pattern for interrupts 0-1511688 db 3,0,0,0,0,1,8,111689 db 3,0,0,0,0,2,8,211690 db 3,0,0,0,0,3,8,311691 db 3,0,0,0,0,4,8,411692 db 3,0,0,0,0,5,8,511693 db 3,0,0,0,0,6,8,611694 db 3,0,0,0,0,7,8,711695 db 3,0,0,0,0,8,8,811696 db 3,0,0,0,0,9,8,911697 db 3,0,0,0,0,10,8,1011698 db 3,0,0,0,0,11,8,1111699 db 3,0,0,0,0,12,8,1211700 db 3,0,0,0,0,13,8,1311701 db 3,0,0,0,0,14,8,1411702 db 3,0,0,0,0,15,8,1511703 #else11704 # error Sorry, rombios only has configurations for 1, 2, 4 or 8 processors.11705 #endif // if (BX_SMP_PROCESSORS==...)11706 11707 mp_config_end: // this label used to find length of mp structure11708 db 011709 11710 #if (BX_SMP_PROCESSORS>1)11711 .align 1611712 mp_floating_pointer_structure:11713 db 0x5f, 0x4d, 0x50, 0x5f ; "_MP_" signature11714 dw mp_config_table, 0xf ;; pointer to MP configuration table11715 db 1 ;; length of this struct in 16-bit byte chunks11716 db 4 ;; MP spec revision11717 db 0xc1 ;; checksum11718 db 0 ;; MP feature byte 1. value 0 means look at the config table11719 db 0,0,0,0 ;; MP feature bytes 2-5.11720 #endif11721 #endif /* VBOX_SMP */11722 11723 11395 ASM_END
Note:
See TracChangeset
for help on using the changeset viewer.