Changeset 18e0a6c in mainline for arch/ia32/src/asm.s
- Timestamp:
- 2005-06-09T23:43:45Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 74df77d
- Parents:
- d896525
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/src/asm.s
rd896525 r18e0a6c 31 31 .text 32 32 33 .global cpu_priority_high34 .global cpu_priority_low35 .global cpu_priority_restore36 .global cpu_priority_read37 33 .global cpu_halt 38 34 .global cpu_sleep 39 35 .global paging_on 40 .global cpu_read_dba41 .global cpu_write_dba42 .global cpu_read_cr243 36 .global enable_l_apic_in_msr 44 37 .global interrupt_handlers … … 55 48 56 49 57 ## Set priority level high58 #59 # Disable interrupts and return previous60 # EFLAGS in EAX.61 #62 cpu_priority_high:63 pushf64 pop %eax65 cli66 ret67 68 69 ## Set priority level low70 #71 # Enable interrupts and return previous72 # EFLAGS in EAX.73 #74 cpu_priority_low:75 pushf76 pop %eax77 sti78 ret79 80 81 ## Restore priority level82 #83 # Restore EFLAGS.84 #85 cpu_priority_restore:86 push 4(%esp)87 popf88 ret89 90 ## Return raw priority level91 #92 # Return EFLAFS in EAX.93 #94 cpu_priority_read:95 pushf96 pop %eax97 ret98 99 100 ## Halt the CPU101 #102 # Halt the CPU using HLT.103 #104 cpu_halt:105 cpu_sleep:106 hlt107 ret108 109 110 50 ## Turn paging on 111 51 # … … 124 64 125 65 126 ## Read CR3127 #128 # Store CR3 in EAX.129 #130 cpu_read_dba:131 movl %cr3,%eax132 ret133 134 135 ## Write CR3136 #137 # Set CR3.138 #139 cpu_write_dba:140 pushl %eax141 movl 8(%esp),%eax142 movl %eax,%cr3143 popl %eax144 ret145 146 147 ## Read CR2148 #149 # Store CR2 in EAX.150 #151 cpu_read_cr2:152 movl %cr2,%eax153 ret154 155 156 66 ## Enable local APIC 157 67 #
Note:
See TracChangeset
for help on using the changeset viewer.