Changeset 9756131 in mainline for arch


Ignore:
Timestamp:
2005-08-31T10:00:14Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b9e97fb
Parents:
3de9e5e
Message:

Get rid of memcopy().
All we now have is memcpy() and _memcpy().
memcpy() is defined to be builtin.
Where not applicable, architectures must implement memcpy() code or call slowish _memcopy().

Location:
arch
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/src/dummy.s

    r3de9e5e r9756131  
    5151.global dummy
    5252.global asm_delay_loop
     53.global memcpy
    5354
    5455cpu_priority_high:
     
    7475page_arch_init:
    7576frame_arch_init:
     77memcpy:
    7678
    7779dummy:
  • arch/amd64/src/supplib.c

    r3de9e5e r9756131  
    3131/* TODO: Rewrite to assembler */
    3232
    33 char *memcpy(void *dst, const void *src, size_t cnt)
    34 {
    35         _memcopy(dst, src, cnt);
    36 }
    37 
    38 char *memcopy(void * dst, const void *src, size_t cnt)
    39 {
    40         _memcopy(dst, src, cnt);
    41 }
    42 
    4333void memsetw(__address dst, size_t cnt, __u16 x)
    4434{
  • arch/ia32/src/asm.S

    r3de9e5e r9756131  
    4444.global outw
    4545.global outl
    46 .global memcopy
     46.global memcpy
    4747.global memsetb
    4848.global memsetw
     
    266266DST=8
    267267CNT=16
    268 memcopy:
     268memcpy:
    269269        push %ebp
    270270        movl %esp,%ebp
  • arch/ia32/src/drivers/ega.c

    r3de9e5e r9756131  
    7474                return;
    7575
    76         memcopy((void *)PA2KA(VIDEORAM),(void *)(PA2KA(VIDEORAM) + ROW*2), (SCREEN - ROW)*2); //swaped
     76        memcpy((void *)PA2KA(VIDEORAM), (void *)(PA2KA(VIDEORAM) + ROW*2), (SCREEN - ROW)*2);
    7777        memsetw(PA2KA(VIDEORAM) + (SCREEN - ROW)*2, ROW, 0x0720);
    7878        ega_cursor = ega_cursor - ROW;
  • arch/ia32/src/mm/page.c

    r3de9e5e r9756131  
    7373
    7474                dba = frame_alloc(FRAME_KA | FRAME_PANIC);
    75                 memcopy((void *)dba,(void *)bootstrap_dba , PAGE_SIZE); //swaped
     75                memcpy((void *)dba, (void *)bootstrap_dba , PAGE_SIZE);
    7676                write_cr3(KA2PA(dba));
    7777        }
  • arch/ia32/src/smp/mps.c

    r3de9e5e r9756131  
    313313#ifdef MPSCT_VERBOSE
    314314        char buf[7];
    315         memcopy((void *) buf, (void *) bus->bus_type, 6);
     315        memcpy((void *) buf, (void *) bus->bus_type, 6);
    316316        buf[6] = 0;
    317317        printf("bus%d: %s\n", bus->bus_id, buf);
  • arch/ia32/src/smp/smp.c

    r3de9e5e r9756131  
    140140                        panic("couldn't allocate memory for GDT\n");
    141141
    142                 memcopy(gdt_new, gdt, GDT_ITEMS*sizeof(struct descriptor));           // swaped
     142                memcpy(gdt_new, gdt, GDT_ITEMS*sizeof(struct descriptor));
    143143                memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0);
    144144                gdtr.base = KA2PA((__address) gdt_new);
  • arch/ia64/src/asm.S

    r3de9e5e r9756131  
    3131.global memcpy
    3232memcpy:
    33         /*
    34          * Switch the role of first two arguments
    35          */
    36         sub r33 = r33, r32      ;;
    37         add r32 = r32, r33      ;;
    38         sub r33 = r32, r33     
    39                
    40         br _memcopy
    41 
    42 .global memcopy
    43 memcopy:
    44         br _memcopy
     33        br _memcpy
    4534
    4635.global memsetb
  • arch/mips/src/asm.s

    r3de9e5e r9756131  
    151151        nop
    152152
    153 .global memcopy
    154 memcopy:
    155         j _memcopy
     153.global memcpy
     154memcpy:
     155        j _memcpy
    156156        nop
    157157
  • arch/ppc/src/dummy.s

    r3de9e5e r9756131  
    3030
    3131.global memcpy
    32 .global memcopy
    3332.global cpu_priority_read
    3433.global memsetb
     
    4746
    4847memcpy:
    49 memcopy:
    5048cpu_priority_read:
    5149memsetb:
Note: See TracChangeset for help on using the changeset viewer.