The Pedigree Project  0.1
Todo List
Member ARM926EInterruptManager::initialiseProcessor ()
and some smp/acpi function
Member ARM926EInterruptManager::syscall (Service_t service, uintptr_t function, uintptr_t p1=0, uintptr_t p2=0, uintptr_t p3=0, uintptr_t p4=0, uintptr_t p5=0)
Software interrupt
Class Arm926EVirtualAddressSpace::FirstLevelDescriptor_Section::Desc
this does not add up to 31 or 32... :S
Class Arm926EVirtualAddressSpace::Translation
I don't think all this belongs here. Put here to get the structures then read up on how PPC does it.
Member ArmBeagleSerial::interrupt (size_t nInterruptNumber, InterruptState &state)

Queue somewhere for input

Handle

Handle

Member ArmBeagleSerial::setBase (uintptr_t nBaseAddr)
this is the UART3 IRQ... needs to be set for each UART
Member ARMV7InterruptManager::initialiseProcessor ()
and some smp/acpi function
Member ARMV7InterruptManager::registerInterruptHandler (size_t interruptNumber, InterruptHandler *handler)

This is very machine-specific...

Needs locking

Member ARMV7InterruptManager::registerInterruptHandlerDebugger (size_t interruptNumber, InterruptHandler *handler)
Needs locking
Member ARMV7InterruptManager::syscall (Service_t service, uintptr_t function, uintptr_t p1=0, uintptr_t p2=0, uintptr_t p3=0, uintptr_t p4=0, uintptr_t p5=0)
Software interrupt
Member ARMV7InterruptState::getInterruptNumber () const
implement
Member ARMV7InterruptState::getSyscallNumber () const
implement
Member ARMV7InterruptState::getSyscallService () const
implement
Member ArmV7KernelVirtualAddressSpace::initialiseKernelAddressSpace ()
Correct flags
Member ArmV7KernelVirtualAddressSpace::m_Instance
MAX_PROCESSORS
Member ArmV7PhysicalMemoryManager::allocatePage ()
Cache compact if needed
Member ArmV7PhysicalMemoryManager::pin (physical_uintptr_t page)
Implement pin()
Member ARMV7StackFrame::getParameter (size_t n)
Write.
Member ArmVersatile::initialise ()
setup second pl011 as well (removed to make it work) and detect existance of pl011s
Member AtaDisk::doRead (uint64_t location)

getPageSize() here

logical sector size here

What's the best way to handle this?

What's the best way to handle this?

Member AtaDisk::doWrite (uint64_t location)

might still want to allow writes - assuming CDROM here...

logical sector size here

What's the best way to handle this?

What's the best way to handle this?

Member AtaDisk::initialise (size_t nUnit=~0)

should check that this doesn't break on ATAPI

Testing needs to be done on more than just CD/DVD and block devices...

Member AtaDisk::m_IrqReceived
A condvar would really be better here.
Member AtaDisk::sendCommand (size_t nUnit, uintptr_t pCommand, uint8_t nCommandSize, uintptr_t pRespBuffer, uint16_t nRespBytes, bool bWrite)
What's the best way to handle this?
Member BeagleGpio::initspecific (int n, volatile unsigned int *gpio)
When implementing within Pedigree, we'll have a much nicer interface for string manipulation and writing stuff to the UART.
Member Buffer< T, allowShortOperation >::canRead (bool block)
handle errors better
Member BusMasterIde::add (uintptr_t buffer, size_t nBytes)
Can't write if a read is in progress, and vice versa
Member BusMasterIdeCommandRegister::__attribute__ ((packed)) bits
I blanked when writing this, so I can't remember if this defines "bits" as a packed structure or if the attribute is ignored...
Member Cache::insert (uintptr_t key, bool *alreadyExisted=nullptr)
remove this, it makes the bloom filter pointless
Member Cache::insert (uintptr_t key, size_t size, bool *alreadyExisted=nullptr)
no - this doesn't check the full size!
Member Cache::timer (uint64_t delta, InterruptState &state)
something with locks
Member CdiDisk::flush (uint64_t location)
Fix that.
Member CdiNet::CdiNet (struct cdi_net_device *device)
Check endianness - should be fine, but we'll see...
Member CdiNet::CdiNet (Network *pDev, struct cdi_net_device *device)
Check endianness - should be fine, but we'll see...
Member ConditionVariable::wait (Mutex &mutex, Time::Timestamp &timeout)
this is actually buggy as it won't respect the timeout
Member ConsoleFile::inputLineDiscipline (char *buf, size_t len, size_t flags=~0U, const char *controlChars=0)
remove me, this is because of the port
Member ConsolePhysicalFile::getLast ()
this is no good
Member ConsolePhysicalFile::writeBytewise (uint64_t location, uint64_t size, uintptr_t buffer, bool bCanBlock=true)

handle small writes

disciplineSize can be bigger than size due to edits, how do we manage this instead of lying?

