|
|
1.1 ! root 1: ! 2: #include <mach/machine/asm.h> ! 3: ! 4: .text ! 5: .code16 ! 6: ! 7: /* ! 8: * Test the A20 address line; return true if it is enabled. ! 9: */ ! 10: ENTRY(i16_raw_test_a20) ! 11: xorw %ax,%ax ! 12: movw %ax,%fs ! 13: notw %ax ! 14: movw %ax,%gs ! 15: ! 16: /* See if the values in already in the corresponding locations ! 17: are the same. */ ! 18: movw %fs:0,%ax ! 19: cmpw %gs:16,%ax ! 20: jnz 1f ! 21: ! 22: /* Yes; try changing one and see if they're still the same. */ ! 23: movw %ax,%dx ! 24: notw %ax ! 25: movw %ax,%fs:0 ! 26: cmpw %gs:16,%ax ! 27: movw %dx,%fs:0 ! 28: jnz 1f ! 29: ! 30: xorl %eax,%eax ! 31: ret ! 32: 1: ! 33: movl $1,%eax ! 34: ret ! 35:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.