mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
hw_x86_64: Calculate limit using _mt_gdt_end in Gdt::load
This commit is contained in:
parent
6f5ea78a51
commit
1102b2b562
@ -5,6 +5,7 @@
|
||||
#include <mtc_util.h>
|
||||
|
||||
extern int _mt_gdt_start;
|
||||
extern int _mt_gdt_end;
|
||||
|
||||
namespace Genode
|
||||
{
|
||||
@ -26,8 +27,9 @@ class Genode::Gdt
|
||||
*/
|
||||
static void load(addr_t const virt_base)
|
||||
{
|
||||
asm volatile ("lgdt %0" : : "m" (Pseudo_descriptor (0x37,
|
||||
_virt_mtc_addr(virt_base, (addr_t)&_mt_gdt_start))));
|
||||
asm volatile ("lgdt %0" : : "m" (Pseudo_descriptor
|
||||
(_mt_gdt_end - _mt_gdt_start - 1,
|
||||
_virt_mtc_addr(virt_base, (addr_t)&_mt_gdt_start))));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -300,6 +300,7 @@
|
||||
.long 0x8900
|
||||
.long 0
|
||||
.long 0
|
||||
.global _mt_gdt_end
|
||||
_mt_gdt_end:
|
||||
|
||||
/* end of the mode transition code */
|
||||
|
Loading…
x
Reference in New Issue
Block a user