Changeset b1cf98c in mainline for arch/ia32


Ignore:
Timestamp:
2005-09-13T20:02:26Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d6dcdd2e
Parents:
2e5f770
Message:

Documentation updates for amd64, mips32 and ia32.

Replace %L with %P printf() formatter in MPS and ACPI detection functions to print addresses in maximal width.

Tweak memmap.S and IA-32 and AMd64 boot.S.
Cancel unneeded instructions.
Replace cmpl $0, %ebx with testl %ebx, %ebx.
Move memmap.S data to K_DATA_START section.

Location:
arch/ia32/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/acpi/acpi.c

    r2e5f770 rb1cf98c  
    109109
    110110rsdp_found:
    111         printf("%L: ACPI Root System Description Pointer\n", acpi_rsdp);
     111        printf("%P: ACPI Root System Description Pointer\n", acpi_rsdp);
    112112
    113113        acpi_rsdt = (struct acpi_rsdt *) (__native) acpi_rsdp->rsdt_address;
     
    144144                                        goto next;
    145145                                *signature_map[j].sdt_ptr = h;
    146                                 printf("%L: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description);
     146                                printf("%P: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description);
    147147                        }
    148148                }
     
    165165                                        goto next;
    166166                                *signature_map[j].sdt_ptr = h;
    167                                 printf("%L: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description);
     167                                printf("%P: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description);
    168168                        }
    169169                }
  • arch/ia32/src/boot/boot.S

    r2e5f770 rb1cf98c  
    5353        xorw %ax, %ax
    5454        movw %ax, %ds
     55        movw %ax, %es
    5556        movw %ax, %ss                                                   # initialize stack segment register
    5657        movl $BOOTSTRAP_OFFSET - 0x400, %esp                            # initialize stack pointer
     
    8687        movw %ax, %ss
    8788       
    88         movb $0xd1, %al                                                 # enable A20 using the keyboard controller
     89        movb $0xd1, %al                                                 # enable A20 using i8042 controller
    8990        outb %al, $0x64
    9091        movb $0xdf, %al
  • arch/ia32/src/boot/memmap.S

    r2e5f770 rb1cf98c  
    3939
    4040memmap_arch_init:
    41 
    4241e820begin:
    43         xorl    %ebx,%ebx       # during first call, ebx must be 0
    44         movw    %bx,%ds
    45         movw    %bx,%es
     42        xorl    %ebx,%ebx                       # during first call, ebx must be 0
    4643        movw    $e820table_boot,%di
    4744        movb    $MEMMAP_E820_MAX_RECORDS,e820counter_boot
    4845e820loop:       
    49         movl    $E820_SMAP,%edx         # control sequence "SMAP"
     46        movl    $E820_SMAP,%edx                 # control sequence "SMAP"
    5047
    51         movl    $0x0000e820,%eax        # service
     48        movl    $0x0000e820,%eax                # service
    5249        movl    $MEMMAP_E820_RECORD_SIZE,%ecx
    5350        int     $0x15
    5451        jc      e820err
    5552       
    56         cmpl    $E820_SMAP,%eax         # verifying BIOS
     53        cmpl    $E820_SMAP,%eax                 # verifying BIOS
    5754        jne     e820err
    5855
    5956        cmpl    $MEMMAP_E820_RECORD_SIZE,%ecx
    60         jne     e820err                 # bad record size - bug in bios
     57        jne     e820err                         # bad record size - bug in bios
    6158       
    62         movw    %di,%ax         # next record
     59        movw    %di,%ax                         # next record
    6360        addw    $MEMMAP_E820_RECORD_SIZE,%ax
    6461        movw    %ax,%di
    6562               
    66         decb    e820counter_boot # buffer is full
     63        decb    e820counter_boot                # buffer is full
    6764        jz      e820end
    6865       
    69         cmpl    $0,%ebx
    70         jne     e820loop
     66        testl   %ebx,%ebx       
     67        jnz     e820loop
    7168       
    7269e820end:
    7370        movb    $MEMMAP_E820_MAX_RECORDS,%al
    7471        subb    e820counter_boot,%al
    75         movb    %al,e820counter_boot # store # of valid entries in e820counter
     72        movb    %al,e820counter_boot            # store # of valid entries in e820counter
    7673
    7774        jmp     e801begin
     
    9289        jc      e801end
    9390       
    94                         # fix problem with some BIOSes which use ax:bx rather than cx:dx
     91        # fix problem with some BIOSes which use ax:bx rather than cx:dx
    9592        testw   %cx,%cx
    9693        jnz     e801cxdx
     
    106103        andl    $0xffff,%ecx
    107104        addl    %ecx,%edx
    108         addl    $0x0400,%edx  # add lower 1 MB - it's not included by e801 method
     105        addl    $0x0400,%edx                    # add lower 1 MB - it's not included by e801 method
    109106        movl    %edx,e801memorysize
    110107e801end:
    111108        ret
    112109
    113         #memory size in 1 kb chunks
     110
     111.section K_DATA_START
     112
     113#memory size in 1 kb chunks
    114114e801memorysize:
    115115        .long   0
    116 
  • arch/ia32/src/smp/mps.c

    r2e5f770 rb1cf98c  
    186186       
    187187fs_found:
    188         printf("%L: MPS Floating Pointer Structure\n", fs);
     188        printf("%P: MPS Floating Pointer Structure\n", fs);
    189189
    190190        frame_not_free((__address) fs);
     
    408408                switch (cur[CT_EXT_ENTRY_TYPE]) {
    409409                        default:
    410                                 printf("%L: skipping MP Configuration Table extended entry type %d\n", cur, cur[CT_EXT_ENTRY_TYPE]);
     410                                printf("%P: skipping MP Configuration Table extended entry type %d\n", cur, cur[CT_EXT_ENTRY_TYPE]);
    411411                                break;
    412412                }
Note: See TracChangeset for help on using the changeset viewer.