13 Commits

Author SHA1 Message Date
Travis Geiselbrecht
e47183725d [arch][arm64] move secondary cpu entry point to separate function
- Make the secondary entry point be logically separate function, though
  declared in the same file.
- Add a trick where the kernel base + 4 is the secondary entry point.
  Not really useful except makes it easy to compute the offset
  elsewhere.
- Changed the entry point to arm64_reset and move _start to the linker
  script, which is what most other arches do.
- While was in the linker script, make sure the text segment is aligned
  on MAXPAGESIZE, though doesn't make any real difference currently.
- Generally clean up the assembly in start.S with newer macros from
  Fuchsia, and avoid using ldr X, =value as much as possible.
- Fix and make sure arm64 can build and run with WITH_SMP set to false.
  Add a new no-smp project to test this.

Note this will likely break systems where all of the cpus enter the
kernel simultaneously, which we can fix if that becomes an issue.
Secondary code now completely assumes the cpu number is passed in x0.
This can be emulated with platform specific trampoline code if it needs
to that then just directs into the the secondary entry point, instead of
trying to make the arch code have to deal with all cases.
2025-10-12 19:47:33 -07:00
Travis Geiselbrecht
f7d8e2300c [warnings] add -Wshadow which helps detect local variables that override globals
Nothing particularly bad showed up but cleaned up a bit of code.
2020-07-25 16:49:25 -07:00
Travis Geiselbrecht
ad246760ff [c++] remove WITH_CPP_SUPPORT flag
Just always build with it enabled.
2019-07-13 17:41:25 -07:00
Travis Geiselbrecht
cba9e47987 [license] replace the longer full MIT license with a shorter one
Used scripts/replacelic. Everything seems to build fine.
2019-07-05 17:22:23 -07:00
Travis Geiselbrecht
d8fa82cb91 [formatting] run everything through codestyle
Almost nothing changes here except moving braces to the same line as the
function declaration. Everything else is largely whitespace changes and
a few dangling files with tab indents.

See scripts/codestyle
2019-06-19 21:02:24 -07:00
Travis Geiselbrecht
1b7a28efb8 [include][lk] fixup lk/ include path move 2019-06-19 19:46:11 -07:00
Eric Holland
b8f77ca483 [bcm][gfx] gfx driver for raspberry pi 2017-02-06 18:52:08 -08:00
Gurjant Kalsi
c6e2c28c86 [bcm28xx][arm64] Fix some type warnings. 2016-08-23 15:15:43 -07:00
Gurjant Kalsi
b6018454c0 [bcm28xx] Fix arm/arm64 exception iframe warning 2016-08-23 15:09:07 -07:00
Gurjant Kalsi
c5b427333a [bcm28xx][arm64][ipi] Fix IPI on non-GIC based BCM28xx 2016-08-23 12:56:40 -07:00
Eric Holland
5e5e2ac50c [rpi3][bcm28xx][smp] fixes to bring up all cores 2016-08-23 12:28:42 -07:00
Gurjant Kalsi
69d35fa55b [rpi3][bcm28xx][timer] Fix BCM2837 timer runing too fast.
RPi3/BCM2837 timer was previously running too fast due to an improper multiplier
in arm_generic_timer_init(...). Fixed by setting the multiplier to 0 and
allowing the ARM generic timer code to determine the frequency and compute the
appropriate multiplier.
2016-08-23 12:28:36 -07:00
Gurjant Kalsi
100133dc38 [BCM28xx] Roll BCM2836 and BCM2837 into a single platform. Have both RPi2 and RPi3 use the new BCM28XX platform. 2016-08-23 12:28:28 -07:00