diff options
author | AlmuHS <almuhs@github.com> | 2019-10-03 20:17:40 +0200 |
---|---|---|
committer | AlmuHS <almuhs@github.com> | 2019-10-03 20:17:40 +0200 |
commit | 75f7f310880cf64bb6570c7f4d39605eb6417626 (patch) | |
tree | 56fae0f3193d744a83af26751ff26fee6b5906d4 | |
parent | d443387bd6e5b5f90f0819dba5d78fa99934762e (diff) |
Revert "fix: add shift 24 in apic id"
This reverts commit 4dd07e0787270dbcce2aa6171912ea73bfdd2e4f.
undone shift 24
-rw-r--r-- | i386/i386/cpuboot.S | 4 | ||||
-rw-r--r-- | i386/i386/mp_desc.c | 2 | ||||
-rw-r--r-- | i386/i386at/acpi_rsdp.c | 4 | ||||
-rw-r--r-- | i386/i386at/model_dep.c | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/i386/i386/cpuboot.S b/i386/i386/cpuboot.S index 071b62c9..b0bccbdb 100644 --- a/i386/i386/cpuboot.S +++ b/i386/i386/cpuboot.S @@ -129,4 +129,6 @@ gdt_tmp: _apbootend: apbootend: - +// .globl dummyf +//dummyf: +ret diff --git a/i386/i386/mp_desc.c b/i386/i386/mp_desc.c index 557b7e18..10caeb19 100644 --- a/i386/i386/mp_desc.c +++ b/i386/i386/mp_desc.c @@ -299,7 +299,7 @@ cpu_setup() /* assume Pentium 4, Xeon, or later processors */ //unsigned apic_id = (((ApicLocalUnit*)phystokv(lapic_addr))->apic_id.r >> 24) & 0xff; - unsigned apic_id = lapic->apic_id.r >>24; + unsigned apic_id = lapic->apic_id.r; /* panic? */ if(i >= ncpu) diff --git a/i386/i386at/acpi_rsdp.c b/i386/i386at/acpi_rsdp.c index 3341407b..9617a589 100644 --- a/i386/i386at/acpi_rsdp.c +++ b/i386/i386at/acpi_rsdp.c @@ -263,9 +263,9 @@ acpi_apic_setup(){ if((lapic_entry->flags & 0x1) && ncpu < NCPUS){ //Enumerate CPU and add It to cpu/apic vector - machine_slot[ncpu].apic_id = lapic_entry->apic_id >>24; + machine_slot[ncpu].apic_id = lapic_entry->apic_id; machine_slot[ncpu].is_cpu = TRUE; - apic2kernel[lapic_entry->apic_id >>24] = ncpu; + apic2kernel[lapic_entry->apic_id] = ncpu; //Increase number of CPU ncpu++; diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index e5ad89a8..e47ef317 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -689,7 +689,7 @@ void c_boot_entry(vm_offset_t bi) } if(lapic != 0){ - apic_id = lapic->apic_id.r >>24; + apic_id = lapic->apic_id.r; //update BSP machine_slot and apic2kernel machine_slot[0].apic_id = apic_id; |