Allow testing of exec pages on PowerPC BookE.
Make return_one actually do the right thing.
This commit is contained in:
parent
88f39ca44e
commit
a030baf591
|
@ -1,11 +1,11 @@
|
|||
/* $NetBSD: exec_prot_support.c,v 1.1 2011/07/18 23:16:10 jym Exp $ */
|
||||
/* $NetBSD: exec_prot_support.c,v 1.2 2012/03/16 08:51:47 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Jean-Yves Migeon.
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -30,12 +30,23 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: exec_prot_support.c,v 1.1 2011/07/18 23:16:10 jym Exp $");
|
||||
__RCSID("$NetBSD: exec_prot_support.c,v 1.2 2012/03/16 08:51:47 matt Exp $");
|
||||
|
||||
#include "../../common/exec_prot.h"
|
||||
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
int
|
||||
exec_prot_support(void)
|
||||
{
|
||||
return NOTIMPL;
|
||||
int execprot = 0;
|
||||
size_t len = sizeof(execprot);
|
||||
|
||||
if (sysctlbyname("machdep.execprot", &execprot, &len, NULL, 0) < 0)
|
||||
return NOTIMPL;
|
||||
|
||||
if (execprot)
|
||||
return PERPAGE_XP;
|
||||
|
||||
return NO_XP;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
/* $NetBSD: return_one.S,v 1.1 2011/07/18 23:16:10 jym Exp $ */
|
||||
/* $NetBSD: return_one.S,v 1.2 2012/03/16 08:51:47 matt Exp $ */
|
||||
|
||||
#include <machine/asm.h>
|
||||
|
||||
.globl return_one, return_one_end;
|
||||
.globl return_one, return_one_end
|
||||
|
||||
return_one: return_one_end:
|
||||
nop
|
||||
_ENTRY(return_one)
|
||||
li %r3, 1
|
||||
blr
|
||||
return_one_end:
|
||||
END(return_one)
|
||||
|
|
Loading…
Reference in New Issue