Changeset c192134 in mainline for arch/ia32/src


Ignore:
Timestamp:
2005-07-21T13:00:38Z (20 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2884193
Parents:
5d945376
Message:

Clear IOPL on start of system on all CPUs and clear NT before all irets.

Location:
arch/ia32/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/asm.S

    r5d945376 rc192134  
    115115        pop %es
    116116        pop %ds
     117
     118
     119# CLNT
     120  pushfl;
     121        pop %eax;
     122        and $0xFFFFBFFF;
     123        push %eax;
     124        popfl;
     125       
    117126
    118127
  • arch/ia32/src/cpu/cpu.c

    r5d945376 rc192134  
    5050#define INTEL_CPUID_EDX 0x49656e69
    5151
     52
    5253enum vendor {
    5354        VendorUnknown=0,
     
    8788        );     
    8889}
     90
    8991
    9092
  • arch/ia32/src/pm.c

    r5d945376 rc192134  
    129129
    130130
     131
     132static void clean_IOPL_NT_flags(void)
     133{
     134  asm
     135        (
     136    "pushfl;"
     137                "pop %%eax;"
     138                "and $0xffff8fff,%%eax;"
     139                "push %%eax;"
     140                "popfl;"
     141                :
     142                :
     143                :"%eax"
     144        );
     145}
     146
     147
     148
     149
    131150void pm_init(void)
    132151{
     
    166185         */
    167186        __asm__("ltr %0" : : "r" ((__u16) selector(TSS_DES)));
     187       
     188        clean_IOPL_NT_flags();
    168189}
  • arch/ia32/src/userspace.c

    r5d945376 rc192134  
    4747
    4848        __asm__ volatile (""
     49    // CLNT
     50                "pushfl;"
     51                "pop %%eax;"
     52                "and $0xFFFFBFFF;"
     53                "push %%eax;"
     54                "popfl;"
     55
    4956                "pushl %0\n"
    5057                "pushl %1\n"
Note: See TracChangeset for help on using the changeset viewer.