/*
|
/*
|
* linux/arch/arm/lib/getconstants.c
|
* linux/arch/arm/lib/getconstants.c
|
*
|
*
|
* Copyright (C) 1995, 1996 Russell King
|
* Copyright (C) 1995, 1996 Russell King
|
*/
|
*/
|
|
|
#include <linux/mm.h>
|
#include <linux/mm.h>
|
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <linux/unistd.h>
|
#include <linux/unistd.h>
|
|
|
void printdef(char *def, int no)
|
void printdef(char *def, int no)
|
{
|
{
|
printf("#define %s\t%d\n", def, no);
|
printf("#define %s\t%d\n", def, no);
|
}
|
}
|
|
|
#include "getconstants.h"
|
#include "getconstants.h"
|
|
|
int main()
|
int main()
|
{
|
{
|
printf("/*\n * contants.h generated by getconstants\n * DO NOT EDIT!\n */\n");
|
printf("/*\n * contants.h generated by getconstants\n * DO NOT EDIT!\n */\n");
|
|
|
printf("#define _current\t_%s\n", "current_set");
|
printf("#define _current\t_%s\n", "current_set");
|
|
|
#ifdef _PAGE_PRESENT
|
#ifdef _PAGE_PRESENT
|
printdef("PAGE_PRESENT", _PAGE_PRESENT);
|
printdef("PAGE_PRESENT", _PAGE_PRESENT);
|
#endif
|
#endif
|
#ifdef _PAGE_RW
|
#ifdef _PAGE_RW
|
printdef("PAGE_RW", _PAGE_RW);
|
printdef("PAGE_RW", _PAGE_RW);
|
#endif
|
#endif
|
#ifdef _PAGE_USER
|
#ifdef _PAGE_USER
|
printdef("PAGE_USER", _PAGE_USER);
|
printdef("PAGE_USER", _PAGE_USER);
|
#endif
|
#endif
|
#ifdef _PAGE_ACCESSED
|
#ifdef _PAGE_ACCESSED
|
printdef("PAGE_ACCESSED", _PAGE_ACCESSED);
|
printdef("PAGE_ACCESSED", _PAGE_ACCESSED);
|
#endif
|
#endif
|
#ifdef _PAGE_DIRTY
|
#ifdef _PAGE_DIRTY
|
printdef("PAGE_DIRTY", _PAGE_DIRTY);
|
printdef("PAGE_DIRTY", _PAGE_DIRTY);
|
#endif
|
#endif
|
#ifdef _PAGE_READONLY
|
#ifdef _PAGE_READONLY
|
printdef("PAGE_READONLY", _PAGE_READONLY);
|
printdef("PAGE_READONLY", _PAGE_READONLY);
|
#endif
|
#endif
|
#ifdef _PAGE_NOT_USER
|
#ifdef _PAGE_NOT_USER
|
printdef("PAGE_NOT_USER", _PAGE_NOT_USER);
|
printdef("PAGE_NOT_USER", _PAGE_NOT_USER);
|
#endif
|
#endif
|
#ifdef _PAGE_OLD
|
#ifdef _PAGE_OLD
|
printdef("PAGE_OLD", _PAGE_OLD);
|
printdef("PAGE_OLD", _PAGE_OLD);
|
#endif
|
#endif
|
#ifdef _PAGE_CLEAN
|
#ifdef _PAGE_CLEAN
|
printdef("PAGE_CLEAN", _PAGE_CLEAN);
|
printdef("PAGE_CLEAN", _PAGE_CLEAN);
|
#endif
|
#endif
|
#ifdef __HAS_tss_memmap
|
#ifdef __HAS_tss_memmap
|
printdef("TSS_MEMMAP", (int)tss_memmap);
|
printdef("TSS_MEMMAP", (int)tss_memmap);
|
#endif
|
#endif
|
#ifdef __HAS_tss_save
|
#ifdef __HAS_tss_save
|
printdef("TSS_SAVE", (int)tss_save);
|
printdef("TSS_SAVE", (int)tss_save);
|
#endif
|
#endif
|
#ifdef __HAS_tss_memcmap
|
#ifdef __HAS_tss_memcmap
|
printdef("TSS_MEMCMAP", (int)tss_memcmap);
|
printdef("TSS_MEMCMAP", (int)tss_memcmap);
|
#endif
|
#endif
|
#ifdef __HAS_tss_fpesave
|
#ifdef __HAS_tss_fpesave
|
printdef("TSS_FPESAVE", (int)tss_fpesave);
|
printdef("TSS_FPESAVE", (int)tss_fpesave);
|
#endif
|
#endif
|
#ifdef __HAS_mm
|
#ifdef __HAS_mm
|
printdef("MM", (int)mm);
|
printdef("MM", (int)mm);
|
#endif
|
#endif
|
|
|
#ifdef __HAS_pgd
|
#ifdef __HAS_pgd
|
printdef("PGD", (int)pgd);
|
printdef("PGD", (int)pgd);
|
#endif
|
#endif
|
|
|
printf("#define KSWI_BASE 0x900000\n");
|
printf("#define KSWI_BASE 0x900000\n");
|
printf("#define KSWI_SYS_BASE 0x9F0000\n");
|
printf("#define KSWI_SYS_BASE 0x9F0000\n");
|
printf("#define SYS_ERROR0 0x9F0000\n");
|
printf("#define SYS_ERROR0 0x9F0000\n");
|
return 0;
|
return 0;
|
}
|
}
|
|
|