~ubuntu-branches/ubuntu/raring/crash/raring-proposed

« back to all changes in this revision

Viewing changes to x86_64.c

  • Committer: Bazaar Package Importer
  • Author(s): Mario Limonciello
  • Date: 2008-11-04 13:04:16 UTC
  • mfrom: (0.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20081104130416-7s1imz9huwwfzrbt
Tags: 4.0-7.2-1ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/patches/01_spu_commands.dpatch
    + Provides SPU extension support
  - debian/rules:
    + Patch support
    + Enable SPU on PPC
  - debian/control:
    + Enable LPIA builds.
    + Build depend on dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
        case PRE_GDB:
148
148
                if (!(machdep->flags & VM_FLAGS)) {
149
149
                        if (symbol_exists("xen_start_info")) {
150
 
                                if (symbol_exists("low_pml4") && 
 
150
                                if (PVOPS())
 
151
                                        machdep->flags |= VM_2_6_11;
 
152
                                else if (symbol_exists("low_pml4") && 
151
153
                                    symbol_exists("swap_low_mappings"))
152
154
                                        machdep->flags |= VM_XEN_RHEL4;
153
155
                                else
178
180
                case VM_2_6_11:
179
181
                        /* 2.6.11 layout */
180
182
                        machdep->machspec->userspace_top = USERSPACE_TOP_2_6_11;
181
 
                        machdep->machspec->page_offset = PAGE_OFFSET_2_6_11;
182
183
                        machdep->machspec->vmalloc_start_addr = VMALLOC_START_ADDR_2_6_11;
183
184
                        machdep->machspec->vmalloc_end = VMALLOC_END_2_6_11;
184
185
                        machdep->machspec->modules_vaddr = MODULES_VADDR_2_6_11;
190
191
                        if (symbol_exists("vmemmap_populate"))
191
192
                                machdep->flags |= VMEMMAP;
192
193
 
 
194
                        if (kernel_symbol_exists("end_pfn"))
 
195
                                /* 2.6.11 layout */
 
196
                                machdep->machspec->page_offset = PAGE_OFFSET_2_6_11;
 
197
                        else
 
198
                                /* 2.6.27 layout */
 
199
                                machdep->machspec->page_offset = PAGE_OFFSET_2_6_27;
 
200
 
193
201
                        machdep->uvtop = x86_64_uvtop_level4;
194
202
                        break;
195
203
 
534
542
static void 
535
543
x86_64_cpu_pda_init(void)
536
544
{
537
 
        int i, cpus, nr_pda, cpunumber, _cpu_pda;
 
545
        int i, cpus, nr_pda, cpunumber, _cpu_pda, _boot_cpu_pda;
538
546
        char *cpu_pda_buf;
539
547
        ulong level4_pgt, data_offset, cpu_pda_addr;
540
548
        struct syment *sp, *nsp;
569
577
                        _cpu_pda = FALSE;
570
578
                }
571
579
        }
572
 
 
 
580
        if (_cpu_pda) {
 
581
                if (symbol_exists("_boot_cpu_pda"))
 
582
                        _boot_cpu_pda = TRUE;
 
583
                else
 
584
                        _boot_cpu_pda = FALSE;
 
585
        }
573
586
        for (i = cpus = 0; i < nr_pda; i++) {
574
587
                if (_cpu_pda) {
575
 
                        if (!_CPU_PDA_READ(i, cpu_pda_buf))
576
 
                                break;
 
588
                        if (_boot_cpu_pda) {
 
589
                                if (!_CPU_PDA_READ2(i, cpu_pda_buf))
 
590
                                        break;
 
591
                        } else {
 
592
                                if (!_CPU_PDA_READ(i, cpu_pda_buf))
 
593
                                        break;
 
594
                        }
577
595
                } else {
578
596
                        if (!CPU_PDA_READ(i, cpu_pda_buf))
579
597
                                break;
3914
3932
int
3915
3933
x86_64_get_smp_cpus(void)
3916
3934
{
3917
 
        int i, cpus, nr_pda, cpunumber, _cpu_pda;
 
3935
        int i, cpus, nr_pda, cpunumber, _cpu_pda, _boot_cpu_pda;
3918
3936
        char *cpu_pda_buf;
3919
3937
        ulong level4_pgt, cpu_pda_addr;
3920
3938
 
3940
3958
                        _cpu_pda = FALSE;
3941
3959
                }
3942
3960
        }
 
3961
        if (_cpu_pda) {
 
3962
                if (symbol_exists("_boot_cpu_pda"))
 
3963
                        _boot_cpu_pda = TRUE;
 
3964
                else
 
3965
                        _boot_cpu_pda = FALSE;
 
3966
        }
3943
3967
        for (i = cpus = 0; i < nr_pda; i++) {
3944
3968
                if (_cpu_pda) {
3945
 
                        if (!_CPU_PDA_READ(i, cpu_pda_buf))
3946
 
                                break;
 
3969
                        if (_boot_cpu_pda) {
 
3970
                                if (!_CPU_PDA_READ2(i, cpu_pda_buf))
 
3971
                                        break;
 
3972
                        } else {
 
3973
                                if (!_CPU_PDA_READ(i, cpu_pda_buf))
 
3974
                                        break;
 
3975
                        }
3947
3976
                } else {
3948
3977
                        if (!CPU_PDA_READ(i, cpu_pda_buf))
3949
3978
                                break;