Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi 2 Model B Rev 1.2 only sees 1 CPU with 64bit kernel #3234

Closed
digitallyelite opened this issue Sep 16, 2019 · 20 comments
Closed

Comments

@digitallyelite
Copy link

digitallyelite commented Sep 16, 2019

Describe the bug
Upon boot, only 1 CPU is available for use.

To reproduce
Install 64bit kernel on a Raspberry Pi 2 Model B Rev 1.2

Expected behaviour
All 4 CPUs should be available

Actual behaviour
Only 1 CPU is available (32bit kernel does not have this issue)

  • Which model of Raspberry Pi? e.g. Pi3B+, PiZeroW
    RaspberryPi2 v1.2
  • Which OS and version (cat /etc/rpi-issue)?
    Raspbian Buster
  • Which firmware version (vcgencmd version)?
    Sep 12 2019 16:32:35
    Copyright (c) 2012 Broadcom
    version 4b30e8dcf91177a0be822c4c8d3bac8ed65f7ea5 (clean) (release) (start)
  • Which kernel version (uname -a)?
    4.19.71
    Logs
    dmesg | grep cpu spits out the following that I think is pertinent...
    [0.000000] /cpus/cpu@1: missing enable-method property
    [0.000000] /cpus/cpu@2: missing enable-method property
    [0.000000] /cpus/cpu@3: missing enable-method property

Additional context
Both 32bit and 64bit /proc/cpuinfo list
Hardware: 2835
Revision: a02042
Model: Raspberry Pi 2 Model B Rev 1.2

Also, according to https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md it seems the revision code should be a22042 and does not list a02042

@popcornmix
Copy link
Collaborator

Complete output of uname -a would have been useful.
Is this rpi-update kernel with arm_64bit=1, or a kernel you've built yourself?

@pelwell
Copy link
Contributor

pelwell commented Sep 16, 2019

The reason will be that Pi 2B didn't used to be a 64-bit device, but the rev 1.2 iteration comes with at 2837. The Device Tree for the 2B hasn't changed, hence the lack of enable-methods. The correct solution would be to introduce bcm2710-rpi-2-b.dtb, but it would require changes to the kernel and firmware repos.

@digitallyelite
Copy link
Author

@popcornmix it happened with both a self built as well as rpi-update with arm_64bit=1

full uname -a is
Linux raspberrypi 4.19.71-v8+ #1263 SMP PREEMPT Thu Sep 12 16:28:48 BST 2019 aarch64 GNU/Linux

@pelwell i'm assuming that that work is very low on the totem pole/won't be done at all? I could probably mash together a dts file, but if the firmware never recognizes it (Which revision is incorrect, the matrix at the revision-codes URL above, or the one on the board?) would it even be worth doing?

@pelwell
Copy link
Contributor

pelwell commented Sep 16, 2019

You can force the firmware to use any DTB using the device_tree=whatever.dtb setting in config. txt. I was referring to the automatic file selection based on revision codes. If you can hack together and share a working dts it will make it much more likely the rest of the work will get done.

@pelwell
Copy link
Contributor

pelwell commented Sep 16, 2019

PR #3235 shouldn't be too far wrong.

@pelwell
Copy link
Contributor

pelwell commented Sep 17, 2019

A small patch has been dropped into the firmware mill and may pop out of the other side in the next few days.

popcornmix added a commit to raspberrypi/firmware that referenced this issue Sep 17, 2019
kernel: Fix poll rate on touchscreen
See: raspberrypi/linux#3227

firmware: Round up HDMI0 minimum core clock

firmware: board_info: Support bcm2710- and bcm2837- Pi 2 DTBs
See: raspberrypi/linux#3234

firmware: power: bcm2711: Rescale the GPIO pad power

firmware: brfs: Add GENET driver for 2711
firmware: bootloader_state: Add network state and bootmode configuration
firmware: bootloader_state: Fix mask for EEPROM header magic
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Sep 17, 2019
kernel: Fix poll rate on touchscreen
See: raspberrypi/linux#3227

