loader: remove shouting from ORB's variable name
[hvf.git] / cp / include / mm.h
blob3314478b9fa394e2504d469388111e46370cd506
1 /*
2 * (C) Copyright 2007-2010 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
4 * This file is released under the GPLv2. See the COPYING file for more
5 * details.
6 */
8 #ifndef __MM_H
9 #define __MM_H
11 extern u64 memsize;
13 extern const u8 zeropage[PAGE_SIZE];
15 /* Turn Low-address protection on */
16 static inline void lap_on(void)
18 u64 cr0;
20 asm volatile(
21 "stctg 0,0,%0\n" /* get cr0 */
22 "oi %1,0x10\n" /* enable */
23 "lctlg 0,0,%0\n" /* reload cr0 */
24 : /* output */
25 : /* input */
26 "m" (cr0),
27 "m" (*(u64*) (((u8*)&cr0) + 4))
31 #endif