Member Cord::operator[] (size_t index) const
should this be more crashy?
Member Debugger::initialise ()
Figure out a way of getting similar functionality
Member Debugger::start (InterruptState &state, LargeStaticString &description)
OZMFGBARBIE, this needs major cleanup. Look at the state of it!! :O
Member Device::foreach (Callback callback, Device *root=0)

add filters to avoid the need to filter in callbacks

add a way to end iteration early

Module dhcp4
:
  • Support for interfaces other than Ethernet (SLIP, PPP, ...)
Class Directory
Need to add a way to count # of times a particular lookup has happened so we can potentially offer a way to cull directory entries that are otherwise just consuming space.
Member Directory::addEphemeralFile (File *pFile)
removal will still want to hit the Filesystem here! not good!
Member Directory::destroyEntry (File *file)
figure out how to destroy File objects!
Member Directory::remove (const HashedStringView &s)
add sibling keys for other HashTable functions
Member Display::setScreenMode (size_t nWidth, size_t nHeight, size_t nBpp)
"Closest match": allow a threshold for a match in case the specific mode specified cannot be set.
Member Dm9601::initialiseDriver ()
Timeout
Member Dm9601::readEeprom (uint8_t offset)
Locking
Member Dm9601::readMii (uint8_t offset)
Locking
Member Dm9601::writeEeprom (uint8_t offset, uint16_t data)
Locking
Member Dm9601::writeMii (uint8_t offset, uint16_t data)
Locking
Member DwarfState::getRegister (unsigned int nRegister, const DwarfState &initialState)
This needs to be better - we need to check if the CFA is borked so we don't try to do a stupid read - This requires VirtualAddressSpace, I think.
Member DynamicLinker::initPlt (Elf *pElf, uintptr_t value)

Change this to use the size of the elf!

Page size here.

Page size here.

ARMify

Change this to use the size of the elf!

Page size here.

Page size here.

Change this to use the size of the elf!

Page size here.

Page size here.

Member DynamicLinker::resolvePltSymbol (uintptr_t libraryId, uintptr_t symIdx)
Why is there a /4 here?
Member Ehci::initialiseController ()
Handle non-32-bit aligned values for the EECP
Member Elf::allocate (uint8_t *pBuffer, size_t length, uintptr_t &loadBase, SymbolTable *pSymtab=0, bool bAllocate=true, size_t *pSize=0)
Don't rely on this. Look at nchain in the hash table.
Member Elf::applyRelocation (ElfRela_t rela, ElfSectionHeader_t *pSh, SymbolTable *pSymtab=0, uintptr_t loadBase=0, SymbolTable::Policy policy=SymbolTable::LocalFirst)
Should be A + B?
Member Elf::extractEntryPoint (uint8_t *pBuffer, size_t length, uintptr_t &entry)
check magic
Member Elf::extractInformation (uint8_t *pBuffer, size_t length, size_t &phdrCount, size_t &phdrEntrySize, uintptr_t &phdrAddress)
check magic
Member Elf::loadModule (uint8_t *pBuffer, size_t length, uintptr_t &loadBase, size_t &loadSize, SymbolTable *pSymbolTableCopy=0)

Figure out how to map to the pages loaded by GRUB instead of copying into newly-allocated pages here.

we should handle hidden symbols better so they are only needed for relocation and not tracked forever

Member Elf::lookupSymbol (uintptr_t addr, uintptr_t *startAddr, T *symbolTable)
we should check for STV_HIDDEN symbol - but can't tell if we're local or not here and if we're local, a hidden symbol is totally fine. Need to indicate which ELF the relocation is for.
Member Elf::populateSymbolTable (SymbolTable *pSymtab, uintptr_t loadBase)
Don't rely on this. Look at nchain in the hash table.
Member Ext2Directory::addEntry (String filename, File *pFile, size_t type)

Ensure 4-byte alignment.

Previous directory entry might need its reclen updated to point to this new entry (as directory entries cannot cross block boundaries).

Update our i_size for our directory.

Member Ext2Directory::cacheDirectoryContents ()
need to handle short/failed reads better
Member Ext2Directory::removeEntry (const String &filename, Ext2Node *pFile)
Okay, this is not quite enough. The previous entry needs to be updated to skip past this now-empty entry. If this was the first entry, a blank record must be created to point to either the next entry or the end of the block.
Member Ext2Filesystem::createNode (File *parent, const String &filename, uint32_t mask, const String &value, size_t type, uint32_t inodeOverride=0)

Endianness!

save group descriptor block number elsewhere

Member Ext2Filesystem::findFreeBlocks (uint32_t inode, size_t count, Vector< uint32_t > &blocks)
should release blocks if we failed to allocate enough blocks.
Member Ext2Filesystem::findFreeBlocksInGroup (uint32_t group, size_t maxCount, Vector< uint32_t > &blocks)

Endianness - to ensure correct operation, must ptr be little endian?