firmware: Round up HDMI0 minimum core clock

firmware: board_info: Support bcm2710- and bcm2837- Pi 2 DTBs
See: raspberrypi/linux#3234

firmware: power: bcm2711: Rescale the GPIO pad power

firmware: brfs: Add GENET driver for 2711
firmware: bootloader_state: Add network state and bootmode configuration
firmware: bootloader_state: Fix mask for EEPROM header magic
@pelwell
Copy link
Contributor

pelwell commented Sep 17, 2019

The latest firmware (available from rpi-update) should attempt to load bcm2710-rpi-2-b.dtb on a rev 1.2 Pi 2, falling back to bcm2709-rpi-2-b.dtb if it isn't found.

@digitallyelite
Copy link
Author

Just tested the firmware here and it does seem to be working as intended, 2710 if it exists, and 2709 if it does not. I haven't noticed anything super out of the ordinary on booting it 64bit - it sees all 1GB of ram, rng tools seems to be starting, kernel uname is
Linux raspberrypi 4.19.73-v8+ #1266 SMP PREEMPT Tue Sep 17 21:08:24 BST 2019 aarch64 GNU/Linux

The only thing out of the ordinary to me, is that it still reports a revision of a02042 instead of a22042 - unless I have one from Sony UK and not Embest and it just hasn't been added to the matrix yet?

@pelwell
Copy link
Contributor

pelwell commented Sep 18, 2019

If the board has a small QR code sticker on the bottom then it's built by Sony.

@digitallyelite
Copy link
Author

There is a very tiny one, with what could be a QR code and a "19/05" on it so I guess Sony UK are doing them and it's just not on the matrix yet :)

@pelwell
Copy link
Contributor

pelwell commented Sep 18, 2019

Yes, that's the one.

Where is this matrix you keep referring to?

@digitallyelite
Copy link
Author

@pelwell
Copy link
Contributor

pelwell commented Sep 18, 2019

Or maybe better, should I send a PR

Yes - go for it. I'd merge it myself if I had the privileges on that repo.

@digitallyelite
Copy link
Author

Done, thank you so much for the work to get 64bit support in for the RaspberryPi2 v1.2, it's greatly appreciated!

@digitallyelite
Copy link
Author

Actually... something isn't quite right, but I don't think it's specific to these changes. Basically, all of my testing happened on the minimal Buster image, which is console only. But if I enable 64bit (with or without the dtb, which is why I believe this issue isn't specific to these changes) all I get is a blank screen, but it won't let me even switch to a console. X just seems to complain about a missing g2d_23 driver not found in /lib/modules/4.19.73-v8+ (??) and then there's an undefined symbol in fbturbo_drv.so... is this something I should take to the forums?

@pelwell
Copy link
Contributor

pelwell commented Sep 18, 2019

Do you have "dtoverlay=vc4-fkms-v3d" in config.txt?

@digitallyelite
Copy link
Author

Only in the [pi4] section

@pelwell
Copy link
Contributor

pelwell commented Sep 18, 2019

I suggest trying it, at least as a workaround.

@digitallyelite
Copy link
Author

that worked, thanks for the help. Since the dts is in now, I believe we can close this issue?

@pelwell
Copy link
Contributor

pelwell commented Sep 18, 2019

I won't deny you the pleasure.

mkreisl added a commit to xbianonpi/xbian-package-firmware that referenced this issue Oct 6, 2019
- firmware: camera/image_encode: Add timestamp to frames encoded with image_encode
  See: raspberrypi/linux#2351

- firmware: camera_subsystem: Clean up disable_camera_led handling

- firmware: smservice: Add defines for VPU allocations
- smservice: Add support for reporting the supported version to the host

- firmware: Camplus: cdi: Remove requirement for calibration functions

- firmware: isp: Reinstate lres shift parameter accidentally dropped with gamma changes
  See: #1108

- firmware: mmal_ril: List all 4 Bayer orders if the IL component says it supports Bayer

- firmware: raspivid: Stop --raw option resetting --raw-format to YUV
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=189830&start=25#p1432589

