Changeset 36b209a in mainline


Ignore:
Timestamp:
2005-09-03T07:11:10Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
82a80d3
Parents:
89344d85
Message:

Added volatile to inb/outb, so that it does not optimeze
lot of things out anymore.
Working delay loop.

Location:
arch/amd64
Files:
5 edited

Legend:

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

    r89344d85 r36b209a  
    5454        __u8 out;
    5555
    56         asm (
     56        __asm__ volatile (
    5757                "mov %1, %%dx;"
    5858                "inb %%dx,%%al;"
     
    6060                :"=m"(out)
    6161                :"m"(port)
    62                 :"%dx","%al"
     62                :"%rdx","%rax"
    6363                );
    6464        return out;
     
    6767static inline __u8 outb(__u16 port,__u8 b)
    6868{
    69         asm (
     69        __asm__ volatile (
    7070                "mov %0,%%dx;"
    7171                "mov %1,%%al;"
     
    7373                :
    7474                :"m"( port), "m" (b)
    75                 :"%dx","%al"
     75                :"%rdx","%rax"
    7676                );
    7777}
  • arch/amd64/src/amd64.c

    r89344d85 r36b209a  
    9393void calibrate_delay_loop(void)
    9494{
    95         return;
    9695        i8254_calibrate_delay_loop();
    9796        i8254_normal_operation();
  • arch/amd64/src/asm_utils.S

    r89344d85 r36b209a  
    4040.global interrupt_handlers
    4141.global panic_printf
    42 .global cpuid
    4342
    4443panic_printf:
     
    4645        jmp printf
    4746
     47.global memcpy
     48memcpy:
     49        jmp _memcpy
     50       
     51.global cpuid
    4852.global has_cpuid
    4953.global rdtsc
     
    5155.global set_efer_flag
    5256       
     57
    5358## Determine CPUID support
    5459#
  • arch/amd64/src/delay.S

    r89344d85 r36b209a  
    3737
    3838asm_delay_loop:
    39 0:      lahf
    40         dec %edi
     390:      dec %rdi
    4140        jnz 0b
    4241        ret
    4342
    4443asm_fake_loop:
    45 0:      lahf
    46         dec %edi
     440:      dec %rdi
    4745        jz 0b
    4846        ret
  • arch/amd64/src/dummy.s

    r89344d85 r36b209a  
    4444cpu_sleep:
    4545cpu_print_report:
    46 fpu_init:
    4746       
    4847dummy:
     
    5049        ret
    5150
    52 .global memcpy
    53 memcpy:
    54         jmp _memcpy
     51fpu_init:
     52        fninit
     53        ret
Note: See TracChangeset for help on using the changeset viewer.