summaryrefslogtreecommitdiff
path: root/sys/src/9/bcm/arch.c
AgeCommit message (Collapse)Author
2025-05-14kernel: get rid of Proc.kstackglenda
The kernel stack is now above the Proc structure, so the explicit kstack pointer can be eliminated.
2020-12-20kernel: handle tos and per process pcycle counters in port/cinap_lenrek
we might as well handle the per process cycle counter in the portable part instead of duplicating the code in every arch and have inconsistent implementations. we now have a portable kenter() and kexit() function, that is ment to be used in trap/syscall from user, which updates the counters. some kernels missed initializing Mach.cyclefreq.
2019-06-20bcm, kw, omap, teg2: implement setregisters()cinap_lenrek
2019-04-11kernel: get rid of PTR2UINT() and UINT2PTR() macroscinap_lenrek
2018-11-04bcm: fix mysterious core clock resets under SMP (thanks richard miller)cinap_lenrek
reference: https://github.com/raspberrypi/firmware/issues/542 procsave(Proc* p) { uvlong t; cycles(&t); p->pcycles += t; // TODO: save and restore VFPv3 FP state once 5[cal] know the new registers. fpuprocsave(p); /* * Prevent the following scenario: * pX sleeps on cpuA, leaving its page tables in mmul1 * pX wakes up on cpuB, and exits, freeing its page tables * pY on cpuB allocates a freed page table page and overwrites with data * cpuA takes an interrupt, and is now running with bad page tables * In theory this shouldn't hurt because only user address space tables * are affected, and mmuswitch will clear mmul1 before a user process is * dispatched. But empirically it correlates with weird problems, eg * resetting of the core clock at 0x4000001C which confuses local timers. */ if(conf.nmach > 1) mmuswitch(nil); }
2013-01-26add raspberry pi kernel (from sources)cinap_lenrek