machdep.c (639a626b40503f81a184ccd93fb9bc023f86a3fd) | machdep.c (353b6a5bcb5ae6943903b38ebcc0922b059ff8b8) |
---|---|
1/*- 2 * Copyright (c) 2014 Andrew Turner 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 201 unchanged lines hidden (view full) --- 210 211 /* 212 * XXX The E2H check is wrong, but it's close enough for now. Needs to 213 * be re-evaluated once we're running regularly in EL2. 214 */ 215 return (boot_el == 2 && (hcr_el2 & HCR_E2H) == 0); 216} 217 | 1/*- 2 * Copyright (c) 2014 Andrew Turner 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 201 unchanged lines hidden (view full) --- 210 211 /* 212 * XXX The E2H check is wrong, but it's close enough for now. Needs to 213 * be re-evaluated once we're running regularly in EL2. 214 */ 215 return (boot_el == 2 && (hcr_el2 & HCR_E2H) == 0); 216} 217 |
218bool 219in_vhe(void) 220{ 221 /* If we are currently in EL2 then must be in VHE */ 222 return ((READ_SPECIALREG(CurrentEL) & CURRENTEL_EL_MASK) == 223 CURRENTEL_EL_EL2); 224} 225 |
|
218static void 219cpu_startup(void *dummy) 220{ 221 vm_paddr_t size; 222 int i; 223 224 printf("real memory = %ju (%ju MB)\n", ptoa((uintmax_t)realmem), 225 ptoa((uintmax_t)realmem) / 1024 / 1024); --- 951 unchanged lines hidden --- | 226static void 227cpu_startup(void *dummy) 228{ 229 vm_paddr_t size; 230 int i; 231 232 printf("real memory = %ju (%ju MB)\n", ptoa((uintmax_t)realmem), 233 ptoa((uintmax_t)realmem) / 1024 / 1024); --- 951 unchanged lines hidden --- |