Changeset ad36bd6 in mainline


Ignore:
Timestamp:
2005-04-25T12:37:44Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
85bfdcc8
Parents:
c9b8c5c
Message:

Small improvements.

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/include/asm.h

    rc9b8c5c rad36bd6  
    6060
    6161extern void write_dr0(__u32 v);
    62 extern __u32 read_dr0(void);
     62extern inline __u32 read_dr0(void);
    6363
    6464#endif
  • arch/ia32/src/asm.s

    rc9b8c5c rad36bd6  
    5353.global memsetw
    5454.global memcmp
    55 .global write_dr0
    56 .global read_dr0
    57 
    58 write_dr0:
    59         pushl %eax
    60         movl 8(%esp),%eax
    61         movl %eax,%dr0
    62         popl %eax
    63         ret
    64        
    65 read_dr0:
    66         movl %dr0,%eax
    67         ret
    6855
    6956#
  • arch/ia32/src/ia32.c

    rc9b8c5c rad36bd6  
    4545#include <arch/interrupt.h>
    4646
     47#include <arch/asm.h>
     48
     49void write_dr0(__u32 v)
     50{
     51        __asm__("movl %0,%%dr0" : : "r" (v));
     52}
     53
     54inline __u32 read_dr0(void)
     55{
     56        __u32 v;
     57       
     58        __asm__("movl %%dr0,%0\n" : "=r" (v));
     59       
     60        return v;
     61}
    4762
    4863void arch_pre_mm_init(void)
  • arch/ia32/src/smp/mp.c

    rc9b8c5c rad36bd6  
    495495
    496496                if (pr[i].l_apic_id == l_apic_id()) {
    497                         printf("%X: bad processor entry #%d, will not send IPI to myself\n", &pr[i], i);
     497                        printf("%L: bad processor entry #%d, will not send IPI to myself\n", &pr[i], i);
    498498                        continue;
    499499                }
  • include/cpu.h

    rc9b8c5c rad36bd6  
    6060
    6161        int id;
     62        int active;
    6263
    6364        __u16 frequency_mhz;
  • src/cpu/cpu.c

    rc9b8c5c rad36bd6  
    8282        #endif /* __SMP__ */
    8383       
     84        CPU->active = 1;
     85       
    8486        cpu_identify();
    8587        cpu_arch_init();
  • src/main/kinit.c

    rc9b8c5c rad36bd6  
    8787         */
    8888        for (i = 0; i < config.cpu_count; i++)
    89                 cpu_print_report(&cpus[i]);
     89                if (cpus[i].active)
     90                        cpu_print_report(&cpus[i]);
    9091
    9192#ifdef __SMP__
Note: See TracChangeset for help on using the changeset viewer.