- firmware: Fixed up overflow in microsecond timer
  See: raspberrypi/userland#535

- firmware: smservice: Avoid a double free

- firmware: arm_loader/display: All the framebuffer allocation to be made on the ARM

- firmware: isp_tuners: Fix memory leak in error path

- firmware: testc: Fix dps parsing

- firmware: camera_subsystem: Fix hardware sync pulses off disable_camera_led

- firmware: Replace the remaining direct users of C(mask_gpu_interrupt[0|1])

- firmware: arm_display: Kick transposer for the rainbow screen if required
- firmware: dispmanx: Do not allow transpose if using Full KMS
  See: raspberrypi/linux#2891

- firmware: Revert: arm_loader/display: All the framebuffer allocation to be made on the ARM

- firmware: arm_loader: Further conditionals for passing in a frame buffer

- firmware: di_adv: Drop back to fast if QPUs are masked off

- firmware: Fix AWB exception bug

- firmware: Updates for Pi4

- firmware: Add missing licence file

- firmware: 2711: CORE, EMMC & BVB clock updates for WiFi / 4Kp60
- firmware: 711: Use boost instead of fixed freq for 4Kp60

- firmware: hvs: Emulate the EOLn interrupt with a timer reset from VSTART
  See: #1154

- firmware: Add support for Rec2020 colour space in vc_image, IL, and MMAL

- firmware: Fix composite mode on devices up to Pi3B+
  See: #1166

- firmware: Fixes for core_freq_min causing failure on HDMI1
  See: http://git/vc4/vc4/merge_requests/529

- firmware: hdmi: Don't release previous boost until mode set is complete
  See: #1159

- firmware: bcm_host: Adjust for 64-bit physical addresses
  See: #1161

- firmware: arm_loader: Shrink most stubs back to 256 bytes, add arm64 GIC stub
  See: raspberrypi/linux#3032

- firmware: arm_dispmanx: Add support for setting the colour encoding

- firmware: dmalib: Fix Lite channel interrupt usage, and macro name

- firmware: Force overscan off when using LCDs
  See: #1173

- firmware: cec: Fix crash when using CEC with HDMI1

- firmware: arm_display: Fix race condition initialising CEC

- firmware: hdmi: Always use boost frequency for initial mode set
  See: #1159

- firmware: AWB: Fix usage for IR operation
  See: #1167

- firmware: arm_loader: Support CLOCK_EMMC2 from GET_CLOCK_RATE
  See: #1179

- firmware: arm_loader: Force word alignment for the DTB
  See: #1175

- firmware: clock_2711: don't set reserved values for KA in PLL KAIP registers

- firmware: Assorted minor fixes for tvservice -o

- firmware: Rename hdmi_enable_4k to hdmi_enable_4kp60

- firmware: Revert: clock_2711: don't set reserved values for KA in PLL KAIP registers

- firmware: dispmanx: Fix handling of disable_overscan to not disable it totally
  See: raspberrypi/linux#3059

- firmware: power: Enable/disable H264 and ISP clocks with domain

- firmware: arm_loader: arm_64bit=0 should disable loading of kernel8.img

- firmware: dt-blob: CM has no activity LED

- firmware: AWB updates
  See: #1167

-firmware: Change order of display remapping for default display number

- firmware: AWB: Set default number of stats regions for RPi AWB
  See: #1198

- firmware: Fix composite interrupt HVS channel

- firmware: scalarlib: Fix width setting for SCALERLIB_PIXEL_FORMAT_YUV10COL

- firmware: vcmailbox: Add a new SET_AUDIO_LDO_STATE mailbox command

- firmware: Add mailbox call to report the HDMI timings

- firmware: H264: Set the decoder cache AXI burst length to the same as the encoder

- firmware: gencmd: Fix gencmd max result length
- firmware: bootloader_config: New gencmd to read the EEPROM config

- firmware: pwm_audio: Use PWM1 on BCM2838 unless remapped
  See: #1178

