留言板
路过的蜗牛们,在这里留个脚印吧~
蜗窝欢迎各种言论,谈天说地、技术交流、问题求救、跳槽招聘、牢骚抱怨……哈哈。
评论:
WL
2017-01-03 23:35
2017-01-03 23:35
刚路过,看了一些文章,感觉到博主的情怀和坚持,确实难能可贵,本人也是在linux上摸爬滚打8年的工程师,目前正在从事linux驱动工作,很希望能够参与到一个为技术和产品奋斗的组织,望有机会可以拜见下!
CHENYAN
2016-09-27 16:52
2016-09-27 16:52
最近一直在研究ARM64 Linux的系统调用的HOOK方法. 记得以前X86平台下可以通过IDT寄存器获取系统调用表的基地址. 我看了ARM64的内核代码, 貌似没有类似的寄存器. 想问一下ARM64有办法获取系统调用表的基地址吗? 我对ARM64架构不是很熟悉, 能给点指导意见吗? 感谢!!! @wowo
hongxiaoh
2016-08-11 14:16
2016-08-11 14:16
cec = atomic_add_return(MAX_IN_PROGRESS, &combined_event_count);
wakeup events in progress减1,registered wakeup events加1
请问这个具体是怎么实现加减的?
wakeup events in progress减1,registered wakeup events加1
请问这个具体是怎么实现加减的?
wowo
2016-08-11 15:42
2016-08-11 15:42
@hongxiaoh:假设combined_event_count是32bit
wakeup events in progress和registered wakeup events各占16bit,即:wakeup events in progress | registered wakeup events.
注:上面有一个隐含的规则:registered wakeup events > wakeup events in progress(很重要,不然会有问题)
而MAX_IN_PROGRESS等于((1 << 16) - 1),即0xffff
那么combined_event_count + MAX_IN_PROGRESS = ?
假设combined_event_count=0x0 0001,则为0x1 0000
假设combined_event_count=0x5 0009,则为0x6 0008
实际上就利用了简单的进位操作~~~
wakeup events in progress和registered wakeup events各占16bit,即:wakeup events in progress | registered wakeup events.
注:上面有一个隐含的规则:registered wakeup events > wakeup events in progress(很重要,不然会有问题)
而MAX_IN_PROGRESS等于((1 << 16) - 1),即0xffff
那么combined_event_count + MAX_IN_PROGRESS = ?
假设combined_event_count=0x0 0001,则为0x1 0000
假设combined_event_count=0x5 0009,则为0x6 0008
实际上就利用了简单的进位操作~~~
hongxiaoh
2016-08-30 13:46
2016-08-30 13:46
@wowo:#define pr_fmt(fmt) "%s: " fmt, __func__
请问知道这句话的语法吗??
在linux lcd驱动看到的这句话。
请问知道这句话的语法吗??
在linux lcd驱动看到的这句话。
wowo
2016-08-30 18:19
2016-08-30 18:19
@hongxiaoh:pr_fmt是为了在printk输出的log之前,加一些关键字,一般是标识自己的模块的(一次都是放在自己模块C代码的开始处),你可以参考include/linux/printk.h中的用法,如:
#define pr_info(fmt, ...) \
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
#define pr_info(fmt, ...) \
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
wowo
2016-09-06 17:23
2016-09-06 17:23
@hongxiaoh:不知道你使用哪个版本的Android?
以我了解的Android5.0为例,关机充电和正常工作,从本质上来讲,是没有什么区别的,只是运行了不同的Application(例如healthd),此时Adb的service和protocol,很有可能是存在的(依赖Android的配置),如果你需要查看日志,估计需要把相应的环境(如logcat等)启动:
例如下面是我的机器在关机充电的时候的打印(没有shell、没有logcat等等)
adb logcat
- exec '/system/bin/sh' failed: No such file or directory (2) -
具体怎么做,和Android的版本、编译、配置策略有关,具体我也不是很熟悉~~
以我了解的Android5.0为例,关机充电和正常工作,从本质上来讲,是没有什么区别的,只是运行了不同的Application(例如healthd),此时Adb的service和protocol,很有可能是存在的(依赖Android的配置),如果你需要查看日志,估计需要把相应的环境(如logcat等)启动:
例如下面是我的机器在关机充电的时候的打印(没有shell、没有logcat等等)
adb logcat
- exec '/system/bin/sh' failed: No such file or directory (2) -
具体怎么做,和Android的版本、编译、配置策略有关,具体我也不是很熟悉~~
likai
2016-08-05 11:16
2016-08-05 11:16
qcom,power-on@800 {
compatible = "qcom,qpnp-power-on";
reg = <0x800 0x100>;
interrupts = <0x0 0x8 0x0>,
<0x0 0x8 0x1>,
<0x0 0x8 0x4>,
<0x0 0x8 0x5>;//这个代表的什么含义呢?
interrupt-names = "kpdpwr", "resin",
"resin-bark", "kpdpwr-resin-bark";
qcom,pon-dbc-delay = <15625>;
qcom,system-reset;
qcom,pon_1 {
qcom,pon-type = <0>;
qcom,pull-up = <1>;
linux,code = <116>;
};
qcom,pon_2 {
qcom,pon-type = <1>;
qcom,pull-up = <1>;
linux,code = <114>;
};
qcom,pon_3 {
qcom,pon-type = <3>;
qcom,support-reset = <1>;
qcom,s1-timer = <6720>;
qcom,s2-timer = <2000>;
qcom,s2-type = <7>;
qcom,pull-up = <1>;
qcom,use-bark;
};
};
我有一个疑问,可否帮忙解答解答。interrupts = <0x0 0x8 0x0> 代表的都是什么含义呢,非常感谢。
compatible = "qcom,qpnp-power-on";
reg = <0x800 0x100>;
interrupts = <0x0 0x8 0x0>,
<0x0 0x8 0x1>,
<0x0 0x8 0x4>,
<0x0 0x8 0x5>;//这个代表的什么含义呢?
interrupt-names = "kpdpwr", "resin",
"resin-bark", "kpdpwr-resin-bark";
qcom,pon-dbc-delay = <15625>;
qcom,system-reset;
qcom,pon_1 {
qcom,pon-type = <0>;
qcom,pull-up = <1>;
linux,code = <116>;
};
qcom,pon_2 {
qcom,pon-type = <1>;
qcom,pull-up = <1>;
linux,code = <114>;
};
qcom,pon_3 {
qcom,pon-type = <3>;
qcom,support-reset = <1>;
qcom,s1-timer = <6720>;
qcom,s2-timer = <2000>;
qcom,s2-type = <7>;
qcom,pull-up = <1>;
qcom,use-bark;
};
};
我有一个疑问,可否帮忙解答解答。interrupts = <0x0 0x8 0x0> 代表的都是什么含义呢,非常感谢。
wowo
2016-08-05 12:27
2016-08-05 12:27
@likai:你可以参考对应的device tree bindings文档,例如(这里不一定是你的真实场景。另外如果找不到文档,可以直接看代码,我们不知道你的平台,具体的含义也无法确定):
Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt
- #interrupt-cells : Specifies the number of cells needed to encode an
interrupt source. The type shall be a <u32> and the value shall be 3.
The 1st cell is the interrupt type; 0 for SPI interrupts, 1 for PPI
interrupts.
The 2nd cell contains the interrupt number for the interrupt type.
SPI interrupts are in the range [0-987]. PPI interrupts are in the
range [0-15].
The 3rd cell is the flags, encoded as follows:
bits[3:0] trigger type and level flags.
1 = low-to-high edge triggered
2 = high-to-low edge triggered (invalid for SPIs)
4 = active high level-sensitive
8 = active low level-sensitive (invalid for SPIs).
bits[15:8] PPI interrupt cpu mask. Each bit corresponds to each of
the 8 possible cpus attached to the GIC. A bit set to '1' indicated
the interrupt is wired to that CPU. Only valid for PPI interrupts.
Also note that the configurability of PPI interrupts is IMPLEMENTATION
DEFINED and as such not guaranteed to be present (most SoC available
in 2014 seem to ignore the setting of this flag and use the hardware
default value).
Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt
- #interrupt-cells : Specifies the number of cells needed to encode an
interrupt source. The type shall be a <u32> and the value shall be 3.
The 1st cell is the interrupt type; 0 for SPI interrupts, 1 for PPI
interrupts.
The 2nd cell contains the interrupt number for the interrupt type.
SPI interrupts are in the range [0-987]. PPI interrupts are in the
range [0-15].
The 3rd cell is the flags, encoded as follows:
bits[3:0] trigger type and level flags.
1 = low-to-high edge triggered
2 = high-to-low edge triggered (invalid for SPIs)
4 = active high level-sensitive
8 = active low level-sensitive (invalid for SPIs).
bits[15:8] PPI interrupt cpu mask. Each bit corresponds to each of
the 8 possible cpus attached to the GIC. A bit set to '1' indicated
the interrupt is wired to that CPU. Only valid for PPI interrupts.
Also note that the configurability of PPI interrupts is IMPLEMENTATION
DEFINED and as such not guaranteed to be present (most SoC available
in 2014 seem to ignore the setting of this flag and use the hardware
default value).
功能
最新评论
- wangjing
写得太好了 - wangjing
写得太好了! - DRAM
圖面都沒辦法顯示出來好像掛點了。 - Simbr
bus至少是不是还有个subsystem? - troy
@testtest:只要ldrex-modify-strex... - gh
Linux 内核在 sparse 内存模型基础上实现了vme...
文章分类
随机文章
文章存档
- 2025年4月(5)
- 2024年2月(1)
- 2023年5月(1)
- 2022年10月(1)
- 2022年8月(1)
- 2022年6月(1)
- 2022年5月(1)
- 2022年4月(2)
- 2022年2月(2)
- 2021年12月(1)
- 2021年11月(5)
- 2021年7月(1)
- 2021年6月(1)
- 2021年5月(3)
- 2020年3月(3)
- 2020年2月(2)
- 2020年1月(3)
- 2019年12月(3)
- 2019年5月(4)
- 2019年3月(1)
- 2019年1月(3)
- 2018年12月(2)
- 2018年11月(1)
- 2018年10月(2)
- 2018年8月(1)
- 2018年6月(1)
- 2018年5月(1)
- 2018年4月(7)
- 2018年2月(4)
- 2018年1月(5)
- 2017年12月(2)
- 2017年11月(2)
- 2017年10月(1)
- 2017年9月(5)
- 2017年8月(4)
- 2017年7月(4)
- 2017年6月(3)
- 2017年5月(3)
- 2017年4月(1)
- 2017年3月(8)
- 2017年2月(6)
- 2017年1月(5)
- 2016年12月(6)
- 2016年11月(11)
- 2016年10月(9)
- 2016年9月(6)
- 2016年8月(9)
- 2016年7月(5)
- 2016年6月(8)
- 2016年5月(8)
- 2016年4月(7)
- 2016年3月(5)
- 2016年2月(5)
- 2016年1月(6)
- 2015年12月(6)
- 2015年11月(9)
- 2015年10月(9)
- 2015年9月(4)
- 2015年8月(3)
- 2015年7月(7)
- 2015年6月(3)
- 2015年5月(6)
- 2015年4月(9)
- 2015年3月(9)
- 2015年2月(6)
- 2015年1月(6)
- 2014年12月(17)
- 2014年11月(8)
- 2014年10月(9)
- 2014年9月(7)
- 2014年8月(12)
- 2014年7月(6)
- 2014年6月(6)
- 2014年5月(9)
- 2014年4月(9)
- 2014年3月(7)
- 2014年2月(3)
- 2014年1月(4)
2017-01-20 13:36