Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/include/pcb.h
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
* Keep pcb_regs first for faster access in switch.S | * Keep pcb_regs first for faster access in switch.S | ||||
*/ | */ | ||||
struct pcb { | struct pcb { | ||||
struct switchframe pcb_regs; /* CPU state */ | struct switchframe pcb_regs; /* CPU state */ | ||||
u_int pcb_flags; | u_int pcb_flags; | ||||
#define PCB_OWNFPU 0x00000001 | #define PCB_OWNFPU 0x00000001 | ||||
#define PCB_NOALIGNFLT 0x00000002 | #define PCB_NOALIGNFLT 0x00000002 | ||||
caddr_t pcb_onfault; /* On fault handler */ | caddr_t pcb_onfault; /* On fault handler */ | ||||
/* | |||||
* This structure must be binary compatible regardless of PMAP | |||||
* version being used. Create reserved section for NEW_PMAP to | |||||
* make other variables be placed exactly in the same memory | |||||
* addresses. | |||||
*/ | |||||
#ifdef ARM_NEW_PMAP | #ifdef ARM_NEW_PMAP | ||||
kib: After the latest revision, you do not need #ifdef ARM_NEW_PMAP. Use ARM_NEW_PMAP definition… | |||||
uint32_t pcb_pagedir; /* TTB0 value */ | uint32_t pcb_pagedir; /* TTB0 value */ | ||||
uint32_t *__pcb_rsvd_1; | |||||
Not Done Inline ActionsI would rather you just do something more obvious to the reader that doesn't have to worry about padding by having the same exact definitions: uint32_t *_pcb_rsvd0; uint32_t _pcb_rsvd1; u_int _pcb_rsvd2; jhb: I would rather you just do something more obvious to the reader that doesn't have to worry… | |||||
uint32_t __pcb_rsvd_2; | |||||
u_int __pcb_rsvd_3; | |||||
#else | #else | ||||
vm_offset_t pcb_pagedir; /* PT hooks */ | vm_offset_t pcb_pagedir; /* PT hooks */ | ||||
uint32_t *pcb_pl1vec; /* PTR to vector_base L1 entry*/ | uint32_t *pcb_pl1vec; /* PTR to vector_base L1 entry*/ | ||||
uint32_t pcb_l1vec; /* Value to stuff on ctx sw */ | uint32_t pcb_l1vec; /* Value to stuff on ctx sw */ | ||||
u_int pcb_dacr; /* Domain Access Control Reg */ | u_int pcb_dacr; /* Domain Access Control Reg */ | ||||
#endif | #endif | ||||
struct vfp_state pcb_vfpstate; /* VP/NEON state */ | struct vfp_state pcb_vfpstate; /* VP/NEON state */ | ||||
u_int pcb_vfpcpu; /* VP/NEON last cpu */ | u_int pcb_vfpcpu; /* VP/NEON last cpu */ | ||||
} __aligned(8); /* | } __aligned(8); /* | ||||
Not Done Inline ActionsI suggest removing the '======' delimiters. Also, please specify in comment what compatibility is wanted there, i.e. that we want binary compatibility between PCB layouts for old and new pmaps. The code change looks fine. kib: I suggest removing the '======' delimiters. Also, please specify in comment what compatibility… | |||||
* We need the PCB to be aligned on 8 bytes, as we may | * We need the PCB to be aligned on 8 bytes, as we may | ||||
* access it using ldrd/strd, and ARM ABI require it | * access it using ldrd/strd, and ARM ABI require it | ||||
* to by aligned on 8 bytes. | * to by aligned on 8 bytes. | ||||
*/ | */ | ||||
/* | /* | ||||
* No additional data for core dumps. | * No additional data for core dumps. | ||||
*/ | */ | ||||
Show All 12 Lines |
After the latest revision, you do not need #ifdef ARM_NEW_PMAP. Use ARM_NEW_PMAP definition always. A comment that three fields are only used by new pmap case would be enough.
Is it important that pcb_pagedir is vm_offset_t for v5/old v6 pmaps ?