save group descriptor block number elsewhere

Member Ext2Filesystem::findFreeInode ()

Endianness - to ensure correct operation, must ptr be little endian?

save group descriptor block number elsewhere

Member Ext2Filesystem::initialise (Disk *pDisk)

Check for journal required features.

Check all read-only features.

Set g_pSparseBlock as read-only.

Member Ext2Filesystem::releaseBlock (uint32_t block)
save group descriptor block number elsewhere
Member Ext2Filesystem::releaseInode (uint32_t inode)
save group descriptor block number elsewhere
Member Ext2Filesystem::remove (File *parent, File *file)
save group descriptor block number elsewhere
Member Ext2Node::fileAttributeChanged (size_t size, size_t atime, size_t mtime, size_t ctime)
4GB files.
Member FatDirectory::addEntry (String filename, File *pFile, size_t type)

Some (sets of) entries will need to cross a cluster boundary

Fill in other fields (eg, timestamps)

Member FatDirectory::cacheDirectoryContents ()
String::chomp should take an N parameter (default 1)
Member FatDirectory::FatDirectory (String name, uintptr_t cluster, class FatFilesystem *pFs, File *pParent, FatFileInfo &info, uint32_t dirClus=0, uint32_t dirOffset=0)

Permissions

Ownership of files

Member FatDirectory::removeEntry (File *pFile)
Save the previous cluster in FatFile too
Member FatFilesystem::convertFilenameTo (String filename) const
This should increment if a file is found with the same name!
Member FatFilesystem::findFreeCluster (bool bLock=false)
For FAT32, update the FSInfo structure
Member FatFilesystem::getClusterEntry (uint32_t cluster, bool bLock=true)
Member FatFilesystem::getFatDate (Time::Timestamp timestamp) const
Write
Member FatFilesystem::setClusterEntry (uint32_t cluster, uint32_t value, bool bLock=true)
Member File::read (uint64_t location, uint64_t size, uintptr_t buffer, bool bCanBlock=true) final
consider caching this still
Member File::readIntoCache (uintptr_t block)
handle readBlock failing here
Member File::write (uint64_t location, uint64_t size, uintptr_t buffer, bool bCanBlock=true) final
consider caching this still
Member File::writeCallback (CacheConstants::CallbackCause cause, uintptr_t loc, uintptr_t page, void *meta)
handle block size < 4K??
Member FileDescriptor::fdflags
swap this to private and fix everything that breaks
Member FileDescriptor::FileDescriptor (File *newFile, uint64_t newOffset=0, size_t newFd=0xFFFFFFFF, int fdFlags=0, int flFlags=0, LockedFile *lf=0)
need a copy constructor for networkImpl
Member FileDescriptor::setStatusFlags (int newFlags)
this blocks all operations on the socket. However, we should only be blocking operations associated with this descriptor on the socket! maybe pass in a FileDescriptor to recvfrom et al?
Member FileDisk::cacheIsCritical ()
Could it be possible to allow writes to go through to the file we've mounted? Then this could return true if the backing device is read-only, false otherwise.
Member FileDisk::write (uint64_t location)
implement this
Member Filesystem::findNode (File *pNode, StringView path)
do we need to do permissions checks at each intermediate step?
Member Font::Font (cairo_t *pCairo, size_t requestedSize, const char *pFilename, bool bCache, size_t nWidth)
UTF-32 endianness
Member Font::render (const char *s, size_t x, size_t y, uint32_t f, uint32_t b, bool bBack=true, bool bBold=false, bool bItalic=false, bool bUnderline=false)
cleanup
Member Framebuffer::redraw (size_t x=~0UL, size_t y=~0UL, size_t w=~0UL, size_t h=~0UL, bool bChild=false)
nChildren parameter - this is not necessary if no children!
Member Framebuffer::swBlit (Graphics::Buffer *pBuffer, size_t srcx, size_t srcy, size_t destx, size_t desty, size_t width, size_t height)
This code is broken for the case where srcx/srcy are not zero. :(
Member Framebuffer::swCopy (size_t srcx, size_t srcy, size_t destx, size_t desty, size_t w, size_t h)
consider source bytes per line?
Member Framebuffer::swCreateBuffer (const void *srcData, Graphics::PixelFormat srcFormat, size_t width, size_t height, uint32_t *pPalette)
8-bit
Member Framebuffer::swRect (size_t x, size_t y, size_t width, size_t height, uint32_t colour, Graphics::PixelFormat format)

Handle 24-bit properly

Handle 24-bit properly

Member Framebuffer::swSetPixel (size_t x, size_t y, uint32_t colour, Graphics::PixelFormat format=Graphics::Bits32_Argb)
8-bit
Member FramebufferFile::command (const size_t command, void *buffer)

What if there is no text mode!?

Magic number.

What if there is no text mode!?

Member FramebufferFile::m_pGraphicsParameters
pinBlock/unpinBlock should pin/unpin physical pages!
Member FramebufferFile::readBlock (uint64_t location)
If this is NOT virtual, we need to do something about that.
Member g_FreePages
expose this via PhysicalMemoryManager interface
Member GraphicsService::serve (ServiceFeatures::Type type, void *pData, size_t dataLen)
Sanity check
Member HashedPageTable::addMapping (uint32_t effectiveAddress, uint32_t physicalAddress, uint32_t mode, uint32_t vsid)
change this to random replacement.
Member HashedPageTable::initialise (Translations &translations, uint32_t ramMax)
Get rid of this hardcoded 0x200000.
Class HashTable< K, V, SiblingK, InitialBuckets, QuadraticProbe, GrowthFactor >
check InitialBuckets for is a power of two
Member HidReport::InputBlock::feedInput (uint8_t *pBuffer, uint8_t *pOldBuffer, size_t nBufferSize, size_t &nBitOffset, HidDeviceType deviceType)
Do implement support
Member HidUtils::sendInputToManager (HidDeviceType deviceType, uint16_t nUsagePage, uint16_t nUsage, int64_t nRelativeValue)
Matt, fix the damn input manager!!!
Member HostedInterruptManager::interrupt (InterruptState &interruptState)
Provide a better entry point for system shutdown.
Member HostedPhysicalMemoryManager::m_MemoryRegions
rename this member (conflicts with PhysicalMemoryManager::m_MemoryRegions)
Member HostedSchedulerTimer::initialise () INITIALISATION_ONLY
error message or something
Member HostedTimer::initialise () INITIALISATION_ONLY
error message or something
Member InputManager::mainThread ()

Handle exit condition

Verify that the callback is in fact in the kernel

Member IntervalTimer::signal ()
sanity check that this is absolutely a PosixSubsystem
Member Ipc::IpcMessage::~IpcMessage ()
Problem: an endpoint might still have this message in a queue. We should notify it that we're now dead.
Member Iso9660Filesystem::initialise (Disk *pDisk)
Obtain disk information (perhaps a new call in Disk?)
Member KernelElf::globalLookupSymbol (uintptr_t addr, uintptr_t *startAddr=0)
This shouldn't match local or weak symbols.
Member LockedFile::operator= (const LockedFile &c)
Write me!
Member LocksCommand::lockReleased (const Spinlock *pLock, size_t nCpu=~0U)
not SMP-safe...
Member Log::installCallback (LogCallback *pCallback, bool bSkipBacklog=false)
installCallback should return success/failure
Member LWIP_NETIF_TX_SINGLE_PBUF
: TCP and IP-frag do not work with this, yet:
Member LwipSocketSyscalls::accept (struct sockaddr *address, socklen_t *addrlen)
handle other families
Member LwipSocketSyscalls::connect (const struct sockaddr *address, socklen_t addrlen)

need to track if we've already done a bind() and not bind if so

for accept() we need to do this too

Member LwipSocketSyscalls::create ()
need an error here...
Member LwipSocketSyscalls::getpeername (struct sockaddr *address, socklen_t *address_len)
handle other families
Member LwipSocketSyscalls::getsockname (struct sockaddr *address, socklen_t *address_len)
handle other families
Member LwipSocketSyscalls::getsockopt (int level, int optname, void *optvalue, socklen_t *optlen)
implement with lwIP functionality
Member LwipSocketSyscalls::netconnCallback (struct netconn *conn, enum netconn_evt evt, uint16_t len)

figure out how to bubble errors

need a way to do this with lwip when threads are off

Member LwipSocketSyscalls::poll (bool &read, bool &write, bool &error, Semaphore *waiter)
this is buggy as it'll return for the wrong events!
Member LwipSocketSyscalls::recvfrom_msg (struct msghdr *msghdr)
need to build this - extract from the pbuf
Member LwipSocketSyscalls::sendto_msg (const struct msghdr *msghdr)

need to build this - but netconn_sendto() requires a netbuf

implement sendto

Member LwipSocketSyscalls::setsockopt (int level, int optname, const void *optvalue, socklen_t optlen)
implement with lwIP functionality
Member MappingCommand::execute (const HugeStaticString &input, HugeStaticString &output, InterruptState &state, DebuggerIO *screen)
define operator != on StaticString
Member MemoryMapManager::sanitiseAddress (uintptr_t &address, size_t length)

rework APIs a lot.

allocateSpecific in the dynamic space allocator if address is within that range.

File MemoryMappedFile.h
Handle writing of files, not just reading.
Member MemoryMappedFile::compact ()
Improve this.
Member MemoryMappedFile::trap (uintptr_t address, bool bWrite)
how to manage this with potentially more traps taking place?
Member MemoryPool::allocateDoer (bool canBlock)
better error handling
Member MIPS32InterruptManager::initialiseProcessor ()
and some smp/acpi function
Member MIPS32VirtualAddressSpace::map (physical_uintptr_t physicalAddress, void *virtualAddress, size_t flags)
When is an entry global? In KSEG2? But the page table TLB entries are ASID specific... hmm.
Page Native API
Write a new configuration system API using the new native API scheme.
Member NativeBase::syscall (uint64_t subid, void *params, size_t params_size)=0
this definition needs work
Member NativeSyscallManager::syscall (SyscallState &state)
check that pointer parameters are mapped.
Member Ne2k::irq (irq_id_t number, InterruptState &state)
Handle properly
Member Ne2k::Ne2k (Network *pDev)
Proper multicast subscription via the Network card abstraction
Member NetworkFilter::filter (size_t level, uintptr_t packet, size_t sz)
Callbacks should be able to return a code which requests a specific response, such as ICMP Unreachable or something, rather than just dropping the packet.
Member NetworkFilter::installCallback (size_t level, bool(*callback)(uintptr_t, size_t))
UnlikelyLock here
Member NetworkFilter::removeCallback (size_t level, size_t id)
Implement me!
Class ObjectPool< T, poolSize >
add a MemoryPressureHandler here.
Member OFDevice::setProperty (const char *pProperty, NormalStaticString &val)
Member Ohci::addTransferToTransaction (uintptr_t pTransaction, bool bToggle, UsbPid pid, uintptr_t pBuffer, size_t nBytes)
Clean up!
Member Ohci::irq (irq_id_t number, InterruptState &state)
Handle.
Member Ohci::portReset (uint8_t nPort, bool bErrorResponse=false)
Error handling? Device fails to reset? Not present after reset?
Member Ohci::ptv_ed (physical_uintptr_t phys)
defines for the list sizes so changing one doesn't involve rewriting heaps of code
Member Ohci::removeED (ED *pED)
Isochronous and Periodic.
Member OpenPic::initialise () INITIALISATION_ONLY
Set up timers.
Member PageFaultHandler::interrupt (size_t interruptNumber, InterruptState &state)
probably can just skip checking for traps across the entire kernel address space?
Member PageFaultHandler::m_Instance
Implement
Member PciAtaController::PciAtaController (Controller *pDev, int nController=0)

for ICH and the like, there's more Ultra DMA configuration.

Bus master registerss may be memory mapped...

ICH will have "native mode" to worry about

Detect PCI IRQ, don't use ISA IRQs in native mode (etc...)

Member PciDevicesFile::resync ()

need to add some flags here

add driver name here if known?

Member Pedigree::IpAddress::toString ()
IPv6
Member Pedigree::NetworkDevice::subnet
StationInfo in Pedigree
Member PedigreeGraphics::GraphicsProvider::pDisplay
Provide the current graphics mode via a watered-down Display class.
Member PerProcessorScheduler::checkEventState (uintptr_t userStack)
This is a quickfix for a bigger problem. I imagine it has something to do with calling execve directly without fork, meaning the memory is cleaned up but the state level stack information is not.
Member PerProcessorScheduler::processorAddThread (void *instance) NORETURN
handle result
Member Png::Png (const char *filename)
clean up after these errors.
Member PosixSubsystem::addFileDescriptor (size_t fd, FileDescriptor *pFd)
this is possibly racy
Class PosixSubsystem::AlternateSignalStack
Figure out how to make this work for more than just the current process (ie, work with CheckEventState... Which requires exposing parts of the POSIX subsystem to the scheduler - not good!).
Member PosixSubsystem::checkAddress (uintptr_t addr, size_t extent, size_t flags)
This has a security flaw in that between the check and the use of the actual pointer, the pointer can become invalid due to other threads being active in the process. It may be worth having a Process-wide UnlikelyLock which has the mmap family of functions, sbrk, etc... as writers, and all other syscalls as readers. This would ensure a multithreaded application is not able to crash the kernel.
Member PosixSubsystem::insertThread (size_t n, PosixThread *thread)
It might be safe to delete the pointer... We'll see.
Member PosixSubsystem::invoke (File *originalFile, const String &originalName, Vector< String > &argv, Vector< String > &env, SyscallState *state)

actually we are supposed to kill them all here

do we need to relocate at all?

cleanup

cleanup

should only do this for setuid/setgid programs

platform assumption here.

16 random bytes, not 16 zero bytes

Member PosixSubsystem::kill (KillReason killReason, Thread *pThread)
we probably want to avoid allocating a new stack..
Member PosixSubsystem::parseShebang (File *pFile, File *&outFile, Vector< String > &argv)
this loop could terminate MUCH faster
Member PosixSubsystem::removeThread (size_t n)
It might be safe to delete the pointer... We'll see.
Member PosixSubsystem::~PosixSubsystem ()
Call the destructor (need a way to call into userspace and return back here)
Member PPC32InterruptManager::initialiseProcessor ()
and some smp/acpi function
Member PPC32VirtualAddressSpace::clone ()
Copy on write.
Member PPC32VirtualAddressSpace::initialise (Translations &translations)

the 0x6a is temporary and wrong. Find a proper mode. (0x2 doesn't seem to work)

Holy magic numbers, batman! the 0x100 is a bit hardcoded, isn't it?

Member PpcCommonPhysicalMemoryManager::PageStack::allocate ()
Swapspace here.
Member PPCVga::initialise ()
Something with VirtualAddressSpace here?
Member PPCVga::m_pFramebuffer
: This should be a MemoryMappedIO - needs VirtualAddressSpace though.
Class Prcm

Power management

Reset

Member Prcm::initialise (uintptr_t base)
Proper initialisation
Member Prcm::WaitCoreIdleStatus (size_t n, size_t clock, bool waitForOn)
delays or something
Member Prcm::WaitPllIdleStatus (size_t n, size_t clock, bool waitForOn)
delays or something
Member Processor::disableDebugBreakpoint (size_t nBpNumber)

Implement.

Implement.

Member Processor::enableDebugBreakpoint (size_t nBpNumber, uintptr_t nLinearAddress, DebugFlags::FaultType nFaultType, size_t nLength)

Implement.

Implement.

Member Processor::getDebugBreakpoint (size_t nBpNumber, DebugFlags::FaultType &nFaultType, size_t &nLength, bool &bEnabled)

Implement.

Implement.

Member Processor::getDebugStatus ()
is the debug status somehow abtractable?
Member Processor::getInterrupts ()
FIQs count too
Member Processor::initialisationDone ()
there HAS to be a better way than this
Member Processor::initialise1 (const BootstrapStruct_t &Info) INITIALISATION_ONLY
Unmap.
Member Processor::invalidate (void *pAddress)
Figure out if we want to flush the TLB of every processor or if this should be handled by the upper layers
Member Processor::setInterrupts (bool bEnable)

Implement.

FIQs count too

Member Processor::setSingleStep (bool bEnable, InterruptState &state)

Implement

Implement

Implement - MIPS doesn't have a single step mechanism per se...

Member ProcFs::addProcess (PosixProcess *proc)

is this correct? or should it be effective user/group?

add some info to the directory...

Member ProcFs::initialise (Disk *pDisk)

need to know parent (if any) so we can add dotdot too

also probably need /etc/mtab...

need to add some flags here

add driver name here if known?

Member ProcFs::removeProcess (PosixProcess *proc)
should also remove all the files/directories in the directory
Member ProducerConsumer::consumerThread ()
should really use the result here.
Member Ps2Controller::sendCommandWithResponse (uint8_t command, uint8_t data)
handle this when we have irqs enabled
Member Ps2Controller::sendCommandWithResponse (uint8_t command)
handle this when we have irqs enabled
Member Ps2Mouse::initialise (Ps2Controller *pController)
handle errors, resend requests, etc
Member PtmxFile::open ()
so, when this master is closed, we'll leak these resources...
Member RadixTree< T >::operator= (const RadixTree &x)
check for incompatible case-sensitivity?
Member RamFile::readBlock (uint64_t location)
Kind of irrelevant here?
Member RandomFile::readBytewise (uint64_t location, uint64_t size, uintptr_t buffer, bool bCanBlock=true)
Endianness issues?
Member RawFsDir::removeRecursive ()

Leaky.

do this

Member RequestQueue::getNextRequest ()
Stop possible starvation here.
Member RequestQueue::work ()
should handle errors properly here
Member RingBuffer< T >::read (Time::Timestamp &timeout)
need to allow read() to fail - use Result<>
Member RingBuffer< T >::write (const T &obj, Time::Timestamp &timeout)
oh dear, writes are always assumed to succeed
Namespace RingBufferWait
rewrite this in the same way as TcpBuffer!
Member Rtc::irq (irq_id_t number, InterruptState &state)
figure out how best to handle this
Member Rtc::removeAlarm (class Event *pEvent, bool bRetZero)
clarify units
Member ScsiDisk::doRead (uint64_t location)

Cache this somewhere.

endianness issue?

Member ScsiDisk::initialise (class ScsiController *pController, size_t nUnit)
Use this data to change how read() and write() work
Member ScsiDisk::readSense (Sense *s)
get the amount of data received from the SCSI device
Member ScsiDisk::unitReady ()
this can fail with UNIT_ATTN or NOT_READY if the device is removable.
Member Serial::setBase (uintptr_t nBaseAddr)=0
make this generic for Mmaped and port IO.
Member SerialIO::putChar (char c, DebuggerIO::Colour foreColour, DebuggerIO::Colour backColour)
This code below is costly and slow, but without it we can't line-wrap. Sort this out.
Class Service
Integrate with the Event system somehow
Class ServiceManager
Integrate with the Event system somehow
Member ServiceManager::~ServiceManager ()
Delete all the pointers!
Member SharedBuffer::~SharedBuffer ()
Need a way to destroy the old framebuffer without freeing the shared region. Refcount on the region perhaps?
Member SharedPointer< T >::release ()
allow specifying a custom function to handle deletion
Member SignalEvent::serialize (uint8_t *pBuffer)
There may be a need for serialization in the future...
Member SlamAllocator::m_Instance
why does a module access this!?
Member Spinlock::m_CpuState
handle more than 64 CPUs.
Member StaticString< N >::append (const char *str, size_t nLen=0, char c= ' ')
this is unsafe - StringLength is unconstrained.
Member StaticString< N >::right (int n) const
this is technically off-by-one, but I don't feel comfortable changing the behavior -Matt
Class String
provide documentation
Member String::find (const char c) const
this problem only exists because we use return -1 as a status indicator. That could be changed, and we could avoid a signed/unsigned conversion here!
Member sys_thread_new (const char *name, lwip_thread_fn thread, void *arg, int stacksize, int prio)
stacksize might be important
Member Terminal::initialise ()
Clean it up when the child terminates.
Member Terminal::renewBuffer (size_t nWidth, size_t nHeight)
Send SIGWINCH in console layer.
Member Terminal::write (const char *pStr, DirtyRectangle &rect)
Add some checking - every successive byte should start with 0b10.
Member TextIO::writeStr (const char *s, size_t len)

Should we handle this?

hook in to Keyboard::setLedState!

Sanity check.

Error out if is Utf8

implement me!

implement me!

Member Thread::pushState ()

This should also push errno and m_bInterrupted, so syscalls can be used safely in interrupt handlers.

Take some action here - possibly kill the thread?

Member Thread::sendEvent (Event *pEvent)
we should be checking inhibits HERE! so we don't wake a thread that has inhibited the sent event
Member Thread::setStatus (Status s)
provide a way to report this in Thread::setStatus API
Member Thread::setTlsBase (uintptr_t base)
clean up old base
Member Thread::shutdown ()
identify a way to make cleanup work here.
Class ThreadToCoreAllocationAlgorithm
Document.
Member Translations::findFreePhysicalMemory (uint32_t size, uint32_t align=0x100000)
Buggy, I think.
Class Tree< K, E >::IteratorNode
This will actually mean for each Tree you can only use one iterator at a time, which may not be effective depending on how this is used.
Member UnixSocket::~UnixSocket ()
update read/write to handle the other socket going away correctly
Member UnixSocketSyscalls::bind (const struct sockaddr *address, socklen_t addrlen)

unbind existing socket if one exists.

re-bind an unnamed address if we are bound already

does this actually create a findable file?

errno?

Member UnixSocketSyscalls::connect (const struct sockaddr *address, socklen_t addrlen)
wrong error
Member UnixSocketSyscalls::listen (int backlog)
bind to an unnamed socket if we aren't already bound
Member UnixSocketSyscalls::recvfrom_msg (struct msghdr *msghdr)

get info from the socket about things like truncated buffer

except that it could be.. need to detect shutdown()

Member UnixSocketSyscalls::sendto_msg (const struct msghdr *msghdr)

this doesn't handle a connection going away - only a connection not being made in the first place (I think it's a different errno)

errno

needs some sort of errno here

wrong error

except that it could be.. need to detect shutdown()

Member UnixSocketSyscalls::shutdown (int how)
Member UnixSocketSyscalls::~UnixSocketSyscalls ()
should shutdown() which should wake up recv() or poll()
Member UsbDevice::getDescriptor (uint8_t nDescriptorType, uint8_t nDescriptorIndex, uint16_t nBytes, uint8_t requestType=0)
Proper language ID handling!
Member UsbDevice::getDescriptorLength (uint8_t nDescriptorType, uint8_t nDescriptorIndex, uint8_t requestType=0)
Proper language ID handling
Member UsbDevice::getString (uint8_t nString)
UTF-8 support of some kind
Member UsbDevice::initialise (uint8_t nAddress)

This doesn't work - HS devices at FS stall all over the place. Find out why.

support more configurations (how?)

Member UsbMassStorageDevice::initialiseDriver ()
Some mass storage devices don't support this command, fail to return logical information, or just report incorrect data. All that needs to be handled.
Member UsbMassStorageDevice::sendCommand (size_t nUnit, uintptr_t pCommand, uint8_t nCommandSize, uintptr_t pRespBuffer, uint16_t nRespBytes, bool bWrite)

Should probably just be transaction errors and stalls

Should probably just be transaction errors and stalls

Member UsbUlpi::initialise ()
OtgControl is invalid on Linaro's beaglexm qemu emulation.
Member UsbUlpi::m_Instance
super specific to a machine
Member VbeDisplay::fillRectangle (rgb_t *pBuffer, size_t x, size_t y, size_t width, size_t height, rgb_t colour)
This needs to properly handle the case where there's more than one byte per pixel? (or less, I guess)
Member VbeDisplay::setScreenMode (Display::ScreenMode sm)
Assumption may be wrong?
Member VFS::m_Instance
Figure out a way to clean up files after deletion. Directory::remove() is not the right place to do this. There needs to be a way to add a File to some sort of queue that cleans it up once it hits refcount zero or something like that.
Member VFS::removeAlias (const String &alias)
Remove from m_Mounts
Member VFS::removeAllAliases (Filesystem *pFs, bool canDelete=true)
Locking.
Member VirtualTerminalManager::getTerminalMode (size_t n) const
validate n
Member VirtualTerminalManager::setTerminalMode (size_t n, struct vt_mode mode)
validate n
Member VmwareGraphics::getCurrentScreenMode (Display::ScreenMode &sm)
Not necessarily always correct for boundary cases
Member VmwareGraphics::readRegister (size_t offset)
Lock these
Member VmwareGraphics::setMode (size_t w, size_t h, size_t bpp)
If we switch to any mode after the first one has been set, the old region needs to be deallocated.
Member VmwareGraphics::VmwareFramebuffer::copy (size_t srcx, size_t srcy, size_t destx, size_t desty, size_t w, size_t h, bool bLowestCall=true)
Caps to determine whether to fall back to software
Member VsidManager::obtainVsid ()
Locking
Member VsidManager::returnVsid (Vsid vsid)

Locking

decrement high water mark if possible

Member Widget::construct (const char *endpoint, const char *title, widgetCallback_t cb, PedigreeGraphics::Rect &dimensions)
Maybe we can get a decent way of having a default handler?
Member Widget::destroy ()
do we care if the send fails? We probably do??
Member Window::~Window ()
Need a way to destroy the old framebuffer without breaking the other side's reference to the same region... Refcount?
Member X64GdtManager::initialiseProcessor () INITIALISATION_ONLY
and some smp/acpi function
Member X64GdtManager::initialiseTss (X64TaskStateSegment *pTss) INITIALISATION_ONLY
this should change
Member X64SyscallManager::syscall (SyscallState &syscallState) USED
this is an extraordinary hack, this should be done in a way more abstract way than this!!
Member X64VirtualAddressSpace::clone (bool copyOnWrite=true)

figure out how to handle page tracking here

Deal with 2MB pages here.

Member X64VirtualAddressSpace::mapHuge (physical_uintptr_t physAddress, void *virtualAddress, size_t count, size_t flags)

this does not handle non-1G-aligned counts.

we should unmap everything in the region first, clean up tables etc

change define to mean huge

sanity check physical address?

Member X64VirtualAddressSpace::mapUnlocked (physical_uintptr_t physAddress, void *virtualAddress, size_t flags, bool locked=false)
this can actually break if a process is removed from the scheduler while we iterate!
Member X64VirtualAddressSpace::revertToKernelAddressSpace ()

Deal with 2MB pages here.

When swap system comes along, we want to remove this page from swap!

Member X64VirtualAddressSpace::~X64VirtualAddressSpace ()
validate that we're cleaning up enough stuff here for example are we missing stuff like PDPTs etc?
Member X86CommonPhysicalMemoryManager::initialise (const BootstrapStruct_t &Info) INITIALISATION_ONLY
do this in initialise64 too, copying any existing entries.
Member X86CommonPhysicalMemoryManager::initialise64 (const BootstrapStruct_t &Info) INITIALISATION_ONLY
this will break if there's over 64 TiB of RAM on the machine.
Member X86CommonPhysicalMemoryManager::m_MemoryRegions
rename this member (conflicts with PhysicalMemoryManager::m_MemoryRegions)
Member X86CommonPhysicalMemoryManager::PageStack::free (uint64_t physicalAddress, size_t length)
make sure callers split any regions that cross over before calling
Member X86CommonPhysicalMemoryManager::unmapRegion (MemoryRegion *pRegion)
copy the pageConstraints to the Region object
Member X86GdtManager::initialiseProcessor () INITIALISATION_ONLY
and some smp/acpi function
Member X86IsaDma::initTransfer (uint8_t channel, uint8_t mode, size_t length, uintptr_t addr)
Extra flags to control modes and things
Member X86KernelVirtualAddressSpace::m_Instance
MAX_PROCESSORS
Member X86KernelVirtualAddressSpace::X86KernelVirtualAddressSpace ()
MAX_PROCESSORS here.
Member X86Keyboard::initialise ()
do we need to switch into a specific scancode set?
Member X86StackFrame::getParameter (size_t n)
better way to do this.
Member X86VirtualAddressSpace::revertToKernelAddressSpace ()
When swap system comes along, we want to remove this page from swap!
Member Xterm::write (uint32_t utf32, DirtyRectangle &rect)

Changes how title modes are set...

Do something about this.

Alternate keypad mode

In VT52 mode, we need to go into VT52 graphics mode...

In VT52 mode, exit VT52 graphics mode...