PAL Extension library project
From DDCIDeos
Jump to navigationJump to search
This project is a description of the interfaces provided to the PAL by a user library to support platform specific hardware configuration.
Notes
- Things to Consider
- Determine kernel/pal interfaces and possible interaction with user library functions
- Behavior of mapPhysicalAddress64() for multiple calls with same physical address and possibly different parameters during PALcoldstart().
- Each call returns a new virtual address.
- Problems could occur with different caching policy
- Problems may occur if executing code from mapped area
- Naming convention for library and API (current suggestion is libpalext.so for pal extension. Comments and suggestions welcome)
- Match API prefix to .so name (with current library name suggestion API prefix would be palext_)
- ARM, PPC, and x86
- Interrupt Routing (MSI vs legacy vs configured)
- For interrupt configuration, any library action to configure, mask, or unmask a user device interrupt must not affect any standard platform interrupts(window/thread timers, possibly network interrupt provide by the BSP).
- For invocation of an interrupt, the physical interrupt, in whatever for it takes, must map to a platform interrupt defined in the registry so that raisePlatformInterrupt is called correctly.
- PCI vs PCI Express devices vs other peripheral hardware
- Current programs and devices
- Surcouf
- MPC8548E
- PPC
- multiple PCI devices on PCI 1, PCI 2, or PEX controller
- Savianos2
- T2080
- PPC
- FPGA needs to change write protect for SATA device
- Surcouf
Business Minded Thoughts
The question always come down to how much do we want to help the customers and at what cost.
- Possible Delivery Scenarios for Reference BSPs
- Deliver a PAL with user library function (All APIs or limited APIs?) calls
- Deliver workspace and code supporting the user library with pass-through functions. User can update this to try out platform functionality not required by Deos.
- Possible delivery of BSP workspace to give user full control over PAL
- Possible Delivery Scenarios for Production BSPs
- Deliver a PAL with user library function (All APIs or limited APIs?) calls
- Deliver workspace and code supporting the user library with pass-through functions. User can update this to try out platform functionality not required by Deos. If we have enough details about the platform one example in the user library may be possible
- Delivery of BSP workspace to give user full control over PAL
- Possible Delivery Scenarios for Certified BSPs
- Deliver a PAL with user library function (limited APIs to meet user system requirements) calls
- Deliver workspace and code supporting the user library with an example, if we have enough details about the platform. If not, workspace and code for a stub library that supports the needed API.
Useful Links
Basic Interfaces (Still in Work)
| void | palext_PALcoldstart | TBD | PALcoldstart | Initialize controller and devices. Suggested parameter is a pointer to a table of mapped addresses by PAL. This would allow the library access to already mapped areas. Definition of table would have to be provided to library, possibly a header file |
| void | palext_PALwarmstart | TBD | PALwarmstart | Perform any Deos warmstart initialization for controller and devices |
| void | palext_maskPlatformInterrupt | UNSIGNED32 platformInterrupt | maskPlatformInterrupt | Mask a device interrupt. Library would map platform interrupt number to a device and mask the interrupt accordingly, |
| void | palext_unmaskPlatformInterrupt | UNSIGNED32 platformInterrupt | unmaskPlatformInterrupt | Unmask a device interrupt. Library would map platform interrupt number to a device and unmask the interrupt accordingly.
|
| Platform Interrupt Number | palext_platformInterruptNumber | UNSIGNED32 interruptNumber | PAL Interrupt Handler | Determine the platform interrupt number associated with a device |