- firmware: Fixups for missing code changes from Pi4 branch
  See: #1201

- firmware: pwm_audio: Use the correct DREQs on Pi4
  See: #1214

- firmware: pixelvalve_2711: Alter back porch for widths of 1366
  See: #1202

- firmware: Clear the SMIDSW1 display interrupt flag on startup

- firmware: dt-blob: Declare Pi 4B's SD_IO voltage selector

- firmware: Fix to allow HDMI audio port route setting
  See: raspberrypi/linux#3100

- firmware: AWB: Allow user to set manual gains for the RPi algorithm

- firmware: arm_loader: Fix disabling of audio before reboot

- firmware: fixed up the custom CVT values to use correct group

- firmware: hdmi: Add independent table entries for hdmi_timings on each display
  See: #1218

- firmware: arm_loader: Fix initial_turbo getting stuck
  See: #1005

- firmware: clock_2711: don't set reserved values for KA in PLL KAIP registers

- firmware: arm_loader: Use platform_get_min_core_voltage for actual min voltage

- firmware: clock: Remember disable state across clock changes

- firmware: platform: pi4: Reduce min core voltage to 810mV

- firmware: arm_dt: Use boost to force turbo mode rather than modifying core_freq_min for uart

- firmware: arm_loader: Add optional flag to add_boost and get_boost calls

- firmware: avs_2711: Move margin from init structure to run time

- firmware: platform: fix get_min_default

- firmware: arm_loader: Use AP_CLOCK_T for clock_iterator for easier debugging

- firmware: AWB: Fix for manual WB settings in capture
  See: #1215

- firmware: sdhost_arasan: Disable busy wait on EMMC_STATUS_NEW_CARD_DATA_SET

- firmware: power: Add 2711-specific PMIC compensation values

- firmware: platform: Remove 10mV of margin

- firmware: Revamp file loading logic

- firmware: power: Allow reading uncached voltage

- firmware: arm_loader: Request KMS to use CVT timings

- firmware: vc_image: Default YUVUV to non-tall mode, with flag if required

- firmware: ldconfig: Implement [pi2/pi3/pi3+] using board types
  See: #1242

- firmware: Avoid defaulting to 64-bit kernel on older Pi

- firmware: Port file loading revamp to master

- firmware: platform: Set up emmc clock earlier

- firmware: hdmi: Implement platform_display_power on 2711
  See: #1224

- firmware: arm_loader: Pass overscan settings to the kernel

- firmware: arm_loader: Add option disable_fw_kms_setup to stop FKMS setup by FW

- firmware: hdmi: Use pixel clock multiplier to determine the core clock

- firmware: Fixups for composite output mode
  See: #1223

- firmware: platform: Allow display_power to be queried from gencmd
  See: #1224

- firmware: arm_loader: Fix no-DT and upstream handling
  See: #1250

- firmware: Round up HDMI0 minimum core clock

- firmware: board_info: Support bcm2710- and bcm2837- Pi 2 DTBs
  See: raspberrypi/linux#3234

- firmware: power: bcm2711: Rescale the GPIO pad power

- firmware: brfs: Add GENET driver for 2711

- firmware: bootloader_state: Add network state and bootmode configuration

- firmware: bootloader_state: Fix mask for EEPROM header magic

- firmware: arm_loader: Fix initial_turbo getting stuck
  See: #1005

- firmware: ldconfig: Support [edid=*] to mean any HDMI monitor
  See: #1136

- firmware: image_fx: Remove restriction that output stride must match input stride

- firmware: image_fx: Remove spamming log line

- firmware: platform: Switch to divide by one when arm_freq exceeds 2GHz

- firmware: Add EMMC support to 2711 Arasan EMMC driver

- firmware: arm_loader: Use /memory@0 if found
  See: raspberrypi/linux#3244

- firmware: bootloader_state: Fix length for bootloader_config

- firmware: arasan_emmc: Fix STB_GPIOOVERRIDE for MMC1 in network boot

- firmware: bfs: Verify that eth FS has not been closed before using
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants