X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/5d5c5d0d5b79ade9a973d55186ffda2638ba2b6e..21362eb3e66fd2c787aee132bce100a44d71a99c:/osfmk/i386/genassym.c diff --git a/osfmk/i386/genassym.c b/osfmk/i386/genassym.c index a93967318..69c61ff46 100644 --- a/osfmk/i386/genassym.c +++ b/osfmk/i386/genassym.c @@ -1,31 +1,29 @@ /* * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. * - * @APPLE_LICENSE_OSREFERENCE_HEADER_START@ + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. The rights granted to you under the - * License may not be used to create, or enable the creation or - * redistribution of, unlawful or unlicensed copies of an Apple operating - * system, or to circumvent, violate, or enable the circumvention or - * violation of, any terms of an Apple operating system software license - * agreement. - * - * Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and * limitations under the License. - * - * @APPLE_LICENSE_OSREFERENCE_HEADER_END@ + * + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ /* * @OSF_COPYRIGHT@ @@ -69,26 +67,21 @@ #include #include #include -#include -#include #include #include #include -#include -#include +#include +#include #include +#include #include #include #include #include -#include -#include -#include -#include -#include -#include #include +#include #include +#include #include /* @@ -158,8 +151,6 @@ main( DECLARE("TASK_MACH_EXC_PORT", offsetof(task_t, exc_actions[EXC_MACH_SYSCALL].port)); - DECLARE("TASK_SYSCALLS_MACH", offsetof(struct task *, syscalls_mach)); - DECLARE("TASK_SYSCALLS_UNIX", offsetof(struct task *, syscalls_unix)); /* These fields are being added on demand */ DECLARE("ACT_MACH_EXC_PORT", @@ -167,131 +158,50 @@ main( DECLARE("ACT_TASK", offsetof(thread_t, task)); DECLARE("ACT_PCB", offsetof(thread_t, machine.pcb)); - DECLARE("ACT_SPF", offsetof(thread_t, machine.specFlags)); DECLARE("ACT_MAP", offsetof(thread_t, map)); - DECLARE("ACT_COPYIO_STATE", offsetof(thread_t, machine.copyio_state)); - DECLARE("ACT_PCB_ISS", offsetof(thread_t, machine.xxx_pcb.iss)); - DECLARE("ACT_PCB_IDS", offsetof(thread_t, machine.xxx_pcb.ids)); - - DECLARE("WINDOWS_CLEAN", WINDOWS_CLEAN); DECLARE("MAP_PMAP", offsetof(vm_map_t, pmap)); #define IKS ((size_t) (STACK_IKS(0))) - DECLARE("KSS_EBX", IKS + offsetof(struct x86_kernel_state32 *, k_ebx)); - DECLARE("KSS_ESP", IKS + offsetof(struct x86_kernel_state32 *, k_esp)); - DECLARE("KSS_EBP", IKS + offsetof(struct x86_kernel_state32 *, k_ebp)); - DECLARE("KSS_EDI", IKS + offsetof(struct x86_kernel_state32 *, k_edi)); - DECLARE("KSS_ESI", IKS + offsetof(struct x86_kernel_state32 *, k_esi)); - DECLARE("KSS_EIP", IKS + offsetof(struct x86_kernel_state32 *, k_eip)); + DECLARE("KSS_EBX", IKS + offsetof(struct i386_kernel_state *, k_ebx)); + DECLARE("KSS_ESP", IKS + offsetof(struct i386_kernel_state *, k_esp)); + DECLARE("KSS_EBP", IKS + offsetof(struct i386_kernel_state *, k_ebp)); + DECLARE("KSS_EDI", IKS + offsetof(struct i386_kernel_state *, k_edi)); + DECLARE("KSS_ESI", IKS + offsetof(struct i386_kernel_state *, k_esi)); + DECLARE("KSS_EIP", IKS + offsetof(struct i386_kernel_state *, k_eip)); - DECLARE("IKS_SIZE", sizeof(struct x86_kernel_state32)); + DECLARE("IKS_SIZE", sizeof(struct i386_kernel_state)); DECLARE("IEL_SIZE", sizeof(struct i386_exception_link)); - DECLARE("PCB_FPS", offsetof(pcb_t, ifps)); + DECLARE("PCB_FPS", offsetof(pcb_t, ims.ifps)); DECLARE("PCB_ISS", offsetof(pcb_t, iss)); - DECLARE("DS_DR0", offsetof(struct x86_debug_state32 *, dr0)); - DECLARE("DS_DR1", offsetof(struct x86_debug_state32 *, dr1)); - DECLARE("DS_DR2", offsetof(struct x86_debug_state32 *, dr2)); - DECLARE("DS_DR3", offsetof(struct x86_debug_state32 *, dr3)); - DECLARE("DS_DR4", offsetof(struct x86_debug_state32 *, dr4)); - DECLARE("DS_DR5", offsetof(struct x86_debug_state32 *, dr5)); - DECLARE("DS_DR6", offsetof(struct x86_debug_state32 *, dr6)); - DECLARE("DS_DR7", offsetof(struct x86_debug_state32 *, dr7)); - - DECLARE("DS64_DR0", offsetof(struct x86_debug_state64 *, dr0)); - DECLARE("DS64_DR1", offsetof(struct x86_debug_state64 *, dr1)); - DECLARE("DS64_DR2", offsetof(struct x86_debug_state64 *, dr2)); - DECLARE("DS64_DR3", offsetof(struct x86_debug_state64 *, dr3)); - DECLARE("DS64_DR4", offsetof(struct x86_debug_state64 *, dr4)); - DECLARE("DS64_DR5", offsetof(struct x86_debug_state64 *, dr5)); - DECLARE("DS64_DR6", offsetof(struct x86_debug_state64 *, dr6)); - DECLARE("DS64_DR7", offsetof(struct x86_debug_state64 *, dr7)); - - DECLARE("FP_VALID", offsetof(struct x86_fpsave_state *,fp_valid)); - - DECLARE("SS_FLAVOR", offsetof(x86_saved_state_t *, flavor)); - DECLARE("SS_32", x86_SAVED_STATE32); - DECLARE("SS_64", x86_SAVED_STATE64); - -#define R_(x) offsetof(x86_saved_state_t *, ss_32.x) - DECLARE("R_CS", R_(cs)); - DECLARE("R_SS", R_(ss)); - DECLARE("R_DS", R_(ds)); - DECLARE("R_ES", R_(es)); - DECLARE("R_FS", R_(fs)); - DECLARE("R_GS", R_(gs)); - DECLARE("R_UESP", R_(uesp)); - DECLARE("R_EBP", R_(ebp)); - DECLARE("R_EAX", R_(eax)); - DECLARE("R_EBX", R_(ebx)); - DECLARE("R_ECX", R_(ecx)); - DECLARE("R_EDX", R_(edx)); - DECLARE("R_ESI", R_(esi)); - DECLARE("R_EDI", R_(edi)); - DECLARE("R_TRAPNO", R_(trapno)); - DECLARE("R_ERR", R_(err)); - DECLARE("R_EFLAGS", R_(efl)); - DECLARE("R_EIP", R_(eip)); - DECLARE("R_CR2", R_(cr2)); - DECLARE("ISS32_SIZE", sizeof (x86_saved_state32_t)); - -#define R64_(x) offsetof(x86_saved_state_t *, ss_64.x) - DECLARE("R64_FS", R64_(fs)); - DECLARE("R64_GS", R64_(gs)); - DECLARE("R64_R8", R64_(r8)); - DECLARE("R64_R9", R64_(r9)); - DECLARE("R64_R10", R64_(r10)); - DECLARE("R64_R11", R64_(r11)); - DECLARE("R64_R12", R64_(r12)); - DECLARE("R64_R13", R64_(r13)); - DECLARE("R64_R14", R64_(r14)); - DECLARE("R64_R15", R64_(r15)); - DECLARE("R64_RBP", R64_(rbp)); - DECLARE("R64_RAX", R64_(rax)); - DECLARE("R64_RBX", R64_(rbx)); - DECLARE("R64_RCX", R64_(rcx)); - DECLARE("R64_RDX", R64_(rdx)); - DECLARE("R64_RSI", R64_(rsi)); - DECLARE("R64_RDI", R64_(rdi)); - DECLARE("R64_V_ARG6", R64_(v_arg6)); - DECLARE("R64_V_ARG7", R64_(v_arg7)); - DECLARE("R64_V_ARG8", R64_(v_arg8)); - DECLARE("R64_CS", R64_(isf.cs)); - DECLARE("R64_SS", R64_(isf.ss)); - DECLARE("R64_RSP", R64_(isf.rsp)); - DECLARE("R64_TRAPNO", R64_(isf.trapno)); - DECLARE("R64_TRAPFN", R64_(isf.trapfn)); - DECLARE("R64_ERR", R64_(isf.err)); - DECLARE("R64_RFLAGS", R64_(isf.rflags)); - DECLARE("R64_RIP", R64_(isf.rip)); - DECLARE("R64_CR2", R64_(cr2)); - DECLARE("ISS64_OFFSET", R64_(isf)); - DECLARE("ISS64_SIZE", sizeof (x86_saved_state64_t)); - -#define ISF64_(x) offsetof(x86_64_intr_stack_frame_t *, x) - DECLARE("ISF64_TRAPNO", ISF64_(trapno)); - DECLARE("ISF64_TRAPFN", ISF64_(trapfn)); - DECLARE("ISF64_ERR", ISF64_(err)); - DECLARE("ISF64_RIP", ISF64_(rip)); - DECLARE("ISF64_CS", ISF64_(cs)); - DECLARE("ISF64_RFLAGS", ISF64_(rflags)); - DECLARE("ISF64_RSP", ISF64_(rsp)); - DECLARE("ISF64_SS", ISF64_(ss)); - DECLARE("ISF64_SIZE", sizeof(x86_64_intr_stack_frame_t)); - - DECLARE("ISC32_OFFSET", offsetof(x86_saved_state_compat32_t *, isf64)); -#define ISC32_(x) offsetof(x86_saved_state_compat32_t *, isf64.x) - DECLARE("ISC32_TRAPNO", ISC32_(trapno)); - DECLARE("ISC32_TRAPFN", ISC32_(trapfn)); - DECLARE("ISC32_ERR", ISC32_(err)); - DECLARE("ISC32_RIP", ISC32_(rip)); - DECLARE("ISC32_CS", ISC32_(cs)); - DECLARE("ISC32_RFLAGS", ISC32_(rflags)); - DECLARE("ISC32_RSP", ISC32_(rsp)); - DECLARE("ISC32_SS", ISC32_(ss)); + DECLARE("FP_VALID", offsetof(struct i386_fpsave_state *,fp_valid)); + DECLARE("FP_SAVE_STATE", + offsetof(struct i386_fpsave_state *, fp_save_state)); + + DECLARE("R_CS", offsetof(struct i386_saved_state *, cs)); + DECLARE("R_SS", offsetof(struct i386_saved_state *, ss)); + DECLARE("R_UESP", offsetof(struct i386_saved_state *, uesp)); + DECLARE("R_EBP", offsetof(struct i386_saved_state *, ebp)); + DECLARE("R_EAX", offsetof(struct i386_saved_state *, eax)); + DECLARE("R_EBX", offsetof(struct i386_saved_state *, ebx)); + DECLARE("R_ECX", offsetof(struct i386_saved_state *, ecx)); + DECLARE("R_EDX", offsetof(struct i386_saved_state *, edx)); + DECLARE("R_ESI", offsetof(struct i386_saved_state *, esi)); + DECLARE("R_EDI", offsetof(struct i386_saved_state *, edi)); + DECLARE("R_TRAPNO", offsetof(struct i386_saved_state *, trapno)); + DECLARE("R_ERR", offsetof(struct i386_saved_state *, err)); + DECLARE("R_EFLAGS", offsetof(struct i386_saved_state *, efl)); + DECLARE("R_EIP", offsetof(struct i386_saved_state *, eip)); + DECLARE("R_CR2", offsetof(struct i386_saved_state *, cr2)); + DECLARE("ISS_SIZE", sizeof (struct i386_saved_state)); + + DECLARE("I_ECX", offsetof(struct i386_interrupt_state *, ecx)); + DECLARE("I_EIP", offsetof(struct i386_interrupt_state *, eip)); + DECLARE("I_CS", offsetof(struct i386_interrupt_state *, cs)); + DECLARE("I_EFL", offsetof(struct i386_interrupt_state *, efl)); DECLARE("NBPG", I386_PGBYTES); DECLARE("PAGE_SIZE", I386_PGBYTES); @@ -304,7 +214,6 @@ main( DECLARE("KERNELBASE", VM_MIN_KERNEL_ADDRESS); DECLARE("LINEAR_KERNELBASE", LINEAR_KERNEL_ADDRESS); DECLARE("KERNEL_STACK_SIZE", KERNEL_STACK_SIZE); - DECLARE("KERNEL_UBER_BASE_HI32", KERNEL_UBER_BASE_HI32); DECLARE("COMM_PAGE_BASE_ADDR", _COMM_PAGE_BASE_ADDRESS); @@ -317,6 +226,7 @@ main( DECLARE("PTE_PS", INTEL_PTE_PS); DECLARE("PTE_U", INTEL_PTE_USER); DECLARE("PTE_INVALID", ~INTEL_PTE_VALID); + DECLARE("CR4_PAE", CR4_PAE); DECLARE("NPGPTD", NPGPTD); DECLARE("IDTSZ", IDTSZ); @@ -327,27 +237,19 @@ main( DECLARE("KERNEL_DS", KERNEL_DS); DECLARE("USER_CS", USER_CS); DECLARE("USER_DS", USER_DS); - DECLARE("KERNEL64_CS", KERNEL64_CS); - DECLARE("USER64_CS", USER64_CS); DECLARE("KERNEL_TSS", KERNEL_TSS); DECLARE("KERNEL_LDT", KERNEL_LDT); - DECLARE("DF_TSS", DF_TSS); - DECLARE("MC_TSS", MC_TSS); #if MACH_KDB DECLARE("DEBUG_TSS", DEBUG_TSS); #endif /* MACH_KDB */ DECLARE("CPU_DATA_GS", CPU_DATA_GS); - DECLARE("SYSENTER_CS", SYSENTER_CS); - DECLARE("SYSENTER_TF_CS",SYSENTER_TF_CS); - DECLARE("SYSENTER_DS", SYSENTER_DS); - DECLARE("SYSCALL_CS", SYSCALL_CS); - DECLARE("USER_WINDOW_SEL", USER_WINDOW_SEL); - DECLARE("PHYS_WINDOW_SEL", PHYS_WINDOW_SEL); DECLARE("CPU_THIS", offsetof(cpu_data_t *, cpu_this)); DECLARE("CPU_ACTIVE_THREAD", offsetof(cpu_data_t *, cpu_active_thread)); + DECLARE("CPU_ACTIVE_KLOADED", + offsetof(cpu_data_t *, cpu_active_kloaded)); DECLARE("CPU_ACTIVE_STACK", offsetof(cpu_data_t *, cpu_active_stack)); DECLARE("CPU_KERNEL_STACK", @@ -372,63 +274,10 @@ main( offsetof(cpu_data_t *,cpu_pending_ast)); DECLARE("CPU_DESC_TABLEP", offsetof(cpu_data_t *,cpu_desc_tablep)); - DECLARE("CPU_DESC_INDEX", - offsetof(cpu_data_t *,cpu_desc_index)); - DECLARE("CDI_GDT", - offsetof(cpu_desc_index_t *,cdi_gdt)); - DECLARE("CDI_IDT", - offsetof(cpu_desc_index_t *,cdi_idt)); DECLARE("CPU_PROCESSOR", offsetof(cpu_data_t *,cpu_processor)); - DECLARE("CPU_INT_STATE", - offsetof(cpu_data_t *, cpu_int_state)); - - DECLARE("CPU_HI_ISS", - offsetof(cpu_data_t *, cpu_hi_iss)); - DECLARE("CPU_TASK_CR3", - offsetof(cpu_data_t *, cpu_task_cr3)); - DECLARE("CPU_ACTIVE_CR3", - offsetof(cpu_data_t *, cpu_active_cr3)); - DECLARE("CPU_KERNEL_CR3", - offsetof(cpu_data_t *, cpu_kernel_cr3)); - - DECLARE("CPU_IS64BIT", - offsetof(cpu_data_t *, cpu_is64bit)); - DECLARE("CPU_TASK_MAP", - offsetof(cpu_data_t *, cpu_task_map)); - DECLARE("TASK_MAP_32BIT", TASK_MAP_32BIT); - DECLARE("TASK_MAP_64BIT", TASK_MAP_64BIT); - DECLARE("TASK_MAP_64BIT_SHARED", TASK_MAP_64BIT_SHARED); - DECLARE("CPU_UBER_USER_GS_BASE", - offsetof(cpu_data_t *, cpu_uber.cu_user_gs_base)); - DECLARE("CPU_UBER_ISF", - offsetof(cpu_data_t *, cpu_uber.cu_isf)); - DECLARE("CPU_UBER_TMP", - offsetof(cpu_data_t *, cpu_uber.cu_tmp)); - DECLARE("CPU_DR7", - offsetof(cpu_data_t *, cpu_dr7)); - - DECLARE("hwIntCnt", offsetof(cpu_data_t *,cpu_hwIntCnt)); - - DECLARE("enaExpTrace", enaExpTrace); - DECLARE("enaExpTraceb", enaExpTraceb); - DECLARE("enaUsrFCall", enaUsrFCall); - DECLARE("enaUsrFCallb", enaUsrFCallb); - DECLARE("enaUsrPhyMp", enaUsrPhyMp); - DECLARE("enaUsrPhyMpb", enaUsrPhyMpb); - DECLARE("enaDiagSCs", enaDiagSCs); - DECLARE("enaDiagSCsb", enaDiagSCsb); - DECLARE("enaDiagEM", enaDiagEM); - DECLARE("enaDiagEMb", enaDiagEMb); - DECLARE("enaNotifyEM", enaNotifyEM); - DECLARE("enaNotifyEMb", enaNotifyEMb); - DECLARE("dgLock", offsetof(struct diagWork *, dgLock)); - DECLARE("dgFlags", offsetof(struct diagWork *, dgFlags)); - DECLARE("dgMisc1", offsetof(struct diagWork *, dgMisc1)); - DECLARE("dgMisc2", offsetof(struct diagWork *, dgMisc2)); - DECLARE("dgMisc3", offsetof(struct diagWork *, dgMisc3)); - DECLARE("dgMisc4", offsetof(struct diagWork *, dgMisc4)); - DECLARE("dgMisc5", offsetof(struct diagWork *, dgMisc5)); + DECLARE("CPU_RTC_NANOTIME", + offsetof(cpu_data_t *,cpu_rtc_nanotime)); DECLARE("INTEL_PTE_KERNEL", INTEL_PTE_VALID|INTEL_PTE_WRITE); DECLARE("PTDPTDI", PTDPTDI); @@ -436,8 +285,6 @@ main( DECLARE("PDESIZE", PDESIZE); DECLARE("PTESIZE", PTESIZE); DECLARE("APTDPTDI", APTDPTDI); - DECLARE("HIGH_MEM_BASE", HIGH_MEM_BASE); - DECLARE("HIGH_IDT_BASE", pmap_index_to_virt(HIGH_FIXED_IDT)); DECLARE("KERNELBASEPDE", (LINEAR_KERNEL_ADDRESS >> PDESHIFT) * @@ -453,7 +300,6 @@ main( DECLARE("K_TRAP_GATE", ACC_P|ACC_PL_K|ACC_TRAP_GATE); DECLARE("U_TRAP_GATE", ACC_P|ACC_PL_U|ACC_TRAP_GATE); DECLARE("K_INTR_GATE", ACC_P|ACC_PL_K|ACC_INTR_GATE); - DECLARE("U_INTR_GATE", ACC_P|ACC_PL_U|ACC_INTR_GATE); DECLARE("K_TSS", ACC_P|ACC_PL_K|ACC_TSS); /* @@ -462,22 +308,33 @@ main( DECLARE("USL_INTERLOCK", offsetof(usimple_lock_t, interlock)); DECLARE("INTSTACK_SIZE", INTSTACK_SIZE); + DECLARE("MP_GDT", offsetof(struct mp_desc_table *, gdt[0])); + DECLARE("MP_IDT", offsetof(struct mp_desc_table *, idt[0])); DECLARE("TIMER_LOW", offsetof(struct timer *, low_bits)); DECLARE("TIMER_HIGH", offsetof(struct timer *, high_bits)); DECLARE("TIMER_HIGHCHK", offsetof(struct timer *, high_bits_check)); - DECLARE("KADDR", offsetof(struct boot_args *, kaddr)); - DECLARE("KSIZE", offsetof(struct boot_args *, ksize)); - DECLARE("MEMORYMAP", offsetof(struct boot_args *, MemoryMap)); - DECLARE("DEVICETREEP", offsetof(struct boot_args *, deviceTreeP)); - - DECLARE("RNT_TSC_BASE", - offsetof(rtc_nanotime_t *, tsc_base)); - DECLARE("RNT_NS_BASE", - offsetof(rtc_nanotime_t *, ns_base)); - DECLARE("RNT_SCALE", - offsetof(rtc_nanotime_t *, scale)); - DECLARE("RNT_SHIFT", - offsetof(rtc_nanotime_t *, shift)); + DECLARE("KADDR", offsetof(struct KernelBootArgs *, kaddr)); + DECLARE("KSIZE", offsetof(struct KernelBootArgs *, ksize)); + + DECLARE("NANOTIME_BASE_TSC", + offsetof(commpage_nanotime_t*, nt_base_tsc)); + DECLARE("NANOTIME_BASE_NS", + offsetof(commpage_nanotime_t*, nt_base_ns)); + DECLARE("NANOTIME_SCALE", + offsetof(commpage_nanotime_t*, nt_scale)); + DECLARE("NANOTIME_SHIFT", + offsetof(commpage_nanotime_t*, nt_shift)); + DECLARE("NANOTIME_CHECK_TSC", + offsetof(commpage_nanotime_t*, nt_check_tsc)); + + DECLARE("RTN_TSC", + offsetof(rtc_nanotime_t *, rnt_tsc)); + DECLARE("RTN_NANOS", + offsetof(rtc_nanotime_t *, rnt_nanos)); + DECLARE("RTN_SCALE", + offsetof(rtc_nanotime_t *, rnt_scale)); + DECLARE("RTN_SHIFT", + offsetof(rtc_nanotime_t *, rnt_shift)); /* values from kern/timer.h */ DECLARE("TIMER_LOW", @@ -498,22 +355,6 @@ main( DECLARE("USER_TIMER", offsetof(struct thread *, user_timer)); - DECLARE("OnProc", OnProc); - - - DECLARE("GCAP_ID", offsetof(hpetReg_t *, GCAP_ID)); - DECLARE("GEN_CONF", offsetof(hpetReg_t *, GEN_CONF)); - DECLARE("GINTR_STA", offsetof(hpetReg_t *, GINTR_STA)); - DECLARE("MAIN_CNT", offsetof(hpetReg_t *, MAIN_CNT)); - DECLARE("TIM0_CONF", offsetof(hpetReg_t *, TIM0_CONF)); - DECLARE("TIM_CONF", TIM_CONF); - DECLARE("Tn_INT_ENB_CNF", Tn_INT_ENB_CNF); - DECLARE("TIM0_COMP", offsetof(hpetReg_t *, TIM0_COMP)); - DECLARE("TIM_COMP", TIM_COMP); - DECLARE("TIM1_CONF", offsetof(hpetReg_t *, TIM1_CONF)); - DECLARE("TIM1_COMP", offsetof(hpetReg_t *, TIM1_COMP)); - DECLARE("TIM2_CONF", offsetof(hpetReg_t *, TIM2_CONF)); - DECLARE("TIM2_COMP", offsetof(hpetReg_t *, TIM2_COMP)); - return (0); } +