romutil.py (5852:1a40b07bbc30) | romutil.py (5853:606b9525071d) |
---|---|
1# Copyright (c) 2008 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 29 unchanged lines hidden (view full) --- 38 # Get the 64 bit interrupt or trap gate descriptor from the IDT 39 # 40 41 # Load the gate descriptor from the IDT 42 slli t4, t1, 4, dataSize=8 43 ld t2, idtr, [1, t0, t4], 8, dataSize=8, addressSize=8 44 ld t4, idtr, [1, t0, t4], dataSize=8, addressSize=8 45 | 1# Copyright (c) 2008 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 29 unchanged lines hidden (view full) --- 38 # Get the 64 bit interrupt or trap gate descriptor from the IDT 39 # 40 41 # Load the gate descriptor from the IDT 42 slli t4, t1, 4, dataSize=8 43 ld t2, idtr, [1, t0, t4], 8, dataSize=8, addressSize=8 44 ld t4, idtr, [1, t0, t4], dataSize=8, addressSize=8 45 |
46 # Check permissions | 46 # Make sure the descriptor is a legal gate. |
47 chks t1, t4, IntGateCheck 48 | 47 chks t1, t4, IntGateCheck 48 |
49 mov t1, t1, t4, dataSize=8 50 51 # Check that it's the right type 52 srli t4, t1, 40, dataSize=8 53 andi t4, t4, 0xe, dataSize=8 54 xori t4, t4, 0xe, flags=(EZF,), dataSize=8 55 fault "new GeneralProtection(0)", flags=(nCEZF,) 56 57 | |
58 # 59 # Get the target CS descriptor using the selector in the gate 60 # descriptor. 61 # 62 srli t10, t4, 16, dataSize=8 63 andi t5, t10, 0xF8, dataSize=8 64 andi t0, t10, 0x4, flags=(EZF,), dataSize=2 65 br rom_local_label("globalDescriptor"), flags=(CEZF,) --- 129 unchanged lines hidden --- | 49 # 50 # Get the target CS descriptor using the selector in the gate 51 # descriptor. 52 # 53 srli t10, t4, 16, dataSize=8 54 andi t5, t10, 0xF8, dataSize=8 55 andi t0, t10, 0x4, flags=(EZF,), dataSize=2 56 br rom_local_label("globalDescriptor"), flags=(CEZF,) --- 129 unchanged lines hidden --- |