Changeset c0699467 in mainline for kernel/arch/ppc32


Ignore:
Timestamp:
2011-08-09T18:08:23Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b538ca5c
Parents:
3666d386
Message:

do not provide general access to kernel headers from uspace, only allow specific headers to be accessed or shared
externalize headers which serve as kernel/uspace API/ABI into a special tree

Location:
kernel/arch/ppc32
Files:
10 edited
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/include/asm.h

    r3666d386 rc0699467  
    3838#include <typedefs.h>
    3939#include <config.h>
    40 #include <arch/cpu.h>
     40#include <arch/msr.h>
    4141#include <arch/mm/asid.h>
    4242#include <trace.h>
  • kernel/arch/ppc32/include/context_offset.h

    r3666d386 rc0699467  
    7575
    7676#ifdef __ASM__
    77 # include <arch/asm/regname.h>
    7877
    79 # ctx: address of the structure with saved context
     78#ifdef KERNEL
     79
     80#include <arch/asm/regname.h>
     81
     82#else /* KERNEL */
     83
     84#include <libarch/regname.h>
     85
     86#endif /* KERNEL */
     87
     88/* ctx: address of the structure with saved context */
    8089.macro CONTEXT_SAVE_ARCH_CORE ctx:req
    8190        stw sp, OFFSET_SP(\ctx)
     
    102111.endm
    103112
    104 # ctx: address of the structure with saved context
     113/* ctx: address of the structure with saved context */
    105114.macro CONTEXT_RESTORE_ARCH_CORE ctx:req
    106115        lwz sp, OFFSET_SP(\ctx)
  • kernel/arch/ppc32/include/cpu.h

    r3666d386 rc0699467  
    3636#define KERN_ppc32_CPU_H_
    3737
    38 /* MSR bits */
    39 #define MSR_DR  (1 << 4)
    40 #define MSR_IR  (1 << 5)
    41 #define MSR_PR  (1 << 14)
    42 #define MSR_EE  (1 << 15)
    43 
    44 /* HID0 bits */
    45 #define HID0_STEN  (1 << 24)
    46 #define HID0_ICE   (1 << 15)
    47 #define HID0_DCE   (1 << 14)
    48 #define HID0_ICFI  (1 << 11)
    49 #define HID0_DCI   (1 << 10)
    50 
    51 #ifndef __ASM__
    52 
    5338#include <typedefs.h>
    5439#include <trace.h>
     
    6752}
    6853
    69 #endif /* __ASM__ */
    70 
    7154#endif
    7255
  • kernel/arch/ppc32/include/exception.h

    r3666d386 rc0699467  
    3737
    3838#include <typedefs.h>
    39 #include <arch/cpu.h>
     39#include <arch/msr.h>
    4040#include <trace.h>
    4141
  • kernel/arch/ppc32/include/istate.h

    r3666d386 rc0699467  
    3636#define KERN_ppc32_EXCEPTION_H_
    3737
    38 #include <typedefs.h>
    39 #include <arch/cpu.h>
    4038#include <trace.h>
     39
     40#ifdef KERNEL
     41
     42#include <arch/msr.h>
     43
     44#else /* KERNEL */
     45
     46#include <libarch/msr.h>
     47
     48#endif /* KERNEL */
    4149
    4250typedef struct istate {
  • kernel/arch/ppc32/include/mm/frame.h

    r3666d386 rc0699467  
    3939#define FRAME_SIZE   (1 << FRAME_WIDTH)
    4040
    41 #ifdef KERNEL
    4241#ifndef __ASM__
    4342
     
    6362
    6463#endif /* __ASM__ */
    65 #endif /* KERNEL */
    6664
    6765#endif
  • kernel/arch/ppc32/include/mm/page.h

    r3666d386 rc0699467  
    4141#define PAGE_WIDTH  FRAME_WIDTH
    4242#define PAGE_SIZE   FRAME_SIZE
    43 
    44 #ifdef KERNEL
    4543
    4644#ifndef __ASM__
     
    181179#endif /* __ASM__ */
    182180
    183 #endif /* KERNEL */
    184 
    185181#endif
    186182
  • kernel/arch/ppc32/include/msr.h

    r3666d386 rc0699467  
    11/*
    2  * Copyright (c) 2011 Jiri Svoboda
     2 * Copyright (c) 2005 Martin Decky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup generic
     29/** @addtogroup ppc32
    3030 * @{
    3131 */
    3232/** @file
    33  *
    34  * This header allows including a kernel header using typedefs.h from
    35  * libc. User-space code should use sys/types.h directly.
    3633 */
    3734
    38 #ifndef LIBC_TYPEDEFS_H_
    39 #define LIBC_TYPEDEFS_H_
     35#ifndef KERN_ppc32_MSR_H_
     36#define KERN_ppc32_MSR_H_
    4037
    41 #include <sys/types.h>
     38/* MSR bits */
     39#define MSR_DR  (1 << 4)
     40#define MSR_IR  (1 << 5)
     41#define MSR_PR  (1 << 14)
     42#define MSR_EE  (1 << 15)
     43
     44/* HID0 bits */
     45#define HID0_STEN  (1 << 24)
     46#define HID0_ICE   (1 << 15)
     47#define HID0_DCE   (1 << 14)
     48#define HID0_ICFI  (1 << 11)
     49#define HID0_DCI   (1 << 10)
    4250
    4351#endif
  • kernel/arch/ppc32/src/asm.S

    r3666d386 rc0699467  
    2828
    2929#include <arch/asm/regname.h>
    30 #include <arch/cpu.h>
     30#include <arch/msr.h>
    3131
    3232.text
  • kernel/arch/ppc32/src/exception.S

    r3666d386 rc0699467  
    2828
    2929#include <arch/asm/regname.h>
    30 #include <arch/cpu.h>
     30#include <arch/msr.h>
    3131#include <arch/mm/page.h>
    3232
  • kernel/arch/ppc32/src/ppc32.c

    r3666d386 rc0699467  
    4141#include <interrupt.h>
    4242#include <genarch/fb/fb.h>
    43 #include <genarch/fb/visuals.h>
     43#include <abi/fb/visuals.h>
    4444#include <genarch/ofw/ofw_tree.h>
    4545#include <genarch/ofw/pci.h>
    4646#include <userspace.h>
    4747#include <mm/page.h>
    48 #include <proc/uarg.h>
     48#include <abi/proc/uarg.h>
    4949#include <console/console.h>
    5050#include <sysinfo/sysinfo.h>
Note: See TracChangeset for help on using the changeset viewer.