2020-07-25 23:50:03 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=9" / >
2021-04-12 20:54:38 +00:00
< meta name = "generator" content = "Doxygen 1.9.1" / >
2020-07-25 23:50:03 +00:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
< title > MyOS Kernel: kernel/cpu/i386/gdt.c File Reference< / title >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "jquery.js" > < / script >
< script type = "text/javascript" src = "dynsections.js" > < / script >
< link href = "navtree.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "resize.js" > < / script >
< script type = "text/javascript" src = "navtreedata.js" > < / script >
< script type = "text/javascript" src = "navtree.js" > < / script >
< link href = "search/search.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "search/searchdata.js" > < / script >
< script type = "text/javascript" src = "search/search.js" > < / script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr style = "height: 56px;" >
< td id = "projectalign" style = "padding-left: 0.5em;" >
< div id = "projectname" > MyOS Kernel
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
2021-04-12 20:54:38 +00:00
<!-- Generated by Doxygen 1.9.1 -->
2020-07-25 23:50:03 +00:00
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
2021-04-12 20:54:38 +00:00
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
2020-07-25 23:50:03 +00:00
/* @license-end */
< / script >
< script type = "text/javascript" src = "menudata.js" > < / script >
< script type = "text/javascript" src = "menu.js" > < / script >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */< / script >
< div id = "main-nav" > < / div >
< / div > <!-- top -->
< div id = "side-nav" class = "ui-resizable side-nav-resizable" >
< div id = "nav-tree" >
< div id = "nav-tree-contents" >
< div id = "nav-sync" class = "sync" > < / div >
< / div >
< / div >
< div id = "splitbar" style = "-moz-user-select:none;"
class="ui-resizable-handle">
< / div >
< / div >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3& dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('gdt_8c.html',''); initResizable(); });
/* @license-end */
< / script >
< div id = "doc-content" >
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
< / div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< iframe src = "javascript:void(0)" frameborder = "0"
name="MSearchResults" id="MSearchResults">
< / iframe >
< / div >
< div class = "header" >
< div class = "summary" >
< a href = "#nested-classes" > Data Structures< / a > |
< a href = "#define-members" > Macros< / a > |
< a href = "#func-members" > Functions< / a > |
< a href = "#var-members" > Variables< / a > < / div >
< div class = "headertitle" >
< div class = "title" > gdt.c File Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< div class = "textblock" > < code > #include < stdint.h> < / code > < br / >
< code > #include < string.h> < / code > < br / >
< / div > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "nested-classes" > < / a >
Data Structures< / h2 > < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > struct   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structgdt__entry.html" > gdt_entry< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > struct   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structgdt__description.html" > gdt_description< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > struct   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structtss__entry.html" > tss_entry< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "define-members" > < / a >
Macros< / h2 > < / td > < / tr >
< tr class = "memitem:a389dd5398d15be0a98756235e791e6cd" > < td class = "memItemLeft" align = "right" valign = "top" > < a id = "a389dd5398d15be0a98756235e791e6cd" > < / a >
#define  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "gdt_8c.html#a389dd5398d15be0a98756235e791e6cd" > NUM_ENTRIES< / a >       6< / td > < / tr >
< tr class = "memdesc:a389dd5398d15be0a98756235e791e6cd" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Number of entries in the GDT. < br / > < / td > < / tr >
< tr class = "separator:a389dd5398d15be0a98756235e791e6cd" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "func-members" > < / a >
Functions< / h2 > < / td > < / tr >
< tr class = "memitem:a8ecb0e32b56815d5bd60db521567f471" > < td class = "memItemLeft" align = "right" valign = "top" > static void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "gdt_8c.html#a8ecb0e32b56815d5bd60db521567f471" > set_entry< / a > (int i, uint32_t base, uint32_t limit, uint8_t access)< / td > < / tr >
< tr class = "separator:a8ecb0e32b56815d5bd60db521567f471" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aa27ea5f3de17cbaeabd741a1218d35ff" > < td class = "memItemLeft" align = "right" valign = "top" > static void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "gdt_8c.html#aa27ea5f3de17cbaeabd741a1218d35ff" > write_tss< / a > (int32_t num, uint16_t ss0, uint32_t esp0)< / td > < / tr >
< tr class = "separator:aa27ea5f3de17cbaeabd741a1218d35ff" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ac3220c4aae127e5028cb2388ad787108" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "gdt_8c.html#ac3220c4aae127e5028cb2388ad787108" > allow_all_ports< / a > ()< / td > < / tr >
< tr class = "separator:ac3220c4aae127e5028cb2388ad787108" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a5f661be1f1f60c6cef730a8c2024dc94" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "gdt_8c.html#a5f661be1f1f60c6cef730a8c2024dc94" > block_all_ports< / a > ()< / td > < / tr >
< tr class = "separator:a5f661be1f1f60c6cef730a8c2024dc94" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aaa7a7d6a41843f8a0c64fd66967feef4" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "gdt_8c.html#aaa7a7d6a41843f8a0c64fd66967feef4" > gdt_init< / a > ()< / td > < / tr >
< tr class = "separator:aaa7a7d6a41843f8a0c64fd66967feef4" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "var-members" > < / a >
Variables< / h2 > < / td > < / tr >
< tr class = "memitem:acd7ef9e5bed2fba0c703d4b08514f0a7" > < td class = "memItemLeft" align = "right" valign = "top" > < a id = "acd7ef9e5bed2fba0c703d4b08514f0a7" > < / a >
uint32_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "gdt_8c.html#acd7ef9e5bed2fba0c703d4b08514f0a7" > int_stack_top< / a > < / td > < / tr >
< tr class = "memdesc:acd7ef9e5bed2fba0c703d4b08514f0a7" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Initial kernel stack before the kernel's first yield. < br / > < / td > < / tr >
< tr class = "separator:acd7ef9e5bed2fba0c703d4b08514f0a7" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a0f4d3a4a64bfc46940c10cb3bbb7b9cb" > < td class = "memItemLeft" align = "right" valign = "top" > < a id = "a0f4d3a4a64bfc46940c10cb3bbb7b9cb" > < / a >
static < a class = "el" href = "structgdt__entry.html" > gdt_entry< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "gdt_8c.html#a0f4d3a4a64bfc46940c10cb3bbb7b9cb" > gdt< / a > [< a class = "el" href = "gdt_8c.html#a389dd5398d15be0a98756235e791e6cd" > NUM_ENTRIES< / a > ]< / td > < / tr >
< tr class = "memdesc:a0f4d3a4a64bfc46940c10cb3bbb7b9cb" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > The GDT. < br / > < / td > < / tr >
< tr class = "separator:a0f4d3a4a64bfc46940c10cb3bbb7b9cb" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a823bcbc577ee7b289fea00385b3cfcd6" > < td class = "memItemLeft" align = "right" valign = "top" > < a id = "a823bcbc577ee7b289fea00385b3cfcd6" > < / a >
static < a class = "el" href = "structgdt__description.html" > gdt_description< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "gdt_8c.html#a823bcbc577ee7b289fea00385b3cfcd6" > gdt_desc< / a > < / td > < / tr >
< tr class = "memdesc:a823bcbc577ee7b289fea00385b3cfcd6" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > The value to load into the GDTR. < br / > < / td > < / tr >
< tr class = "separator:a823bcbc577ee7b289fea00385b3cfcd6" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a455af0f71aa0353da14de2d25189d05f" > < td class = "memItemLeft" align = "right" valign = "top" > < a id = "a455af0f71aa0353da14de2d25189d05f" > < / a >
< a class = "el" href = "structtss__entry.html" > tss_entry< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "gdt_8c.html#a455af0f71aa0353da14de2d25189d05f" > tss< / a > < / td > < / tr >
< tr class = "memdesc:a455af0f71aa0353da14de2d25189d05f" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > The TSS. < br / > < / td > < / tr >
< tr class = "separator:a455af0f71aa0353da14de2d25189d05f" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
< h2 class = "groupheader" > Function Documentation< / h2 >
< a id = "ac3220c4aae127e5028cb2388ad787108" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ac3220c4aae127e5028cb2388ad787108" > ◆ < / a > < / span > allow_all_ports()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void allow_all_ports < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Allows all ports in the IOPB. < / p >
< / div >
< / div >
< a id = "a5f661be1f1f60c6cef730a8c2024dc94" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a5f661be1f1f60c6cef730a8c2024dc94" > ◆ < / a > < / span > block_all_ports()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void block_all_ports < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Blocks all ports in the IOPB. < / p >
< / div >
< / div >
< a id = "aaa7a7d6a41843f8a0c64fd66967feef4" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#aaa7a7d6a41843f8a0c64fd66967feef4" > ◆ < / a > < / span > gdt_init()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void gdt_init < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Initializes the GDT & TSS. < / p >
< / div >
< / div >
< a id = "a8ecb0e32b56815d5bd60db521567f471" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a8ecb0e32b56815d5bd60db521567f471" > ◆ < / a > < / span > set_entry()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > static void set_entry < / td >
< td > (< / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > i< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > base< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > limit< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t  < / td >
< td class = "paramname" > < em > access< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > static< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Set a GDT entry. < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > i< / td > < td > The GDT entry to set. < / td > < / tr >
< tr > < td class = "paramname" > base< / td > < td > The base of the GDT entry. < / td > < / tr >
< tr > < td class = "paramname" > limit< / td > < td > The limit of the GDT entry. < / td > < / tr >
< tr > < td class = "paramname" > access< / td > < td > The access byte of the GDT entry. < / td > < / tr >
< / table >
< / dd >
< / dl >
< / div >
< / div >
< a id = "aa27ea5f3de17cbaeabd741a1218d35ff" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#aa27ea5f3de17cbaeabd741a1218d35ff" > ◆ < / a > < / span > write_tss()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > static void write_tss < / td >
< td > (< / td >
< td class = "paramtype" > int32_t  < / td >
< td class = "paramname" > < em > num< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint16_t  < / td >
< td class = "paramname" > < em > ss0< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > esp0< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > static< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Set a GDT entry. < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > num< / td > < td > The GDT entry to set. < / td > < / tr >
< tr > < td class = "paramname" > ss0< / td > < td > The kernel stack selector. < / td > < / tr >
< tr > < td class = "paramname" > esp0< / td > < td > The kernel stack pointer. < / td > < / tr >
< / table >
< / dd >
< / dl >
< / div >
< / div >
< / div > <!-- contents -->
< / div > <!-- doc - content -->
<!-- start footer part -->
< div id = "nav-path" class = "navpath" > <!-- id is needed for treeview function! -->
< ul >
< li class = "navelem" > < a class = "el" href = "dir_dc43877d82dd332f9fb2071fcca799d6.html" > kernel< / a > < / li > < li class = "navelem" > < a class = "el" href = "dir_de6efc35b99b831d558bda0d93c38d37.html" > cpu< / a > < / li > < li class = "navelem" > < a class = "el" href = "dir_4f1b1f9de0a2e79802f54c784fb69b12.html" > i386< / a > < / li > < li class = "navelem" > < a class = "el" href = "gdt_8c.html" > gdt.c< / a > < / li >
2021-04-12 20:54:38 +00:00
< li class = "footer" > Generated by < a href = "https://www.doxygen.org/index.html" > < img class = "footer" src = "doxygen.svg" width = "104" height = "31" alt = "doxygen" / > < / a > 1.9.1 < / li >
2020-07-25 23:50:03 +00:00
< / ul >
< / div >
< / body >
< / html >